RXtoRINEX  V2.1
RXtoRINEX provides tools to collect data from GPS / GNSS receivers in mobile devices, convert them to RINEX or RTK formats, and process RINEX files.
Classes | Public Types | Public Member Functions | List of all members
RinexData Class Reference

#include <RinexData.h>

Public Types

enum  RINEXversion { V210 = 0, V302, VALL, VTBD }
 RINEX versions known in the current implementation of this class. More...
 
enum  RINEXlabel {
  VERSION = 0, RUNBY, COMM, MRKNAME,
  MRKNUMBER, MRKTYPE, AGENCY, RECEIVER,
  ANTTYPE, APPXYZ, ANTHEN, ANTXYZ,
  ANTPHC, ANTBS, ANTZDAZI, ANTZDXYZ,
  COFM, WVLEN, TOBS, SYS,
  SIGU, INT, TOFO, TOLO,
  CLKOFFS, DCBS, PCVS, SCALE,
  PHSH, GLSLT, LEAP, SATS,
  PRNOBS, IONA, IONB, DUTC,
  IONC, TIMC, EOH, INFILEVER,
  NOLABEL, DONTMATCH, LASTONE
}
 RINEX label identifiers defined for each RINEX file header record. More...
 

Public Member Functions

 RinexData (RINEXversion ver, Logger *plogger)
 
 RinexData (RINEXversion ver)
 
 RinexData (RINEXversion ver, string prg, string rby, Logger *plogger)
 
 RinexData (RINEXversion ver, string prg, string rby)
 
 ~RinexData (void)
 
bool setHdLnData (RINEXlabel rl)
 
bool setHdLnData (RINEXlabel rl, RINEXlabel a, const string &b)
 
bool setHdLnData (RINEXlabel rl, char a, int b, const vector< int > &c)
 
bool setHdLnData (RINEXlabel rl, char a, int b, const vector< string > &c)
 
bool setHdLnData (RINEXlabel rl, char a, const string &b, double c, double d, double e)
 
bool setHdLnData (RINEXlabel rl, char a, const string &b, const string &c)
 
bool setHdLnData (RINEXlabel rl, char a, const vector< string > &b)
 
bool setHdLnData (RINEXlabel rl, double a, double b=0.0, double c=0.0)
 
bool setHdLnData (RINEXlabel rl, int a, int b=0)
 
bool setHdLnData (RINEXlabel rl, int a, int b, const vector< string > &c)
 
bool setHdLnData (RINEXlabel rl, const string &a, const string &b=string(), const string &c=string())
 
bool setHdLnData (RINEXlabel rl, const string &a, const vector< double > &b)
 
bool setHdLnData (RINEXlabel rl, const string &a, double b, double c, int d, int e, const string &f, int g)
 
bool getHdLnData (RINEXlabel rl, int &a, double &b, string &c)
 
bool getHdLnData (RINEXlabel rl, RINEXlabel &a, string &b, unsigned int index=0)
 
bool getHdLnData (RINEXlabel rl, char &a, int &b, vector< int > &c, unsigned int index=0)
 
bool getHdLnData (RINEXlabel rl, char &a, int &b, vector< string > &c, unsigned int index=0)
 
bool getHdLnData (RINEXlabel rl, char &a, string &b, double &c, double &d, double &e)
 
bool getHdLnData (RINEXlabel rl, char &a, string &b, string &c, unsigned int index=0)
 
bool getHdLnData (RINEXlabel rl, char &a, vector< string > &b, unsigned int index=0)
 
bool getHdLnData (RINEXlabel rl, double &a)
 
bool getHdLnData (RINEXlabel rl, double &a, char &b, char &c)
 
bool getHdLnData (RINEXlabel rl, double &a, double &b, double &c)
 
bool getHdLnData (RINEXlabel rl, int &a)
 
bool getHdLnData (RINEXlabel rl, int &a, int &b, unsigned int index=0)
 
bool getHdLnData (RINEXlabel rl, string &a)
 
bool getHdLnData (RINEXlabel rl, string &a, string &b)
 
bool getHdLnData (RINEXlabel rl, string &a, string &b, string &c)
 
bool getHdLnData (RINEXlabel rl, string &a, vector< double > &b, unsigned int index=0)
 
bool getHdLnData (RINEXlabel rl, string &a, double &b, double &c, int &d, int &e, string &f, int &g, unsigned int index=0)
 
RINEXlabel lblTOid (string label)
 
string idTOlbl (RINEXlabel id)
 
RINEXlabel get1stLabelId ()
 
RINEXlabel getNextLabelId ()
 
void clearHeaderData ()
 
string obsV2toV3 (const string &)
 
double setEpochTime (int weeks, double secs, double bias=0.0, int eFlag=0)
 
bool saveObsData (char sys, int sat, string obsType, double value, int lol, int strg, double tTag)
 
double getEpochTime (int &weeks, double &secs, double &bias, int &eFlag)
 
bool getObsData (char &sys, int &sat, string &obsType, double &value, int &lol, int &strg, double &tTag, unsigned int index=0)
 
bool setFilter (vector< string > selSat, vector< string > selObs)
 
bool filterObsData ()
 
void clearObsData ()
 
bool saveNavData (char sys, int sat, double bo[8][4], double tTag)
 
bool getNavData (char &sys, int &sat, double(&bo)[8][4], double &tTag, unsigned int index=0)
 
bool filterNavData ()
 
void clearNavData ()
 
string getObsFileName (string prefix, string country="---")
 
string getNavFileName (string prefix, char suffix= 'N', string country="---")
 
void printObsHeader (FILE *out)
 
void printObsEpoch (FILE *out)
 
void printObsEOF (FILE *out)
 
void printNavHeader (FILE *out)
 
void printNavEpoch (FILE *out)
 
RINEXlabel readRinexHeader (FILE *input)
 
int readObsEpoch (FILE *input)
 
int readNavEpoch (FILE *input)
 

Detailed Description

RinexData class defines a data container for the RINEX file header records, epoch observables, and satellite navigation ephemeris.

The class provides methods to store RINEX data and set parameters in the container, and to print RINEX files.

Also it includes methods to read existing RINEX files, to store their data in the container, and to access them.

A detailed definition of the RINEX format can be found in the document "RINEX: The Receiver Independent Exchange Format Version 2.10" from Werner Gurtner; Astronomical Institute; University of Berne. Also an updated document exists for Version 3.01.

The usual way to use this class for generating a RINEX observation file would be:

  1. Create a RinexData object stating at least the version to be generated.
  2. Set data for the RINEX header records. Note that some records are obligatory, and therefore shall have data before printing the header. Data to header records can be provided directly using the setHdLnData methods.
  3. Print the header of the RINEX file to be generated using the printObsHeader method.
  4. Set observation data for the epoch to be printed using setEpochTime first and saveObsData repeatedly for each system/satellite/observable for this epoch.
  5. Print the RINEX epoch data using the printObsEpoch method.
  6. Repeat former steps 4 & 5 while epoch data exist.

Alternatively input data can be obtained from another RINEX observation file. In this case:

When it is necessary to print a special event epoch in the epochs processing cycle, already existing header records data shall be cleared before processing any special event epoch having header records, that is, special events having flag values 2, 3, 4 or 5. The reason is that when printing such events, after the epoch line they are printed all header line records having data. In sumary, to process a special event it will be encessary to perform the following steps:

  1. clearHeaderData before setting any setting of header record data. It is assumed that before doing this step RINEX headers have been printed.
  2. setHdLnData for all records to be included in the special event.
  3. setEpochTime stating the event flag value for the epoch to be printed.
  4. printObsEpoch to print RINEX epoch data.

To generate navigation files the process would be as per observation files, with the following steps:

  1. Create a RinexData object stating at least the version to be generated.
  2. Depending on version to be generated, it could be necessary to select using setFilter the unique system whose navigation data will be printed.
  3. Set data for the RINEX header records as per above.
  4. Print the header of the RINEX file to be generated using the printNavHeader method.
  5. Set navigation data for the epoch to be printed using setEpochTime first and saveNavData repeatedly for each system/satellite for this epoch
  6. Print the RINEX epoch data using the printNavEpoch method.
  7. Repeat steps 5 & 6 while epoch data exist.

As per above case, input data can be obtained from another RINEX navigation file. In this case:

Note that in RINEX V3.01 a navigation file can include ephemeris from several navigation systems, but in V2.10 a navigation file can include data for only one system. This is the reason to provide to the class data on the system to be printed using the setFilter method, when a V2.10 navigation file would be generated.

This class can be used to obtain data from existing RINEX observation files, the usual process would be:

  1. Create a RinexData object
  2. Use method readRinexHeader to read from the existing input RINEX file header records data. They are stored into the RinexData object.
  3. Get needed data from the RINEX header records read using getHdLnData methods.
  4. Use method readObsEpoch to read an epoch data from the input RINEX observation file.
  5. Get needed observation data from this epoch using getObsData
  6. Repeat former two steps while epoch data exist.

To obtain satellite ephemeris data from RINEX navigation files the process would be similar:

  1. Create a RinexData object
  2. Use method readRinexHeader to read from the input RINEX file header records data and store them into the RinexData object.
  3. Get needed data from the RINEX header records read using getHdLnData methods.
  4. Use method readNavEpoch to read a satellite epoch data from the input RINEX navigation file.
  5. Get needed navigation data from this epoch using getNavData
  6. Repeat former two steps while epoch data exist.

Finally, the class provides the possibility to filter observation or navigation data stored into a class object using methods to:

This class uses the Logger class defined also in this package.

Member Enumeration Documentation

RINEX label identifiers defined for each RINEX file header record.

Enumerator
VERSION 

"RINEX VERSION / TYPE" (System can be: in V210=G,R,S,T,M; in V302=G,R,E,S,M)

RUNBY 

"PGM / RUN BY / DATE" (All versions)

COMM 

"COMMENT" (All versions)

MRKNAME 

"MARKER NAME" (All versions)

MRKNUMBER 

"MARKER NUMBER" (All versions)

MRKTYPE 

"MARKER TYPE" (All versions)

AGENCY 

"OBSERVER / AGENCY" (All versions)

RECEIVER 

"REC # / TYPE / VERS" (All versions)

ANTTYPE 

"ANT # / TYPE" (All versions)

APPXYZ 

"APPROX POSITION XYZ" (All versions)

ANTHEN 

"ANTENNA: DELTA H/E/N" (All versions)

ANTXYZ 

"ANTENNA: DELTA X/Y/Z" (in version V302)

ANTPHC 

"ANTENNA: PHASECENTER" (in version V302)

ANTBS 

"ANTENNA: B.SIGHT XYZ" (in version V302)

ANTZDAZI 

"ANTENNA: ZERODIR AZI" (in version V302)

ANTZDXYZ 

"ANTENNA: ZERODIR XYZ" (in version V302)

COFM 

"CENTER OF MASS XYZ" (in version V302)

WVLEN 

"WAVELENGTH FACT L1/2" (in version V210)

TOBS 

"# / TYPES OF OBSERV" (in version V210)

SYS 

"SYS / # / OBS TYPES" (in version V302)

SIGU 

"SIGNAL STRENGTH UNIT" (in version V302)

INT 

"INTERVAL" (All versions)

TOFO 

"TIME OF FIRST OBS" (All versions)

TOLO 

"TIME OF LAST OBS" (All versions)

CLKOFFS 

"RCV CLOCK OFFS APPL" (All versions)

DCBS 

"SYS / DCBS APPLIED" (in version V302)

PCVS 

"SYS / PCVS APPLIED" (in version V302)

SCALE 

"SYS / SCALE FACTOR" (in version V302)

PHSH 

"SYS / PHASE SHIFTS" (in version V302)

GLSLT 

"GLONASS SLOT / FRQ #" (in version V302)

LEAP 

"LEAP SECONDS" (All versions)

SATS 

"# OF SATELLITES" (All versions)

PRNOBS 

"PRN / # OF OBS" (All versions)

IONA 

"ION ALPHA" (in GPS NAV version V210)

IONB 

"ION BETA" (in GPS NAV version V210)

DUTC 

"DELTA-UTC: A0,A1,T,W" (in GPS NAV version V210)

IONC 

"IONOSPHERIC CORR" (in GNSS NAV version V302)

TIMC 

"TIME SYSTEM CORR" (in GNSS NAV version V302)

EOH 

"END OF HEADER" PSEUDOLABELS:

INFILEVER 

To access VERSION data read from an input file.

NOLABEL 

No lable detected (to manage error messages)

DONTMATCH 

Label do not match with RINEX version (to manage error messages)

LASTONE 

Las item: last RINEXlabel. Also EOF found when reading.

RINEX versions known in the current implementation of this class.

Enumerator
V210 

RINEX version V2.10.

V302 

RINEX version V3.02.

VALL 

for features applicable to all versions

VTBD 

To Be Defined version.

Constructor & Destructor Documentation

RinexData::RinexData ( RINEXversion  ver,
Logger plogger 
)

RinexData constructor providing the RINEX file version to be generated and the Logger for logging messages.

Version parameter is needed in the header record RINEX VERSION / TYPE, which is mandatory in any RINEX file. Note that version affects the header records that must / can be printed in the RINEX header, and the format of epoch observation data.

A VTBD in version means that it will be defined in a further step of the process.

Parameters
verthe RINEX version to be generated
ploggera pointer to a Logger to be used to record logging messages
RinexData::RinexData ( RINEXversion  ver)

RinexData constructor providing only the minimum data required: the RINEX file version to be generated.

Version parameter is needed in the header record RINEX VERSION / TYPE, which is mandatory in any RINEX file. Note that version affects the header records that must / can be printed in the RINEX header, and the format of epoch observation data.

A VTBD in version means that it will be defined in a further step of the process.

Logging data are sent to the stderr.

Parameters
verthe RINEX version to be generated
RinexData::RinexData ( RINEXversion  ver,
string  prg,
string  rby,
Logger plogger 
)

RinexData constructor providing data on RINEX version to be generated, the program being used, who is running the program, and the Logger for logging messages.

Version parameter is needed in the header record RINEX VERSION / TYPE, which is mandatory in any RINEX file. Note that version affects the header records that must / can be printed in the RINEX header, and the format of epoch observation data.

A VTBD in version means that it will be defined in a further step of the process.

Also data is passed for the recod PGM / RUN BY / DATE.

Parameters
verthe RINEX version to be generated. (V210, V302, TBD)
prgthe program used to create the RINEX file
rbywho executed the program (run by)
ploggera pointer to a Logger to be used to record logging messages
RinexData::RinexData ( RINEXversion  ver,
string  prg,
string  rby 
)

RinexData constructor providing data on RINEX version to be generated, the program being used, and who is running the program.

Version parameter is needed in the header record RINEX VERSION / TYPE, which is mandatory in any RINEX file. Note that version affects the header records that must / can be printed in the RINEX header, and the format of epoch observation data.

A VTBD in version means that it will be defined in a further step of the process.

Also data is passed for the recod PGM / RUN BY / DATE.

Logging data are sent to the stderr.

Parameters
verthe RINEX version to be generated. (V210, V302, TBD)
prgthe program used to create the RINEX file
rbywho executed the program (run by)
RinexData::~RinexData ( void  )

Destructor.

Member Function Documentation

void RinexData::clearHeaderData ( )

clearHeaderData sets RINEX header state as "empty" for all its records (except EOH).

Header records data shall be cleared before processing any spacial event epoch with header records, that is, special events having flag values 2, 3, 4 or 5. The reason is that when printing such events, after the epoch line they are printed all header line records having data.

In sumary, to process special event it will be encessary to perform the following steps:

  1. clearHeaderData before setting any setting of header record data. It is assumed the before doing this step RINEX headers have been printed
  2. setHdLnData for all records to be included in the special event
  3. setEpochTime stating the event flag value for the epoch to be printed
  4. printObsEpoch to print RINEX epoch data
void RinexData::clearNavData ( )

clearNavData clears all epoch navigation data on satellites and ephemeris previously saved.

void RinexData::clearObsData ( )

clearObsData clears all epoch observation data on satellites and observables previously saved.

bool RinexData::filterNavData ( )

filterNavData if filtering data have been stated using setFilter method, removes from current epoch data on system or satellites not selected.

Returns
true when it remains any epoch data after filtering, false when no data remain
bool RinexData::filterObsData ( )

filterObsData if filtering data have been stated using setFilter method, removes from current epoch observation data on systems, satellites or observables not selected.

Returns
true when it remains any epoch data after filtering, false when no data remain
RinexData::RINEXlabel RinexData::get1stLabelId ( )

get1stLabelId gives the first label identifier of the first record in the RINEX header having data (should be VERSION).

A cursor is set to this first label to allow subsequent get operation.

The get1stLabelId and getNextLabelId are useful to iterate over the header records having data set. Iteration would finish when the RINEXlabel value returned is EOH or LASTONE.

Returns
the label identifier of the first record having data, or LASTONE when all records are empty
double RinexData::getEpochTime ( int &  weeks,
double &  secs,
double &  bias,
int &  eFlag 
)

getEpochTime gets epoch time (week number, time of week), clock offset and event flag from the current epoch data.

It also returns the GPS epoch time in seconds from the GPS ephemeris (6/1/1980).

Flag values can be (see RINEX documents): 0: OK, 1: power failure between previous and current epoch, or >1: Special event.

Special events can be: 2: start moving antenna, 3: new site occupation (end of kinem. data, at least MARKER NAME record follows), 4: header information follows, 5: external event (epoch is significant, same time frame as observation time tags).

Parameters
weeksthe week number (from 01/06/1980)
secsthe seconds from the beginning of the week
biasthe receiver clock offset applied to epoch and observables (if any)
eFlagthe epoch flag stating the kind of data associted to this epoch (observables, special events, ...)
Returns
the GPS time in seconds from the GPS ephemeris (6/1/1980)
bool RinexData::getHdLnData ( RINEXlabel  rl,
int &  a,
double &  b,
string &  c 
)

getHdLnData gets data values related to line header records previously stored in the class object

The label identifier values in this overload can be:

  • TOFO: to get the epoch week and TOW of the fist observation time.
  • TOLO: to get the epoch week and TOW of the last observation time.

Values returned in parameters are undefined when method returns false.

Parameters
rlthe label identifier of the RINEX header record/line data to be extracted
ais the GNSS week number
bis the GNSS time of week (TOW)
cis the time system
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getHdLnData ( RINEXlabel  rl,
RINEXlabel a,
string &  b,
unsigned int  index = 0 
)

getHdLnData gets data values related to line header records previously stored in the class object

The label identifier values in this overload can be:

  • COMM to get from RINEX header the index-nd COMMENT data.

Values returned in parameters are undefined when method returns false.

Parameters
rlthe label identifier of the RINEX header record/line data to be extracted
ais the label identifier in the position following the comment
bthe comment contents
indexthe position of the comment in the sequence of COMMENT records in the header.
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getHdLnData ( RINEXlabel  rl,
char &  a,
int &  b,
vector< int > &  c,
unsigned int  index = 0 
)

getHdLnData gets data values related to line header records previously stored in the class object

The label identifier values in this overload can be:

  • PRNOBS to get from RINEX header the record data in index position of PRN / # OF OBS records.

Values returned in parameters are undefined when method returns false.

Parameters
rlthe label identifier of the RINEX header record/line data to be extracted
athe system the satellite prn belongs
bthe prn number of the satellite
cthe number of observables for each observable type
indexthe position in the sequence of PRN / # OF OBS records to get.
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getHdLnData ( RINEXlabel  rl,
char &  a,
int &  b,
vector< string > &  c,
unsigned int  index = 0 
)

getHdLnData gets data values related to line header records previously stored in the class object

The label identifier values in this overload can be:

  • SCALE to get from RINEX header data the scale factor in index position of SYS / SCALE FACTOR records. Param a is the system this scale factor has been applied, param b is a factor to divide stored observables with (1,10,100,1000), and param c is the list of observable types involved. If vector is empty, all observable types are involved. Param index is the position in the sequence of SYS / SCALE FACTOR records to get.
  • WVLEN to get an optional WAVELENGTH FACT L1/2 record in position index in the sequence of WAVELENGTH FACT L1/2 records. Param a and b are the wave length factor for L1 and L2 respectively. Param c is a vector with satellite number (system + PRNs), and param index is the position in the sequence of WAVELENGTH FACT L1/2 records to get. Shall be >0 because the first position is for default values.

Values returned in parameters are undefined when method returns false.

Parameters
rlthe label identifier of the RINEX header record/line data to be extracted
ameaning depends on the label identifier
bmeaning depends on the label identifier
cmeaning depends on the label identifier
indexthe position in the sequence of records the one to be extracted
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getHdLnData ( RINEXlabel  rl,
char &  a,
string &  b,
double &  c,
double &  d,
double &  e 
)

getHdLnData gets data values related to line header records previously stored in the class object

The label identifier values in this overload can be:

  • ANTPHC to get from RINEX header the average phase center position w/r to antenna reference point, which are included in ANTENNA: PHASECENTER. record.

Values returned in parameters are undefined when method returns false.

Parameters
rlthe label identifier of the RINEX header record/line data to be extracted
athe system the satellite prn belongs
bthe observable code
cthe North (fixed station) or X coordinate in body-fixed coordinate system (vehicle)
dthe East (fixed station) or Y coordinate in body-fixed coordinate system (vehicle)
ethe Up (fixed station) or Z coordinate in body-fixed coordinate system (vehicle)
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getHdLnData ( RINEXlabel  rl,
char &  a,
string &  b,
string &  c,
unsigned int  index = 0 
)

getHdLnData gets data values related to line header records previously stored in the class object

The label identifier values in this overload can be:

  • DCBS to get from RINEX header the record data in index position of SYS / DCBS APPLIED records.

Values returned in parameters are undefined when method returns false.

Parameters
rlthe label identifier of the RINEX header record/line data to be extracted
athe system the satellite prn belongs
bthe program name used to apply corrections
cthe source of corrections
indexthe position in the sequence of SYS / DCBS APPLIED records to get.
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getHdLnData ( RINEXlabel  rl,
char &  a,
vector< string > &  b,
unsigned int  index = 0 
)

getHdLnData gets data values related to line header records previously stored in the class object

The label identifier values in this overload can be:

  • SYS to get data from the given system from "SYS / # / OBS TYPES" records
  • TOBS to get data from the given system from "# / TYPES OF OBSERV" records

Values returned in parameters are undefined when method returns false.

Parameters
rlthe label identifier of the RINEX header record/line data to be extracted
athe system identification: G (GPS), R (GLONASS), S (SBAS), E (Galileo)
ba vector with identifiers for each observable type (C1C, L1C, D1C, S1C...) contained in epoch data for this system
indexthe position in the sequence of "# / TYPES OF OBSERV" or "SYS / # / OBS TYPES" records to get
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getHdLnData ( RINEXlabel  rl,
double &  a 
)

getHdLnData gets data values related to line header records previously stored in the class object

The label identifier values in this overload can be:

  • ANTZDAZI to get the azimuth of the zero-direction of a fixed antenna (degrees, from north). Data from record ANTENNA: ZERODIR AZI. Param a is the value of azimuth of the zero-direction.
  • INT to get from RINEX header the time interval of GPS measurements. Param a is the value of the time interval in seconds.

Values returned in parameters are undefined when method returns false.

Parameters
rlthe label identifier of the RINEX header record/line data to be extracted
ameaning depends on the label identifier
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getHdLnData ( RINEXlabel  rl,
double &  a,
char &  b,
char &  c 
)

getHdLnData gets data values related to line header records previously stored in the class object.

The label identifier values in this overload can be:

  • VERSION to get the version (param a), file type (param b) and system type (param c) data from record RINEX VERSION / TYPE.
  • INFILEVER to get the input file version (param a), file type (param b) and system type (param c) data read from an input RINEX file.

Values returned in parameters are undefined when method returns false.

Parameters
rlthe label identifier of the RINEX header record/line data to be extracted
ameaning depends on the label identifier
bmeaning depends on the label identifier
cmeaning depends on the label identifier
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getHdLnData ( RINEXlabel  rl,
double &  a,
double &  b,
double &  c 
)

getHdLnData gets data values related to line header records previously stored in the class object

The label identifier values in this overload can be:

  • ANTHEN: to get antenna data from record "ANTENNA: DELTA H/E/N" Param a is the antenna height (height of the antenna reference point (ARP) above the marker), param b is the antenna horizontal eccentricity of ARP relative to the marker east, and param c is the antenna horizontal eccentricity of ARP relative to the marker north.
  • APPXYZ: to get APROX POSITION record data. Params a, b and c are respectively the X, Y and Z coordinates of the position.
  • ANTXYZ: to get the position of antenna reference point for antenna on vehicle (m) from record ANTENNA: DELTA X/Y/Z. Params a, b and c are respectively the X, Y and Z coordinates in body-fixed coordinate system.
  • ANTBS: to set in RINEX header the direction of the �vertical� antenna axis towards the GNSS satellites. Data to be included in record ANTENNA: B.SIGHT XYZ. Params a, b and c are respectively the X, Y and Z coordinates in body-fixed coordinate system.
  • ANTZDXYZ: to set in RINEX header the zero-direction of antenna antenna on vehicle. Data to be included in record ANTENNA: ZERODIR XYZ. Params a, b and c are respectively the X, Y and Z coordinates in body-fixed coordinate system.
  • COFM: to set in RINEX header the current center of mass (X,Y,Z, meters) of vehicle in body-fixed coordinate system. Data to be included in record CENTER OF MASS: XYZ. Params a, b and c are respectively the X, Y and Z coordinates in body-fixed coordinate system.

Values returned in parameters are undefined when method returns false.

Parameters
rlthe label identifier of the RINEX header record/line data to be extracted
ameaning depends on the label identifier
bmeaning depends on the label identifier
cmeaning depends on the label identifier
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getHdLnData ( RINEXlabel  rl,
int &  a 
)

getHdLnData gets data values related to line header records previously stored in the class object

The label identifier values in this overload can be:

  • CLKOFFS: to get in RINEX header if the realtime-derived receiver clock offset is applied or not. Data from record RCV CLOCK OFFS APPL. Param a is the receiver clock applicability (1 or 0).
  • LEAP to get from RINEX header the number of leap seconds since 6-Jan-1980 as transmitted by the GPS almanac. Data from record LEAP SECONDS. Param a is the number of leap seconds.
  • SATS to get from RINEX header the number of satellites, for which observables are stored in the file. Data from record # OF SATELLITES. Param a is the number of satellites

Values returned in parameters are undefined when method returns false.

Parameters
rlthe label identifier of the RINEX header record/line data to be extracted
ameaning depends on the label identifier
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getHdLnData ( RINEXlabel  rl,
int &  a,
int &  b,
unsigned int  index = 0 
)

getHdLnData gets data values related to line header records previously stored in the class object

The label identifier values in this overload can be:

  • WVLEN: to get default WAVELENGTH FACT L1/2 record data.

Values returned in parameters are undefined when method returns false.

Parameters
rlthe label identifier of the RINEX header record/line data to be extracted
athe wave length factor for L1
bthe wave length factor for L2
indexthe position in the sequence of "WAVELENGTH FACT L1/2" records to get
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getHdLnData ( RINEXlabel  rl,
string &  a 
)

getHdLnData gets data values related to line header records previously stored in the class object

The label identifier values in this overload can be:

  • SIGU: to get from RINEX header the unit of the signal strength observables Snn (if present). Data from record SIGNAL STRENGTH UNIT. Param a is the unit of the signal strength.
  • MRKNAME to get MARKER data for the RINEX file header. Data from record MARKER NAME. Param a is the marker name.
  • MRKNUMBER to get marker data from the RINEX file header. Data from record MARKER NUMBER. Param a is the marker number.
  • MRKTYPE to get marker data from the RINEX file header. Data from record MARKER TYPE records. Param a is the marker type.

Values returned in parameters are undefined when method returns false.

Parameters
rlthe label identifier of the RINEX header record/line data to be extracted
ameaning depends on the label identifier
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getHdLnData ( RINEXlabel  rl,
string &  a,
string &  b 
)

getHdLnData gets data values related to line header records previously stored in the class object

The label identifier values in this overload can be:

  • AGENCY: to get OBSERVER / AGENCY record data of the RINEX file header. Param a is the observer name, and param b is the agency name.
  • ANTTYPE: to get antenna data from record "ANT # / TYPE". Param a is the antenna number, and param b is the antenna type.

Values returned in parameters are undefined when method returns false.

Parameters
rlthe label identifier of the RINEX header record/line data to be extracted
ameaning depends on the label identifier
bmeaning depends on the label identifier
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getHdLnData ( RINEXlabel  rl,
string &  a,
string &  b,
string &  c 
)

getHdLnData gets data values related to line header records previously stored in the class object

The label identifier values in this overload can be:

  • RECEIVER: to get GNSS receiver data from the "REC # / TYPE / VERS" obligatory record in the RINEX file header. Param a is the receiver number, param b is the receiver type, and param c is the receiver version.
  • RUNBY: to get "PGM / RUN BY / DATE" data of the RINEX file header. Param a is program used to create current file, param b is who executed the program, and param c is the date and time of file creation.

Values returned in parameters are undefined when method returns false.

Parameters
rlthe label identifier of the RINEX header record/line data to be extracted
ameaning depends on the label identifier
bmeaning depends on the label identifier
cmeaning depends on the label identifier
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getHdLnData ( RINEXlabel  rl,
string &  a,
vector< double > &  b,
unsigned int  index = 0 
)

getHdLnData gets data values related to line header records previously stored in the class object

The label identifier values in this overload can be:

  • IONC to get in RINEX GPS nav header alpha ionosphere parameters (A0-A3) of almanac. Data to be included in record ION ALPHA.

Values returned in parameters are undefined when method returns false.

Parameters
rlthe label identifier of the RINEX header record/line data to be extracted
athe correction type (GAL=Galileo ai0 � ai2; GPSA=GPS alpha0 - alpha3; GPSB=GPS beta0 - beta3)
bthe iono parameter values
indexthe position in the sequence of iono corrections records to get
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getHdLnData ( RINEXlabel  rl,
string &  a,
double &  b,
double &  c,
int &  d,
int &  e,
string &  f,
int &  g,
unsigned int  index = 0 
)

getHdLnData gets data values related to line header records previously stored in the class object

The label identifier values in this overload can be:

  • TIMC to get in RINEX GPS nav header correction parameters to transform the system time to UTC or other time systems. Data to be included in record TIME SYSTEM CORR.

Values returned in parameters are undefined when method returns false.

Parameters
acorrection type
ba0 coefficient of 1-deg polynomial
ca1 coefficient of 1-deg polynomial
dreference time for polynomial (Seconds into GPS/GAL week)
ereference week number (GPS/GAL week, continuous number)
fsbas (EGNOS, WAAS, or MSAS)
gUTC Identifier
indexthe position in the sequence of time corrections records to get
Returns
true if header values have been got, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::getNavData ( char &  sys,
int &  sat,
double(&)  bo[8][4],
double &  tTag,
unsigned int  index = 0 
)

getNavData extract from current epoch storage navigation data in the given index position.

Parameters
systhe satellite system identifier (G,E,R, ...)
satthe satellite PRN the navigation data belongs
tTagthe time tag for the navigation data
bothe broadcast orbit data with the eight lines of RINEX navigation data with four parameters each
indexthe position in the sequence of epoch records to get
Returns
true if data have been saved, false otherwise
string RinexData::getNavFileName ( string  prefix,
char  suffix = 'N',
string  country = "---" 
)

getNavFileName constructs a standard RINEX navigation file name from the given prefix and using current header data. For V2.1 RINEX file names, the given prefix and suffix parameters data are used. Additionally, for V3.02 the file name includes data from MARKER NUMBER, REC # / TYPE / VERS, TIME OF FIRST OBS and TIME OF LAST OBS, and SYS / # / OBS TYPES header records (if defin3ed) and country parameter.

Parameters
prefixthe file name prefix as 4-character station name designator
suffixthe file name las char in the extension (N by default)
countrythe 3-char ISO 3166-1 country code, or "---" by default
Returns
the RINEX GPS file name in the standard format (PRFXdddamm.yyN for v2.1, XXXXMRCCC_R_YYYYDDDHHMM_FPU_DFU_DN.RNX for v3.02)
RinexData::RINEXlabel RinexData::getNextLabelId ( )

getNextLabelId gives the label identifier of the next record in the RINEX header having data (after the one previously extracted).

A cursor is set to this label to allow subsequent get operations.

The get1stLabelId and getNextLabelId are useful to iterate over the header records having data set. Iteration would finish when the RINEXlabel value returned is EOH or LASTONE.

Returns
the label identifier of the next record having data, or LASTONE when there is not a next record having data
bool RinexData::getObsData ( char &  sys,
int &  sat,
string &  obsType,
double &  value,
int &  lol,
int &  strg,
double &  tTag,
unsigned int  index = 0 
)

getObsData extract from current epoch storage observable data in the given index position.

Parameters
systhe system identification (G, S, ...) the measurement belongs
satthe satellite PRN the measurement belongs
obsTypethe type of observable/measurement (C1C, L1C, D1C, ...) as per RINEX V3.01
valuethe value of the measurement
lolthe loss o lock indicator. See RINEX V2.10
strgthe signal strength. See RINEX V3.01
tTagthe time tag for the epoch this measurement belongs
indexthe position in the sequence of opoch observables to extract
Returns
true if data for the given index exist, false otherwise
string RinexData::getObsFileName ( string  prefix,
string  country = "---" 
)

getObsFileName constructs a standard RINEX observation file name from the given prefix and current header data. For V2.1 RINEX file names, the given prefix and the current TIME OF FIRST OBSERVATION header data are used. Additionally, for V3.02 the file name includes data from MARKER NUMBER, REC # / TYPE / VERS, TIME OF FIRST OBS and TIME OF LAST OBS, INTERVAL, and SYS / # / OBS TYPES header records (if defin3ed) and country parameter.

Parameters
prefix: the file name prefix
countrythe 3-char ISO 3166-1 country code, or "---" if parameter not given
Returns
the RINEX observation file name in the standard format (PRFXdddamm.yyO for v2.1, XXXXMRCCC_R_YYYYDDDHHMM_FPU_DFU_DO.RNX for v3.02)
string RinexData::idTOlbl ( RINEXlabel  id)

idTOlbl gives the label name corresponding to the label identifier passed

Parameters
idthe label identifier to search in the table of label identifications
Returns
the label name corresponding to the identifier passed, or an empty string if does not exist
RinexData::RINEXlabel RinexData::lblTOid ( string  label)

lblTOid gives the label identification that best matches the label name passed (may be incomplete) The label passed is searched in the table of labels. It is returned the identifier of the firts that matches the string passed (its length may be shorter than the label name).

Parameters
labelthe label name to search in the table of label identifications
Returns
the label identification corresponding to the label name passed
string RinexData::obsV2toV3 ( const string &  obsTypeName)

obsV2toV3 provides the observable type name in V3 of a given V2 name

Parameters
obsTypeNamethe given observable type in V210 format
Returns
the observable type name in V302, or an empty string if this type does not exits in V3
void RinexData::printNavEpoch ( FILE *  out)

printNavEpoch prints ephemeris data stored according version and systems selected.

If version to print is V3.01, all stored data are printed, but if version to print is V2.10 only data for the system stated in the version header record will be printed, which is the first in the list of selected systems (using setFilter method).

Ephemeris data printed are removed from the storage.

This method does not removes data from non-selected systems-satellites.

Parameters
outthe already open print file where RINEX epoch will be printed
Exceptions
errormessage string when epoch cannot be printed
void RinexData::printNavHeader ( FILE *  out)

printNavHeader prints RINEX navigation file header using the current RINEX data.

Parameters
outThe already open print file where RINEX header will be printed
Exceptions
errormessage string when header cannot be printed

Before printing, set and verify VERSION data record. Independent of the version to be printed. It is initially set as per version V3.01: file type will be 'N', and system identification the one of the system to print, or 'M' if there are data for several systems. p>Note that in RINEX V3.01 a navigation file can include ephemeris from several navigation systems, but in V2.10 a navigation file can include data for only one system. p>When version to print is V2.10 and data comes from a V3.01 file or have been set by the program, the system to be printed is usually stated using the setFilter method, but if it is not, it is assumed that the selected one is the system having observation data. In case filter was not stated and no observation data exists, the file cannot be printed and an exception is thrown.

  • When version to print is V2.10, sets file type

Finally, for each navigation header record belonging to the current version and having data defined, it is printed.

Log a warning message when the record to be printed is obligatory, but has not data.

void RinexData::printObsEOF ( FILE *  out)

printEndOfFile prints the RINEX end of file event lines.

Parameters
outThe already open print file where RINEX data will be printed
void RinexData::printObsEpoch ( FILE *  out)

printObsEpoch prints the data lines for one epoch using the current stored observation data. Its is assumed that all observation data currently stored belong to the same epoch. The process to print the current epoch data takes into account:

  • The version of the observation file to be printed, which implies to use different formats.
  • The kind of epoch data to be printed: epoch with observable data, cycle slip records, or event flag records.
  • If continuation lines shall be used or not, depending on version and amount of data to be printed

Data filtering is performed before printing (when data filters have been set).

Observation data are removed from storage after printing them, but for special event epochs their special records (header lines) are not cleared after printing them.

Parameters
outthe already open print stream where RINEX epoch data will be printed
Exceptions
errormessage string when epoch data cannot be printed due to undefined version to be printed

a macro to compute comparison expression of satellite in two consecutive observables, in iterator POSITION and (POSITION-1)

void RinexData::printObsHeader ( FILE *  out)

printObsHeader prints the RINEX observation file header using data stored for header records.

Parameters
outthe already open print stream where RINEX header will be printed
Exceptions
errormessage string when header cannot be printed

Before printing, set and verify VERSION data record:

  • Set file type for Observation.
    • Set the system identification for the one to be printed. If there are observables for several systems, set it to 'M'.
  • Depending on version to be printed, set "# / TYPES OF OBSERV" or "SYS / # / OBS TYPES" data record.

Finally, for each observation header record belonging to the current version and having data defined, print it.

Log a warning message when the record to be printed is obligatory, but has not data.

int RinexData::readNavEpoch ( FILE *  input)

readNavEpoch reads from the RINEX navigation file data and ephemeris for one setellite - epoch and store them into the RinexData object. Ephemeris storage in the RinexData object is cleared before storing new data.

Parameters
inputthe already open print stream where RINEX epoch will be read
Returns
the status of the RINEX data read, which can can be:
  • (0) EOF found. No epoch data stored.
  • (1) Epoch navigation data are well formatted. They have been stored. They belong to the current epoch
  • (2) Epoch navigation data are well formatted. They have been stored. They DO NOT belong to the current epoch
  • (3) Error in satellite system or prn. No epoch data stored.
  • (4) Error in epoch date or time format. No epoch data stored.
  • (5) Error in epoch data. No epoch data stored.
  • (9) Unknown input file version

a macro to log the given error and return

a macro to get data for broadcast orbit in LINE_I COL_J

int RinexData::readObsEpoch ( FILE *  input)

readObsEpoch reads from a RINEX observation file one epoch (data and observables) and store them into the RinexData object. Observable storage in the RinexData object is cleared before storing new data. Stored epoch time and time tags (the same for epoch and observables) are set from epoch time read.

Parameters
inputthe already open print stream where RINEX epoch will be read
Returns
the status of the RINEX data read, which can can be:
  • (0) EOF found. No epoch data stored.
  • (1) Epoch observables and data are well formatted. They have been stored.
  • (2) Epoch event data are well formatted. They have been stored, and also special records.
  • (3) Error in observable data. Epoch data stored, but wrong observables stored as empty ones (0.0)
  • (4) Error in epoch data. No epoch data stored.
  • (5) Error in new site event: there is no MARKER NAME. Other event data and special recors stored.
  • (6) Error reading special records following the epoch event. Other event data and special recors stored.
  • (7) Error in external event: the record has no date. Other event data and special recors stored.
  • (8) Error in event flag number
  • (9) Unknown input file version
RinexData::RINEXlabel RinexData::readRinexHeader ( FILE *  input)

readRinexHeader read the RINEX file header extracting its data and storing them into to the class members. As a well formed RINEX head shall terminate with the "END OF HEADER" line, the normal return for the method would be EOH. If the order of the header records is not compliant with what is stated in the RINEX definition, the error is logged. Format errors in line/record data are logged, but do not interrupt reading. It is out of the scope of this method verify data read. Process terminates when: end of header line is read, EOF is found in the input file, or they are read ten lines without label (may be a header without EOH).

Parameters
inputthe already open print stream where RINEX header will be read
Returns
EOH if end of header line is read, LASTONE if EOF is found, or NOLABEL if at least ten lines without label are read
bool RinexData::saveNavData ( char  sys,
int  sat,
double  bo[8][4],
double  tTag 
)

saveNavData stores navigation data from a given satellite into the navigation data storage. Only new epoch data are stored: tTag, system and satellite shall be different from other records already saved.

Parameters
systhe satellite system identifier (G,E,R, ...)
satthe satellite PRN the navigation data belongs
tTagthe time tag for the navigation data
bothe broadcast orbit data with the eight lines of RINEX navigation data with four parameters each
Returns
true if data have been saved, false otherwise
bool RinexData::saveObsData ( char  sys,
int  sat,
string  obsType,
double  value,
int  lol,
int  strg,
double  tTag 
)

saveObsData stores measurement data for the given observable into the epoch data storage. The given measurement data are stored only when they belong to the current epoch (same tTag as previous measurements stored) or when the epoch data storage is empty, and if the given system and observable type belong to the ones to be stored, that is, they are defined in the systems data for "SYS / # / OBS TYPES " or "# / TYPES OF OBSERV" records. Observation data are time tagged (the tTag). The usual time tag is the TOW (real or estimated) when measurement was made. For example, the time tag passed could be the TOW estimate made by the receiver before computing the solution. All measurements belonging to the same epoch shall have identical time tag. Note that true TOW is obtained when the receiver computes the position solution, providing it and/or a clock offset with the difference between the estimated and true TOW. That is: GPS time = Estimated epoch time - receiver clock offset.

Parameters
systhe system identification (G, S, ...) the measurement belongs
satthe satellite PRN the measurement belongs
obsTypethe type of observable/measurement (C1C, L1C, D1C, ...) as per RINEX V3.01
valuethe value of the measurement
lolthe loss o lock indicator. See RINEX V2.10
strgthe signal strength. See RINEX V3.01
tTagthe time tag for the epoch this measurement belongs
Returns
true if data belong to the current epoch, false otherwise
double RinexData::setEpochTime ( int  weeks,
double  secs,
double  bias = 0.0,
int  eFlag = 0 
)

setEpochTime sets epoch time to the given week number and seconds (time of week), the receiver clock bias, and the epoch flag. Flag values can be (see RINEX documents): 0: OK; 1: power failure between previous and current epoch; or >1: Special event. Special events can be: 2: start moving antenna; 3: new site occupation (end of kinem. data, at least MARKER NAME record follows); 4: header information follows; 5: external event (epoch is significant, same time frame as observation time tags)

Parameters
weekstheweek number (from 01/06/1980)
secsthe seconds from the beginning of the week
biasthe receiver clock offset applied to epoch and observables (if any). By default is 0 sec.
eFlagthe epoch flag stating the kind of data associted to this epoch (observables, special events, ...). By default is 0.
Returns
the GPS time set, in seconds from GPS ephemeris from the GPS ephemeris (6/1/1980)
bool RinexData::setFilter ( vector< string >  selSat,
vector< string >  selObs 
)

setFilter set the selected values for systems, satellites and observables to filter header, observation and navigation data. Filtering data are reset (to 'no filter') and values passed (if any) are stored and will be used to filter epoch data in the following way:

  • an empty list will be interpreted as there are not "a priori" excluded elements. For example, an empty list of satellites means that all satellites will pass the filter.
  • a non-empty list of selected satellites states the ones that will pass the filter. Data belonging to satellites not in the list will not pass the filter.
  • a non-empty list of selected observables states the ones that will pass the filter. Data belonging to other observables will not pass the filter. The filtering values set will be used by the methods filterObsData and filterNavData to remove observation and navigation data not selected from a RinexData object. The method verifies coherence of the given data with regard to what has been defined in header records:
  • a selected system shall be in the SYS / # / OBS TYPES records (or similar information for RINEX 2.10)
  • the system identifier in a selected satellite shall be also in the header system definition records
  • the system identifier in a selected observable shall be also in the header system definition records, and the observable type shall be in the list of abservables for this system Note that pure navigation RINEX header data do not allow to verify such coherence, therefore the result of such coherence analysis is not relevant when setting for filtering navigation data.
Parameters
selSatthe vector containing the list of selected systems and / or satellites. A system is identified by its assigned char (G, E, R,...). A satellite is identified by the system char followed by the prn number.
selObsthe vector containing the list of selected observables. An observable is identified by the system identification char (G, E, R, ...) followed by the observation code as defined in RINEX v3.02
Returns
true when filtering data are coherent or not filtering is requested, false when filtering data are not coherent
bool RinexData::setHdLnData ( RINEXlabel  rl)

setHdLnData sets data values for RINEX file header records.

The label identifier values in this overload can be:

  • TOFO: to set the current epoch time (week and TOW) as the fist observation time. Data to be included in record TIME OF FIRST OBS
  • TOLO: to set the current epoch time (week and TOW) as the last observation time. Data to be included in record TIME OF LAST OBS
Parameters
rlthe label identifier of the RINEX header record/line data values are for
Returns
true if header values have been set, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::setHdLnData ( RINEXlabel  rl,
RINEXlabel  a,
const string &  b 
)

setHdLnData sets data values for RINEX file header records

The label identifier values in this overload can be:

  • COMM: to set a comment record content to be inserted in the RINEX header just before a given record. The comment will be inserted before the first match of the the given record identifier in param a. If no match occurs, comment is inserted just before the "END OF HEADER" record.
Parameters
rlthe label identifier of the RINEX header record/line data values are for
ais the label identifier stating the position for comment insertion
bthe comment to be inserted
Returns
true if header values have been set, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::setHdLnData ( RINEXlabel  rl,
char  a,
int  b,
const vector< int > &  c 
)

setHdLnData sets data values for RINEX file header records

The label identifier value in this overload can be:

  • PRNOBS: to set in RINEX header data for record PRN / # OF OBS. Note that number of observables for each observation type (param c vector) shall be in the same order as per observable types for this system in the "# / TYPES OF OBSERV" or "SYS / # / OBS TYPES".
Parameters
rlthe label identifier of the RINEX header record/line data values are for
athe system the prn satellite belongs
bthe prn number of the satellite
ca vector with the number of observables for each observable type
Returns
true if header values have been set, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::setHdLnData ( RINEXlabel  rl,
char  a,
int  b,
const vector< string > &  c 
)

setHdLnData sets data values for RINEX file header records

The label identifier value in this overload can be:

  • SCALE: to set in RINEX header data for the scale factors used in the observable data. Data to be included in record SYS / SCALE FACTOR.
Parameters
rlthe label identifier of the RINEX header record/line data values are for
athe system identifier
ba factor to divide stored observables before use (1,10,100,1000)
cthe list of observable types involved. If vector is empty, all observable types are involved
Returns
true if header values have been set, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::setHdLnData ( RINEXlabel  rl,
char  a,
const string &  b,
double  c,
double  d,
double  e 
)

setHdLnData sets data values for RINEX file header records

The label identifier value in this overload can be:

  • ANTPHC: to set in RINEX header the average phase center position w/r to antenna reference point (m). Data to be included in record ANTENNA: PHASECENTER.
Parameters
rlthe label identifier of the RINEX header record/line data values are for
athe system identifier
bthe observable code
cthe North (fixed station) or X coordinate in body-fixed coordinate system (vehicle)
dthe East (fixed station) or Y coordinate in body-fixed coordinate system (vehicle)
ethe Up (fixed station) or Z coordinate in body-fixed coordinate system (vehicle)
Returns
true if header values have been set, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::setHdLnData ( RINEXlabel  rl,
char  a,
const string &  b,
const string &  c 
)

setHdLnData sets data values for RINEX file header records

The label identifier value in this overload can be:

  • DCBS: to set in RINEX header data for corrections of differential code biases (DCBS). Data to be included in record SYS / DCBS APPLIED.
Parameters
rlthe label identifier of the RINEX header record/line data values are for
athe system (G/R/E/S) observable belongs
bthe program name used to apply corrections
cthe source of corrections
Returns
true if header values have been set, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::setHdLnData ( RINEXlabel  rl,
char  a,
const vector< string > &  b 
)

setHdLnData sets data values for RINEX file header records

The label identifier values in this overload can be:

  • SYS: to set data for the given system as required in "SYS / # / OBS TYPES" records
  • TOBS: to set data for the given system as required in "# / TYPES OF OBSERV" record

Note that arguments use notation according to RINEX V302 for system identification and observable types.

Parameters
rlthe label identifier of the RINEX header record/line data values are for
athe system identification: G (GPS), R (GLONASS), S (SBAS), E (Galileo)
ba vector with identifiers for each observable type (C1C, L1C, D1C, S1C...) contained in epoch data for this system
Returns
true if header values have been set, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::setHdLnData ( RINEXlabel  rl,
double  a,
double  b = 0.0,
double  c = 0.0 
)

setHdLnData sets data values for RINEX file header records

The label identifier values in this overload can be:

  • ANTZDAZI: to set the azimuth of the zero-direction of a fixed antenna (degrees in param a, from north). Data to be included in record ANTENNA: ZERODIR AZI.
  • INT: to set in RINEX header the time interval of measurements (in param a), that is, the time interval in seconds between two consecutive epochs
  • ANTHEN: to set antenna data for record "ANTENNA: DELTA H/E/N". Param a is the height of the antenna reference point (ARP) above the marker. Param b is the antenna horizontal eccentricity of ARP relative to the marker east. Param c is the antenna horizontal eccentricity of ARP relative to the marker north.
  • APPXYZ: to set APROX POSITION record data for this RINEX file header. Params a, b an c are respectively the X, Y and Z oordinates of the position.
  • ANTXYZ: to set in RINEX header the position of antenna reference point for antenna on vehicle (m). Data to be included in record ANTENNA: DELTA X/Y/Z. Params a, b an c are respectively the X, Y and Z oordinates of the position in body-fixed coordinate system.
  • ANTBS: to set in RINEX header the direction of the �vertical� antenna axis towards the GNSS satellites. Data to be included in record ANTENNA: B.SIGHT XYZ. Params a, b an c are respectively the X, Y and Z oordinates in body-fixed coordinate system.
  • ANTZDXYZ: to set in RINEX header the zero-direction of antenna antenna on vehicle. Data to be included in record ANTENNA: ZERODIR XYZ. Params a, b an c are respectively the X, Y and Z oordinates in body-fixed coordinate system.
  • COFM: to set in RINEX header the current center of mass (X,Y,Z, meters) of vehicle in body-fixed coordinate system. Data to be included in record CENTER OF MASS: XYZ. Params a, b an c are respectively the X, Y and Z oordinates in body-fixed coordinate system.
  • VERSION : to set the RINEX version to be generated. Param a is the version to be generated: V210 if 2.0 < a, V302 if 3.0 < a, VTBD otherwise.
Parameters
rlthe label identifier of the RINEX header record/line data values are for
ameaning depends on the label identifier
bmeaning depends on the label identifier
cmeaning depends on the label identifier
Returns
true if header values have been set, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::setHdLnData ( RINEXlabel  rl,
int  a,
int  b = 0 
)

setHdLnData sets data values for RINEX file header records

The label identifier values in this overload can be:

  • CLKOFFS to set in RINEX header if the realtime-derived receiver clock offset is applied or not (value in param a). Data to be included in record RCV CLOCK OFFS APPL.
  • LEAP to set in RINEX header the number of leap seconds (value in param a) since 6-Jan-1980 as transmitted by the GPS almanac. Data to be included in record LEAP SECONDS.
  • SATS to set in RINEX header the number of satellites (value in param a) for which observables are stored in the file. Data to be included in record # OF SATELLITES.
  • WVLEN to set obligatory (in RINEX V2) default WAVELENGTH FACT L1/2 record data for the RINEX file header. Params a and b contains the wave length factor for L1 and L2 respectively.
Parameters
rlthe label identifier of the RINEX header record/line data values are for
ameaning depends on the label identifier
bmeaning depends on the label identifier
Returns
true if header values have been set, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::setHdLnData ( RINEXlabel  rl,
int  a,
int  b,
const vector< string > &  c 
)

setHdLnData sets data values for RINEX file header records

The label identifier value in this overload can be:

  • WVLEN to set optional WAVELENGTH FACT L1/2 records data for the RINEX file header. Note that those optional records are for RINEX V2.1 files only.
Parameters
rlthe label identifier of the RINEX header record/line data values are for
athe wave length factor for L1
bthe wave length factor for L2
cvector with the identification (system + PRNs) of a satellite in each element the factor will apply
Returns
true if header values have been set, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::setHdLnData ( RINEXlabel  rl,
const string &  a,
const string &  b = string(),
const string &  c = string() 
)

setHdLnData sets data values for RINEX file header records

The label identifier values in this overload can be:

  • RECEIVER: to set GNSS receiver data for the "REC # / TYPE / VERS" obligatory records in the RINEX file header. Param a is the receiver number, param b is the receiver type, and param c the receiver version.
  • AGENCY: to set OBSERVER / AGENCY record data of the RINEX file header. Param a is the observer name, and param b the agency name. Param c is ignored.
  • ANTTYPE: to set antenna data for "ANT # / TYPE" record in the RINEX file header. Param a is the antenna number, and param b the antenna type. Param c is ignored.
  • RUNBY: to set data on program and who executed it for record "PGM / RUN BY / DATE" in the RINEX file header. Param a is program used to create current file, and param b who executed the program. Param c is ignored.
  • SIGU: to set in RINEX header the unit of the signal strength observables Snn (if present). Data to be included in record SIGNAL STRENGTH UNIT. Param a is the unit of the signal strength. Params b and c are ignored.
  • MRKNAME: to set MARKER data for the RINEX file header. Data to be included in MARKER NAME Param a is the marker name. Params b and c are ignored.
  • MRKNUMBER: to set marker data for the RINEX file header. Data to be included in MARKER NUMBER Param a is the marker number. Params b and c are ignored.
  • MRKTYPE: to set marker data for the RINEX file header. Data to be included in MARKER TYPE records. Param a is the marker type. Params b and c are ignored.
  • TOFO: to set the current epoch time (week and TOW) as the fist observation time and value passed for time system. Data to be included in record "TIME OF FIRST OBS". Param a is the observation time sistem. Params b and c are ignored.
Parameters
rlthe label identifier of the RINEX header record/line data values are for
ameaning depends on the label identifier
bmeaning depends on the label identifier
cmeaning depends on the label identifier
Returns
true if header values have been set, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::setHdLnData ( RINEXlabel  rl,
const string &  a,
const vector< double > &  b 
)

setHdLnData sets data values for RINEX file header records

The label identifier value in this overload can be:

  • IONC: to set in RINEX GPS nav header alpha ionosphere parameters (A0-A3) of almanac. Data to be included in record ION ALPHA.
Parameters
rlthe label identifier of the RINEX header record/line data values are for
athe correction type (GAL=Galileo ai0 � ai2; GPSA=GPS alpha0 - alpha3; GPSB=GPS beta0 - beta3)
bthe array with the four iono parameters
Returns
true if header values have been set, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload
bool RinexData::setHdLnData ( RINEXlabel  rl,
const string &  a,
double  b,
double  c,
int  d,
int  e,
const string &  f,
int  g 
)

setHdLnData sets data values for RINEX file header records

The label identifier value in this overload can be:

  • TIMC: to set in RINEX GPS nav header correction parameters to transform the system time to UTC or other time systems. Data to be included in record TIME SYSTEM CORR
Parameters
rlthe label identifier of the RINEX header record/line data values are for
athe correction type (GAL=Galileo ai0 � ai2; GPSA=GPS alpha0 - alpha3; GPSB=GPS beta0 - beta3)
ba0 coefficient of 1-deg polynomial
ba0 coefficient of 1-deg polynomial
ca1 coefficient of 1-deg polynomial
dreference time for polynomial (Seconds into GPS/GAL week)
ereference week number (GPS/GAL week, continuous number)
fsbas (EGNOS, WAAS, or MSAS)
gUTC Identifier
Returns
true if header values have been set, false otherwise
Exceptions
errormessage when the label identifier value does not match the allowed params for this overload

The documentation for this class was generated from the following files: