JPL GNSS Products
Loading...
Searching...
No Matches
quaternions format
GENERAL REMARKS
---------------
This describes the quaternions file format, containing attitude quaternions as  
a time series.

The ASCII file contains an arbitrary number of lines with white space 
delimited fields. Suggested file extension is '.quat'.

Any line starting with a "#" is ignored and considered a comment.
# E.g. This is a comment line.

Comments may also occur at the end of lines, from the first occurrence of a "#"
character onwards.

Data in GipsyX quaternion files *must* be strictly ordered in time. That is, 
records for all objects at a particular time must be contiguous; within a 
"time-block" objects can be in any order, although it will be natural to sort 
first by time, and then by name. A GipsyX pos_goa file containing quaternions 
can be trivially converted to a dedicated quaternions file under e.g. *NIX using 
something like the following (depending on your version of awk):

awk '{ sep=""; 
       for(i=1; i<=4; i++){printf("%s%s",sep,$i); sep=OFS}; 
       for(i=17;i<=20;i++){printf("%s%s",sep,$i)}; 
       printf("\n")}' <my.pos> > <my.quat>

IMPORTANT NOTE: in this document, we refer to an epoch we call J2000GPS.
* J2000GPS is distinct from the epoch J2000.0, which the IAU 1994 Resolution 
  C7 recommends be defined at the geocenter and at the date 2000 January 1.5 
  Terrestrial Time(TT), where TT = TDT.
* J2000GPS is also distinct from the date 2000 January 1.5 UTC time, which we
  can refer to as J2000UTC. Exactly 13 leap seconds separate these epochs, i.e.: 
      J2000GPS = J2000UTC - 13 = 2000-01-01 11:59:47.000 UTC
* Times before and after J2000GPS are described in GPS seconds around this epoch, 
  i.e. continuous time.

EXAMPLE (in practice, this should all be on one line)
-------
E GPS23 403261200 0.000000000000000E+00 
4.213090921042242E-02 1.449777480113355E-01 7.188055942732944E-01 -6.786198911851030E-01

FIELD NUMBERS AND DESCRIPTIONS
------------------------------
Fields 0-7 are REQUIRED.

0   Typically E or I for Earth-Fixed or Inertial respectively.
    Note that nothing inherently limits this to a single character in order to 
    allow for more descriptive or exact coordinate systems.
1   Name of object (satellite, station, ??? ); white-space is not allowed in 
    the name. 
2   Integer (t_i) seconds past J2000GPS. To get GPS seconds past GPS week 0 
    second 0, ( 6-JAN-1980 00:00:00.0000), add 630763200; we assume this is a 
    signed int in C++.  
3   Float seconds (t_f) past t_i, double for C++.
4   Unit attitude quaternion, scalar component
5   Unit attitude quaternion vector, i component
6   Unit attitude quaternion vector, j component
7   Unit attitude quaternion vector, k component

All lines with the same name, field 1, must be time ordered.

Time past J2000GPS = t_i + t_f. This time representation can have femto-second 
accuracy for 68 years from J2000GPS (2**31/86400/365 ~= 68.09, i.e. good for 
68 years to 1 second from J2000GPS). If you do not need this precision, you 
could of course set t_i = 0 and write t_f as double seconds past J2000GPS, as 
it currently is in many software sets.

If q0 + q1i + q2j + q3k is any quaternion (Q), then q0 is called its scalar
part and q1i + q2j + q3k is called its vector part. This quaternion should
transform a vector in the satellite body-fixed coordinate system (Vbfs) to a
vector in the coordinate system identified in field 0 (Vs):

    Vs = R.Vbfs

where R is a rotation matrix derived from Q - see Quaternion::toRotationMatrix()

See also
Quaternions for a C++ reader/interpolator.
pos_goa format which may also contain a time series of quaternions. To produce the quaternions file format, see example above for how to pick off the appropriate columns of GipsyX pos_goa file that contains quaternions.
Note
The IGS ORBEX format for GNSS orbit attitude will have identical numeric values for quaternions for "E" and in the same order except for BlockIIR satellites where the IGS interchanges the XY body fixed axes relative to the manufacturer convention and GipsyX does not. Although lenghty, ORBEX is not nearly as clear as the draft format DRAFT ORBEX.