I started drafting a code according to your specification as a programming exercise, but in doing so I discovered a few pecularities regarding your specification:

  1. (How) does your specification accomodate for varying coordinates?
  2. It is impossible to determine the magnitude of the original coordinate and artificial granularity may be introduced if only the first 8 digits are used:

    10000001 # 100.00001 99999999 # 99.999999 10000001 # 10.000001 99999999 # 9.9999999 10000001 # 1.0000001 99999999 # 0.99999999 10000001 # 0.10000001 99999999 # 0.099999999 ...

    A fixed reference is necessary to determine the respective magnitude:

    10000001 # 100.00001 09999999 # 99.999999 01000000 # 10.000001 00999999 # 9.9999999 00100000 # 1.0000001 00099999 # 0.99999999 00010000 # 0.10000001 00009999 # 0.099999999 ...

  3. Should coordinates be truncated or rounded?

    Given a coordinate like 256.123456, the difference between 256.12346 and 256.12345 could be significant, but I guess that depends on the size of the planet in question.

  4. What is the significance of the first two fields of the specification?

    Do they correspond to what I presume to be "device numbers" (or similar) in the log, eg: Generic Scanner PN Measurement DtiC(0)? If so, is there a particular order in the syntax (eg arbitrarily stipulated, alphabetical)?


In reply to Re: Manipulating Text File in Perl by eibwen
in thread Manipulating Text File in Perl by awohld

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.