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.
|
#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) |
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:
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:
To generate navigation files the process would be as per observation files, with the following steps:
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:
To obtain satellite ephemeris data from RINEX navigation files the process would be similar:
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.
RINEX label identifiers defined for each RINEX file header record.
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.
ver | the RINEX version to be generated |
plogger | a 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.
ver | the 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.
ver | the RINEX version to be generated. (V210, V302, TBD) |
prg | the program used to create the RINEX file |
rby | who executed the program (run by) |
plogger | a 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.
ver | the RINEX version to be generated. (V210, V302, TBD) |
prg | the program used to create the RINEX file |
rby | who executed the program (run by) |
RinexData::~RinexData | ( | void | ) |
Destructor.
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:
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.
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.
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.
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).
weeks | the week number (from 01/06/1980) |
secs | the seconds from the beginning of the week |
bias | the receiver clock offset applied to epoch and observables (if any) |
eFlag | the epoch flag stating the kind of data associted to this epoch (observables, special events, ...) |
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:
Values returned in parameters are undefined when method returns false.
rl | the label identifier of the RINEX header record/line data to be extracted |
a | is the GNSS week number |
b | is the GNSS time of week (TOW) |
c | is the time system |
error | message 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:
Values returned in parameters are undefined when method returns false.
rl | the label identifier of the RINEX header record/line data to be extracted |
a | is the label identifier in the position following the comment |
b | the comment contents |
index | the position of the comment in the sequence of COMMENT records in the header. |
error | message 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:
Values returned in parameters are undefined when method returns false.
rl | the label identifier of the RINEX header record/line data to be extracted |
a | the system the satellite prn belongs |
b | the prn number of the satellite |
c | the number of observables for each observable type |
index | the position in the sequence of PRN / # OF OBS records to get. |
error | message 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:
Values returned in parameters are undefined when method returns false.
rl | the label identifier of the RINEX header record/line data to be extracted |
a | meaning depends on the label identifier |
b | meaning depends on the label identifier |
c | meaning depends on the label identifier |
index | the position in the sequence of records the one to be extracted |
error | message 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:
Values returned in parameters are undefined when method returns false.
rl | the label identifier of the RINEX header record/line data to be extracted |
a | the system the satellite prn belongs |
b | the observable code |
c | the North (fixed station) or X coordinate in body-fixed coordinate system (vehicle) |
d | the East (fixed station) or Y coordinate in body-fixed coordinate system (vehicle) |
e | the Up (fixed station) or Z coordinate in body-fixed coordinate system (vehicle) |
error | message 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:
Values returned in parameters are undefined when method returns false.
rl | the label identifier of the RINEX header record/line data to be extracted |
a | the system the satellite prn belongs |
b | the program name used to apply corrections |
c | the source of corrections |
index | the position in the sequence of SYS / DCBS APPLIED records to get. |
error | message 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:
Values returned in parameters are undefined when method returns false.
rl | the label identifier of the RINEX header record/line data to be extracted |
a | the system identification: G (GPS), R (GLONASS), S (SBAS), E (Galileo) |
b | a vector with identifiers for each observable type (C1C, L1C, D1C, S1C...) contained in epoch data for this system |
index | the position in the sequence of "# / TYPES OF OBSERV" or "SYS / # / OBS TYPES" records to get |
error | message 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:
Values returned in parameters are undefined when method returns false.
rl | the label identifier of the RINEX header record/line data to be extracted |
a | meaning depends on the label identifier |
error | message 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:
Values returned in parameters are undefined when method returns false.
rl | the label identifier of the RINEX header record/line data to be extracted |
a | meaning depends on the label identifier |
b | meaning depends on the label identifier |
c | meaning depends on the label identifier |
error | message 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:
Values returned in parameters are undefined when method returns false.
rl | the label identifier of the RINEX header record/line data to be extracted |
a | meaning depends on the label identifier |
b | meaning depends on the label identifier |
c | meaning depends on the label identifier |
error | message 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:
Values returned in parameters are undefined when method returns false.
rl | the label identifier of the RINEX header record/line data to be extracted |
a | meaning depends on the label identifier |
error | message 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:
Values returned in parameters are undefined when method returns false.
rl | the label identifier of the RINEX header record/line data to be extracted |
a | the wave length factor for L1 |
b | the wave length factor for L2 |
index | the position in the sequence of "WAVELENGTH FACT L1/2" records to get |
error | message 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:
Values returned in parameters are undefined when method returns false.
rl | the label identifier of the RINEX header record/line data to be extracted |
a | meaning depends on the label identifier |
error | message 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:
Values returned in parameters are undefined when method returns false.
rl | the label identifier of the RINEX header record/line data to be extracted |
a | meaning depends on the label identifier |
b | meaning depends on the label identifier |
error | message 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:
Values returned in parameters are undefined when method returns false.
rl | the label identifier of the RINEX header record/line data to be extracted |
a | meaning depends on the label identifier |
b | meaning depends on the label identifier |
c | meaning depends on the label identifier |
error | message 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:
Values returned in parameters are undefined when method returns false.
rl | the label identifier of the RINEX header record/line data to be extracted |
a | the correction type (GAL=Galileo ai0 � ai2; GPSA=GPS alpha0 - alpha3; GPSB=GPS beta0 - beta3) |
b | the iono parameter values |
index | the position in the sequence of iono corrections records to get |
error | message 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:
Values returned in parameters are undefined when method returns false.
a | correction type |
b | a0 coefficient of 1-deg polynomial |
c | a1 coefficient of 1-deg polynomial |
d | reference time for polynomial (Seconds into GPS/GAL week) |
e | reference week number (GPS/GAL week, continuous number) |
f | sbas (EGNOS, WAAS, or MSAS) |
g | UTC Identifier |
index | the position in the sequence of time corrections records to get |
error | message 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.
sys | the satellite system identifier (G,E,R, ...) |
sat | the satellite PRN the navigation data belongs |
tTag | the time tag for the navigation data |
bo | the broadcast orbit data with the eight lines of RINEX navigation data with four parameters each |
index | the position in the sequence of epoch records to get |
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.
prefix | the file name prefix as 4-character station name designator |
suffix | the file name las char in the extension (N by default) |
country | the 3-char ISO 3166-1 country code, or "---" by default |
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.
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.
sys | the system identification (G, S, ...) the measurement belongs |
sat | the satellite PRN the measurement belongs |
obsType | the type of observable/measurement (C1C, L1C, D1C, ...) as per RINEX V3.01 |
value | the value of the measurement |
lol | the loss o lock indicator. See RINEX V2.10 |
strg | the signal strength. See RINEX V3.01 |
tTag | the time tag for the epoch this measurement belongs |
index | the position in the sequence of opoch observables to extract |
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.
prefix | : the file name prefix |
country | the 3-char ISO 3166-1 country code, or "---" if parameter not given |
string RinexData::idTOlbl | ( | RINEXlabel | id | ) |
idTOlbl gives the label name corresponding to the label identifier passed
id | the label identifier to search in the table of label identifications |
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).
label | the label name to search in the table of label identifications |
string RinexData::obsV2toV3 | ( | const string & | obsTypeName | ) |
obsV2toV3 provides the observable type name in V3 of a given V2 name
obsTypeName | the given observable type in V210 format |
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.
out | the already open print file where RINEX epoch will be printed |
error | message string when epoch cannot be printed |
void RinexData::printNavHeader | ( | FILE * | out | ) |
printNavHeader prints RINEX navigation file header using the current RINEX data.
out | The already open print file where RINEX header will be printed |
error | message 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.
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.
out | The 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:
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.
out | the already open print stream where RINEX epoch data will be printed |
error | message 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.
out | the already open print stream where RINEX header will be printed |
error | message string when header cannot be printed |
Before printing, set and verify VERSION 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.
input | the already open print stream where RINEX epoch will be read |
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.
input | the already open print stream where RINEX epoch will be read |
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).
input | the already open print stream where RINEX header will be 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.
sys | the satellite system identifier (G,E,R, ...) |
sat | the satellite PRN the navigation data belongs |
tTag | the time tag for the navigation data |
bo | the broadcast orbit data with the eight lines of RINEX navigation data with four parameters each |
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.
sys | the system identification (G, S, ...) the measurement belongs |
sat | the satellite PRN the measurement belongs |
obsType | the type of observable/measurement (C1C, L1C, D1C, ...) as per RINEX V3.01 |
value | the value of the measurement |
lol | the loss o lock indicator. See RINEX V2.10 |
strg | the signal strength. See RINEX V3.01 |
tTag | the time tag for the epoch this measurement belongs |
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)
weeks | theweek number (from 01/06/1980) |
secs | the seconds from the beginning of the week |
bias | the receiver clock offset applied to epoch and observables (if any). By default is 0 sec. |
eFlag | the epoch flag stating the kind of data associted to this epoch (observables, special events, ...). By default is 0. |
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:
selSat | the 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. |
selObs | the 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 |
bool RinexData::setHdLnData | ( | RINEXlabel | rl | ) |
setHdLnData sets data values for RINEX file header records.
The label identifier values in this overload can be:
rl | the label identifier of the RINEX header record/line data values are for |
error | message 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:
rl | the label identifier of the RINEX header record/line data values are for |
a | is the label identifier stating the position for comment insertion |
b | the comment to be inserted |
error | message 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:
rl | the label identifier of the RINEX header record/line data values are for |
a | the system the prn satellite belongs |
b | the prn number of the satellite |
c | a vector with the number of observables for each observable type |
error | message 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:
rl | the label identifier of the RINEX header record/line data values are for |
a | the system identifier |
b | a factor to divide stored observables before use (1,10,100,1000) |
c | the list of observable types involved. If vector is empty, all observable types are involved |
error | message 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:
rl | the label identifier of the RINEX header record/line data values are for |
a | the system identifier |
b | the observable code |
c | the North (fixed station) or X coordinate in body-fixed coordinate system (vehicle) |
d | the East (fixed station) or Y coordinate in body-fixed coordinate system (vehicle) |
e | the Up (fixed station) or Z coordinate in body-fixed coordinate system (vehicle) |
error | message 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:
rl | the label identifier of the RINEX header record/line data values are for |
a | the system (G/R/E/S) observable belongs |
b | the program name used to apply corrections |
c | the source of corrections |
error | message 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:
Note that arguments use notation according to RINEX V302 for system identification and observable types.
rl | the label identifier of the RINEX header record/line data values are for |
a | the system identification: G (GPS), R (GLONASS), S (SBAS), E (Galileo) |
b | a vector with identifiers for each observable type (C1C, L1C, D1C, S1C...) contained in epoch data for this system |
error | message 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:
rl | the label identifier of the RINEX header record/line data values are for |
a | meaning depends on the label identifier |
b | meaning depends on the label identifier |
c | meaning depends on the label identifier |
error | message 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:
rl | the label identifier of the RINEX header record/line data values are for |
a | meaning depends on the label identifier |
b | meaning depends on the label identifier |
error | message 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:
rl | the label identifier of the RINEX header record/line data values are for |
a | the wave length factor for L1 |
b | the wave length factor for L2 |
c | vector with the identification (system + PRNs) of a satellite in each element the factor will apply |
error | message 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:
rl | the label identifier of the RINEX header record/line data values are for |
a | meaning depends on the label identifier |
b | meaning depends on the label identifier |
c | meaning depends on the label identifier |
error | message 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:
rl | the label identifier of the RINEX header record/line data values are for |
a | the correction type (GAL=Galileo ai0 � ai2; GPSA=GPS alpha0 - alpha3; GPSB=GPS beta0 - beta3) |
b | the array with the four iono parameters |
error | message 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:
rl | the label identifier of the RINEX header record/line data values are for |
a | the correction type (GAL=Galileo ai0 � ai2; GPSA=GPS alpha0 - alpha3; GPSB=GPS beta0 - beta3) |
b | a0 coefficient of 1-deg polynomial |
b | a0 coefficient of 1-deg polynomial |
c | a1 coefficient of 1-deg polynomial |
d | reference time for polynomial (Seconds into GPS/GAL week) |
e | reference week number (GPS/GAL week, continuous number) |
f | sbas (EGNOS, WAAS, or MSAS) |
g | UTC Identifier |
error | message when the label identifier value does not match the allowed params for this overload |