<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=HEADERMOD</id>
	<title>HEADERMOD - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=HEADERMOD"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=HEADERMOD&amp;action=history"/>
	<updated>2026-08-05T17:22:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.ice-online.com/index.php?title=HEADERMOD&amp;diff=743&amp;oldid=prev</id>
		<title>ConvertBot: modifies/creates a Midas file header</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=HEADERMOD&amp;diff=743&amp;oldid=prev"/>
		<updated>2020-04-27T22:04:43Z</updated>

		<summary type="html">&lt;p&gt;modifies/creates a Midas file header&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;modifies/creates a Midas file header&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FILE&amp;gt;                Name of file&lt;br /&gt;
&amp;lt;key 1..N&amp;gt;            Key=Value pairs to change&lt;br /&gt;
&lt;br /&gt;
Used to modify those MIDAS file header sector words that describe the logical&lt;br /&gt;
contents of the file.  Only the parameters specified in the command line will&lt;br /&gt;
be changed.  No default header values will be assigned.&lt;br /&gt;
&lt;br /&gt;
The header is not modified if the write protect field is set to YES. In this&lt;br /&gt;
case, the file must be UNPROTECTed first using the UNPROTECT function in FILE.&lt;br /&gt;
&lt;br /&gt;
The STATUS command can be used to view or retrieve values in the header.&lt;br /&gt;
&lt;br /&gt;
This command is invoked with positionally independent (PI) parameters using&lt;br /&gt;
the TAG=VALUE syntax.  Java reflection is used to find any matching &amp;quot;set&amp;quot; method&lt;br /&gt;
in the DataFile class. One-character abbreviations are NOT allowed, due to&lt;br /&gt;
resulting ambiguities and confusion, with the one special syntax exception&lt;br /&gt;
being C(#) for COMPONENT(#).  Common tags in the DataFile class are:&lt;br /&gt;
&lt;br /&gt;
 TAG        Longname     Description&lt;br /&gt;
  ------------------------------------------------------------------------------&lt;br /&gt;
  TYPE      TYPE         File Type&lt;br /&gt;
  FORM      FORMAT       Format&lt;br /&gt;
  XU        XUNITS       X or Abscissa units&lt;br /&gt;
                          (For a complete list see nxm.sys.inc.Units)&lt;br /&gt;
  XS        XSTART       X or Abscissa start&lt;br /&gt;
  XD        XDELTA       X or Abscissa delta&lt;br /&gt;
  FS        FRAMESIZE    Frame size (type 2000)&lt;br /&gt;
  YU        YUNITS       Y or Secondary units&lt;br /&gt;
                          (For a complete list see nxm.sys.inc.Units)&lt;br /&gt;
  YS        YSTART       Y or Secondary start&lt;br /&gt;
  YD        YDELTA       Y or Secondary delta&lt;br /&gt;
  COMM      COMMENT      Set the COMMENT keyword&lt;br /&gt;
  TC        TIMECODE     Timecode (TIMECODE Header field only)&lt;br /&gt;
  SIZE      SIZE         Size in logical elements&lt;br /&gt;
  DS                     Not currently supported&lt;br /&gt;
  DATASTART DATASTART    Data start in bytes (usually 512, unless detached)&lt;br /&gt;
  DR        DATAREP      Data representation&lt;br /&gt;
  HR        HEADREP      Header representation&lt;br /&gt;
  ......................................&lt;br /&gt;
  T                     *NOT SUPPORTED* (use TYPE=)&lt;br /&gt;
  F                     *NOT SUPPORTED* (use FORM=)&lt;br /&gt;
  REP                   *NOT SUPPORTED* (use DR= or HR=)&lt;br /&gt;
&lt;br /&gt;
  HEADERMOD can be used to create a type 3000 or 5000 file from a macro or&lt;br /&gt;
  the command line, by applying the /CREATE switch.&lt;br /&gt;
&lt;br /&gt;
  For Type 3000 and 6000, the following must be defined:&lt;br /&gt;
    RL          Record length in bytes&lt;br /&gt;
    NSR         Number of subrecords&lt;br /&gt;
    SR(n)       Subrecord specs    = (NAME,FORMAT,OFFSET)&lt;br /&gt;
                  - NAME is an ASCII string up to 4 characters.&lt;br /&gt;
                  - FORMAT is standard 2-char digraph&lt;br /&gt;
                  - OFFSET is in bytes from the beginning of the record&lt;br /&gt;
                    (the first field often starts at 0, for example)&lt;br /&gt;
    SR          Short-hand record set using SR=(NAME/FORMAT,...) syntax&lt;br /&gt;
&lt;br /&gt;
  For Type 5000, the following must be defined:&lt;br /&gt;
    RL          Record length in bytes&lt;br /&gt;
    NC          Number of components&lt;br /&gt;
    C(n)        Component specs    = (NAME,FORMAT,TYPE,UNITS)&lt;br /&gt;
                  - NAME is an ASCII string up to 4 characters.&lt;br /&gt;
                  - FORMAT is standard 2-char digraph&lt;br /&gt;
                  - TYPE is the numeric component-type code or name&lt;br /&gt;
                    See nxm.sys.inc.Units.java for a complete list.&lt;br /&gt;
                  - UNITS is the numeric units code or name&lt;br /&gt;
                    See nxm.sys.inc.Units.java for a complete list.&lt;br /&gt;
    COMPONENTS  Short-hand component set using = (NAME/FORMAT/TYPE/UNITS,...)&lt;br /&gt;
    RF          Reference Frame can be &amp;quot;ECR&amp;quot;, &amp;quot;ECI&amp;quot;, &amp;quot;TOP&amp;quot;, or &amp;quot;TOPOCENT&amp;quot;.&lt;br /&gt;
                Anything else is considered to be a file describing a&lt;br /&gt;
                custom reference frame.&lt;br /&gt;
    FR          Frame of Reference (alias for RF= for X-Midas compatibility)&lt;br /&gt;
    QUADWORD(i) Quadword Value:&lt;br /&gt;
                  QUADWORD(0)  - Reference frame      (set via RF=)&lt;br /&gt;
                  QUADWORD(1)  - Altitude&lt;br /&gt;
                  QUADWORD(2)  - Latitude&lt;br /&gt;
                  QUADWORD(3)  - Longitude&lt;br /&gt;
                  QUADWORD(4)  - Azimuth&lt;br /&gt;
                  QUADWORD(5)  - Elevation&lt;br /&gt;
                  QUADWORD(6)  - Roll&lt;br /&gt;
                  QUADWORD(7)  - unused&lt;br /&gt;
                  QUADWORD(8)  - unused&lt;br /&gt;
                  QUADWORD(9)  - Epoch Year           (set using TIMEX command)&lt;br /&gt;
                  QUADWORD(10) - Epoch Sec of Year    (set using TIMEX command)&lt;br /&gt;
                  QUADWORD(11) - Epoch GHA (radians)  (set using TIMEX command)&lt;br /&gt;
    QW(i)       One-based version of QUADWORD(..) for X-Midas compatibility&lt;br /&gt;
                where QW(i)=QUADWORD(i-1).&lt;br /&gt;
&lt;br /&gt;
  The /DETACH switch will flag the header as being detached. This header can&lt;br /&gt;
  then be attached to a foreign file to make it a Midas viewable file (if&lt;br /&gt;
  structure is correct - see ATTACH).&lt;br /&gt;
&lt;br /&gt;
  Using the /DETACH switch has the same effect as using the filename qualifier&lt;br /&gt;
  DETACHED=1. See examples below. Note the results of using different values&lt;br /&gt;
  for the DETACHED filename qualifier:&lt;br /&gt;
&lt;br /&gt;
    DETACHED=0 =&amp;gt; header is not detached&lt;br /&gt;
    DETACHED=1 =&amp;gt; header is detached and *.det file will be in the same&lt;br /&gt;
                  directory as *.tmp file&lt;br /&gt;
    DETACHED=&amp;lt;N&amp;gt; where N is between 1 and 127 =&amp;gt;*.det file found in AUX=&amp;lt;N&amp;gt;&lt;br /&gt;
                 (X-Midas only)&lt;br /&gt;
    DETACHED=&amp;lt;ext&amp;gt; where &amp;lt;ext&amp;gt; is a file name extension =&amp;gt;*.&amp;lt;ext&amp;gt; file found in&lt;br /&gt;
                   same directory as *.tmp file (NeXtMidas only)&lt;br /&gt;
&lt;br /&gt;
    NOTE: DETACHED=1 and DETACHED=TRUE are not the same as the second one&lt;br /&gt;
          creates a *.true file rather than *.tmp.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
  1. To change the frame size of a 2000 file to 2048:&lt;br /&gt;
       nM&amp;gt; HEADERMOD MYFILE FS=2K&lt;br /&gt;
&lt;br /&gt;
  2. To change the type to 5009 and the name and units code of the 2nd component&lt;br /&gt;
       nM&amp;gt; HEADERMOD MYFILE TYPE=5009 C(2)=(TDOA,,,1)&lt;br /&gt;
&lt;br /&gt;
  3. To create a non-homogeneous Type 3000 file with a 16-byte ASCII field&lt;br /&gt;
     &amp;quot;LABL&amp;quot; followed by double precision fields &amp;quot;ABSC&amp;quot; and &amp;quot;ORD&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; HEADERMOD/CREATE file SR=(LABL/2A,ABSC/SD,ORD/SD)&lt;br /&gt;
&lt;br /&gt;
     Here the offsets are computed automatically but they may also be&lt;br /&gt;
     user-specified.  If formats are not specified they are defaulted to SF.&lt;br /&gt;
     To create the same file &amp;quot;the hard way&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; HEADERMOD/CREATE file TYPE=3000 FORM=NH NSR=3 RL=32 &amp;amp;&lt;br /&gt;
                            SR(1)=(LABL,2A,0) &amp;amp;&lt;br /&gt;
                            SR(2)=(ABSC,SD,16) &amp;amp;&lt;br /&gt;
                            SR(3)=(ORD,SD,24)&lt;br /&gt;
&lt;br /&gt;
  4. To create a file as described in example 3, but with a detached header:&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; HEADERMOD/CREATE/DETACH file SR=(LABL/2A,ABSC/SD,ORD/SD)&lt;br /&gt;
&lt;br /&gt;
       Note that this has the same effect as using the filename qualifier&lt;br /&gt;
       DETACHED=1:&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; HEADERMOD/CREATE file DETACHED=1 SR=(LABL/2A,ABSC/SD,ORD/SD)&lt;br /&gt;
&lt;br /&gt;
  5. To create a non-homogeneous Type 5000 file with a 16-byte ASCII field&lt;br /&gt;
     &amp;quot;NAME&amp;quot; followed by VectorDouble &amp;quot;POS&amp;quot; (similar to the cities.prm file):&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; HEADERMOD/CREATE file COMPONENTS=(NAME/2A,POS/VD/GEODETIC/DISTANCE_M)&lt;br /&gt;
&lt;br /&gt;
Switches:&lt;br /&gt;
  /ATTACH - Attach a detached header to a Midas file&lt;br /&gt;
  /CREATE - Create the file from scratch&lt;br /&gt;
  /DETACH - Flags the header as being detached (since NeXtMidas 3.1.3)&lt;br /&gt;
  /VIEW   - Dumps a BLUE file header to the terminal, useful for i/o debugging.&lt;br /&gt;
            Does now work with VAX files. (Since NeXtMidas 1.9.2)&lt;br /&gt;
&lt;br /&gt;
See Also: STATUS, nxm.sys.inc.Units, nxm.sys.lib.DataFile&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:NXM_Explain]]&lt;/div&gt;</summary>
		<author><name>ConvertBot</name></author>
		
	</entry>
</feed>