Ginan
Loading...
Searching...
No Matches
rinex.hpp File Reference

RINEX file format processing and observation handling. More...

Detailed Description

RINEX file format processing and observation handling.

This file contains functions and structures for reading and processing RINEX (Receiver Independent Exchange Format) files, including observation data, navigation data, and station information. Supports both RINEX 2.x and 3.x formats with comprehensive error handling and validation.

Key features:

  • RINEX 2.x and 3.x format support
  • Observation type conversion and mapping
  • Staging pattern for robust data processing
  • Phase observation priority resolution
  • Comprehensive validation and error handling
Author
Geoscience Australia
Date
2024
Version
1.0

Data Structures

struct  CodeType
 RINEX observation code type structure. More...
 
struct  ObservationValues
 Container for parsed RINEX observation values. More...
 
struct  StagedObservation
 Staged observation data for deferred processing. More...
 
struct  ObservationKey
 Composite key for staging observation map. More...
 
struct  ValidationReport
 Comprehensive validation report for staged observations. More...
 

Functions

 BETTER_ENUM (E_EphType, short int, NONE, EPH, GEPH, SEPH, CEPH, STO, EOP, ION)
 Ephemeris type enumeration for RINEX navigation data.
 
int decodeObsDataRinex2 (std::istream &inputStream, string &line, map< E_Sys, map< int, CodeType > > &sysCodeTypes, GObs &obs, SatSys &v2SatSys, RinexStation &rnxRec)
 Decode RINEX 2.x observation data from input stream.
 
int decodeObsDataRinex3 (std::istream &inputStream, string &line, map< E_Sys, map< int, CodeType > > &sysCodeTypes, GObs &obs, RinexStation &rnxRec)
 Decode RINEX 3.x observation data from input stream.
 
int readRnx (std::istream &inputStream, char &type, ObsList &obsList, Navigation &nav, RinexStation &rnxRec, double &ver, E_Sys &sys, E_TimeSys &tsys, map< E_Sys, map< int, CodeType > > &sysCodeTypes)
 Read and parse complete RINEX file.
 
string rinexSysDesc (E_Sys sys)
 Get human-readable description of GNSS system.
 
void setstr (char *dst, const char *src, int n)
 Set string without trailing spaces.
 
void decodeObsH (std::istream &inputStream, string &line, double ver, E_TimeSys &tsys, map< E_Sys, map< int, CodeType > > &sysCodeTypes, Navigation &nav, RinexStation &rnxRec)
 Decode RINEX observation file header.
 
void decodeNavH (string &line, E_Sys sys, Navigation &nav)
 Decode RINEX navigation file header.
 
void decodeGnavH (string &line, Navigation &nav)
 Decode GLONASS navigation file header.
 
void decodeHnavH (string &line, Navigation &nav)
 Decode SBAS/Geostationary navigation file header.
 
int readRnxH (std::istream &inputStream, double &ver, char &type, E_Sys &sys, E_TimeSys &tsys, map< E_Sys, map< int, CodeType > > &sysCodeTypes, Navigation &nav, RinexStation &rnxRec)
 Read RINEX file header section.
 
int decodeObsEpoch (std::istream &inputStream, string &line, double ver, E_TimeSys tsys, GTime &time, int &flag, vector< SatSys > &sats)
 Decode observation epoch header information.
 
int readRnxObsB (std::istream &inputStream, double ver, E_TimeSys tsys, map< E_Sys, map< int, CodeType > > &sysCodeTypes, int &flag, ObsList &obsList, RinexStation &rnxRec)
 Read RINEX observation data body section.
 
int readRnxObs (std::istream &inputStream, double ver, E_TimeSys tsys, map< E_Sys, map< int, CodeType > > &sysCodeTypes, ObsList &obsList, RinexStation &rnxRec)
 Read complete RINEX observation file.
 
int decodeEph (double ver, SatSys Sat, GTime toc, vector< double > &data, Eph &eph)
 Decode GPS/Galileo/QZS/BeiDou ephemeris parameters.
 
int decodeGeph (double ver, SatSys Sat, GTime toc, vector< double > &data, Geph &geph)
 Decode GLONASS ephemeris parameters.
 
int decodeSeph (double ver, SatSys Sat, GTime toc, vector< double > &data, Seph &seph)
 Decode SBAS/geostationary satellite ephemeris.
 
int decodeCeph (double ver, SatSys Sat, E_NavMsgType type, GTime toc, vector< double > &data, Ceph &ceph)
 Decode CNVX (Civil Navigation) ephemeris parameters.
 
int decodeSto (double ver, SatSys Sat, E_NavMsgType type, GTime toc, vector< double > &data, STO &sto)
 Decode System Time Offset (STO) message.
 
int decodeEop (double ver, SatSys Sat, E_NavMsgType type, GTime toc, vector< double > &data, EOP &eop)
 Decode Earth Orientation Parameters (EOP) message.
 
int decodeIon (double ver, SatSys Sat, E_NavMsgType type, GTime toc, vector< double > &data, ION &ion)
 Decode ionospheric parameters (ION) message.
 
int readRnxNavB (std::istream &inputStream, double ver, E_Sys sys, E_EphType &type, Eph &eph, Geph &geph, Seph &seph, Ceph &ceph, STO &sto, EOP &eop, ION &ion)
 Read RINEX navigation data body section.
 
int readRnxNav (std::istream &inputStream, double ver, E_Sys sys, Navigation &nav)
 Read complete RINEX navigation file.
 
int readRnxClk (std::istream &inputStream, double ver, Navigation &nav)
 Read RINEX clock file.
 
template<typename SigList >
RawSigfindOrCreateSignal (SigList &sigList, E_ObsCode obsCode)
 Find existing signal or create new one in signal list.
 
ObservationValues parseObservationValues (char *buff, int position)
 Parse observation values from RINEX formatted text buffer.
 
void assignObservationValue (RawSig &signal, char observationType, double value, double lli)
 Assign parsed observation value to appropriate signal field.
 
std::ostream & operator<< (std::ostream &os, const ObservationKey &key)
 Stream output operator for ObservationKey.
 
void stageObservation (ObservationStaging &staging, char obsType, E_ObsCode obsCode, E_FType frequency, double value, double lli)
 Stage regular observation for deferred processing.
 
void commitStagedObservations (const ObservationStaging &staging, GObs &obs, const map< E_ObsCode2, E_ObsCode > &codeMap)
 Commit all staged observations to final structure.
 
bool validateStagedObservations (const ObservationStaging &staging, const SatSys &satellite)
 Validate staged observations before commitment.
 
void resolveObservationConflicts (ObservationStaging &staging)
 Resolve conflicts in staged observations.
 
ValidationReport validateStagedObservationsDetailed (ObservationStaging &staging, const SatSys &satellite)
 Comprehensive validation with detailed reporting.
 
void stagePhaseObservation (ObservationStaging &staging, char obsType, const vector< E_ObsCode > &priorityCodes, E_FType frequency, double value, double lli)
 Stage phase observation with priority-based code resolution.
 

Typedefs

using ObservationStaging = std::map<ObservationKey, StagedObservation>
 Type alias for observation staging container.
 

Typedef Documentation

◆ ObservationStaging

Type alias for observation staging container.

Function Documentation

◆ assignObservationValue()

void assignObservationValue ( RawSig & signal,
char observationType,
double value,
double lli )

Assign parsed observation value to appropriate signal field.

Routes observation values to correct RawSig field based on observation type. Provides type-safe assignment with validation to prevent data corruption.

Parameters
signalReference to RawSig structure to modify
observationTypeSingle character observation type ('C', 'L', 'P', 'D', 'S')
valueNumerical observation value to assign
lliLoss of Lock Indicator (used only for phase observations)
Note
Only assigns non-zero values to prevent overwriting existing data
LLI assignment limited to phase ('L') observations

Assign parsed observation value to appropriate signal field.

Routes observation values to the correct field in a RawSig structure based on the observation type character. Implements type-safe assignment with validation to prevent data corruption.

Observation type mapping:

  • 'C', 'P': Pseudorange/code observations -> signal.P
  • 'L': Carrier phase observations -> signal.L (with LLI)
  • 'D': Doppler observations -> signal.D
  • 'S': Signal-to-noise ratio -> signal.snr
Parameters
signalReference to RawSig structure to modify
observationTypeSingle character observation type identifier
valueNumerical observation value to assign
lliLoss of Lock Indicator (only used for phase observations)
Note
Only assigns non-zero values to prevent overwriting existing data
LLI is only assigned for phase ('L') observations
Here is the caller graph for this function:

◆ BETTER_ENUM()

BETTER_ENUM ( E_EphType ,
short int ,
NONE ,
EPH ,
GEPH ,
SEPH ,
CEPH ,
STO ,
EOP ,
ION  )

Ephemeris type enumeration for RINEX navigation data.

Defines the various types of ephemeris and auxiliary data that can be found in RINEX navigation files. Used for parsing and processing navigation messages from different GNSS systems.

Note
Values correspond to RINEX navigation message types

◆ commitStagedObservations()

void commitStagedObservations ( const ObservationStaging & staging,
GObs & obs,
const map< E_ObsCode2, E_ObsCode > & codeMap )

Commit all staged observations to final structure.

Processes staged observations with two-pass algorithm: commit code observations first to establish available codes, then resolve and commit phase observations using priority-based code selection.

Parameters
stagingContainer of staged observations to process
obsReference to output GObs structure to populate
codeMapRINEX 2->3 code conversion map (for reference)
Note
Phase resolution depends on code observations being processed first
Extensive debug logging for troubleshooting priority resolution

Commit all staged observations to final structure.

Processes all staged observations and transfers them to the final GObs structure. Implements sophisticated two-pass algorithm for phase observation priority resolution:

Pass 1: Commit code observations and track available codes

  • Process all non-phase observations (C, P, D, S types)
  • Build set of available observation codes
  • Create RawSig entries in appropriate frequency lists

Pass 2: Resolve and commit phase observations

  • For each phase observation with priority array
  • Find first available code from priority list
  • Fallback to first priority if none available
  • Commit resolved phase observation
Parameters
stagingContainer of staged observations to process
obsReference to output GObs structure to populate
codeMapRINEX 2->3 code conversion map (for reference, not used in current impl)
Note
Phase resolution depends on code observations being processed first
Extensive debug logging for troubleshooting priority resolution
Creates RawSig entries using findOrCreateSignal() helper
See also
findOrCreateSignal(), assignObservationValue()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decodeCeph()

int decodeCeph ( double ver,
SatSys Sat,
E_NavMsgType type,
GTime toc,
vector< double > & data,
Ceph & ceph )

Decode CNVX (Civil Navigation) ephemeris parameters.

Processes ephemeris data from civil navigation messages for modernized GNSS signals with enhanced accuracy and integrity.

Parameters
verRINEX version number
SatSatellite identifier
typeNavigation message type
tocTime of clock reference epoch
dataVector of CNVX navigation parameters
cephOutput CNVX ephemeris structure
Returns
int Processing status (1 = success, 0 = error)
Parameters
verRINEX version
SatSatellite ID
typeNavigation message type
tocTime of clock
dataData to decode
cephCNVX ephemeris
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decodeEop()

int decodeEop ( double ver,
SatSys Sat,
E_NavMsgType type,
GTime toc,
vector< double > & data,
EOP & eop )

Decode Earth Orientation Parameters (EOP) message.

Processes Earth orientation parameters for precise coordinate transformations.

Parameters
verRINEX version number
SatReference satellite system
typeNavigation message type
tocReference time epoch
dataVector of EOP parameters
eopOutput Earth orientation parameters
Returns
int Processing status (1 = success, 0 = error)
Here is the caller graph for this function:

◆ decodeEph()

int decodeEph ( double ver,
SatSys Sat,
GTime toc,
vector< double > & data,
Eph & eph )

Decode GPS/Galileo/QZS/BeiDou ephemeris parameters.

Parses Keplerian orbital elements from RINEX navigation data and converts to standardized ephemeris structure.

Parameters
verRINEX version number
SatSatellite system identifier
tocTime of clock reference epoch
dataVector of decoded navigation parameters
ephOutput ephemeris structure
Returns
int Processing status (1 = success, 0 = error)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decodeGeph()

int decodeGeph ( double ver,
SatSys Sat,
GTime toc,
vector< double > & data,
Geph & geph )

Decode GLONASS ephemeris parameters.

Parses GLONASS navigation message parameters using FDMA orbital representation with position/velocity state vectors.

Parameters
verRINEX version number
SatGLONASS satellite identifier
tocTime of clock reference epoch
dataVector of GLONASS navigation parameters
gephOutput GLONASS ephemeris structure
Returns
int Processing status (1 = success, 0 = error)
Parameters
verRINEX version
SatSatellite ID
tocTime of clock
dataData to decode
gephGlonass ephemeris
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decodeGnavH()

void decodeGnavH ( string & line,
Navigation & nav )

Decode GLONASS navigation file header.

Processes header lines specific to GLONASS navigation files, including system time corrections and GLONASS-specific parameters.

Parameters
lineHeader line to decode
navNavigation data structure to populate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decodeHnavH()

void decodeHnavH ( string & line,
Navigation & nav )

Decode SBAS/Geostationary navigation file header.

Processes header lines specific to SBAS and geostationary satellite navigation files with unique orbital parameters.

Parameters
lineHeader line to decode
navNavigation data structure to populate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decodeIon()

int decodeIon ( double ver,
SatSys Sat,
E_NavMsgType type,
GTime toc,
vector< double > & data,
ION & ion )

Decode ionospheric parameters (ION) message.

Processes ionospheric delay model parameters for single-frequency correction.

Parameters
verRINEX version number
SatReference satellite system
typeNavigation message type
tocReference time epoch
dataVector of ionospheric model parameters
ionOutput ionospheric parameters
Returns
int Processing status (1 = success, 0 = error)
Here is the caller graph for this function:

◆ decodeNavH()

void decodeNavH ( string & line,
E_Sys sys,
Navigation & nav )

Decode RINEX navigation file header.

Parses header lines from RINEX navigation files, extracting ionospheric parameters, time system corrections, and other auxiliary navigation data.

Parameters
lineHeader line to decode
sysGNSS system identifier (GPS, GLO, GAL, BDS, etc.)
navNavigation data structure to populate
Parameters
lineLine to decode
sysGNSS system
navNavigation data
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decodeObsDataRinex2()

int decodeObsDataRinex2 ( std::istream & inputStream,
string & line,
map< E_Sys, map< int, CodeType > > & sysCodeTypes,
GObs & obs,
SatSys & v2SatSys,
RinexStation & rnxRec )

Decode RINEX 2.x observation data from input stream.

Processes observation data lines from RINEX 2.x format files. Handles satellite identification from epoch header and maps observation types using system-specific code type configurations.

Parameters
inputStreamInput stream containing RINEX data
lineCurrent observation data line to process
sysCodeTypesSystem-specific observation code type mappings
obsOutput observation structure to populate
v2SatSysSatellite system identifier from RINEX 2 epoch header
rnxRecRINEX station information and configuration
Returns
int Processing status (1 = success, 0 = failure)
Note
RINEX 2 satellite ID comes from epoch header, not observation line
See also
decodeObsDataRinex3() for RINEX 3.x equivalent

Decode RINEX 2.x observation data from input stream.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decodeObsDataRinex3()

int decodeObsDataRinex3 ( std::istream & inputStream,
string & line,
map< E_Sys, map< int, CodeType > > & sysCodeTypes,
GObs & obs,
RinexStation & rnxRec )

Decode RINEX 3.x observation data from input stream.

Processes observation data lines from RINEX 3.x format files. Extracts satellite identification from observation line and uses staging pattern for robust data processing and validation.

Parameters
inputStreamInput stream containing RINEX data
lineCurrent observation data line to process
sysCodeTypesSystem-specific observation code type mappings
obsOutput observation structure to populate
rnxRecRINEX station information and configuration
Returns
int Processing status (1 = success, 0 = failure)
Note
RINEX 3 satellite ID is embedded in each observation line
Uses staging pattern for conflict detection and resolution
See also
decodeObsDataRinex2() for RINEX 2.x equivalent

Decode RINEX 3.x observation data from input stream.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decodeObsEpoch()

int decodeObsEpoch ( std::istream & inputStream,
string & line,
double ver,
E_TimeSys tsys,
GTime & time,
int & flag,
vector< SatSys > & sats )

Decode observation epoch header information.

Parses epoch header lines to extract time stamps, epoch flags, and satellite lists. Handles both RINEX 2.x and 3.x epoch formats.

Parameters
inputStreamInput stream for reading continuation lines
lineCurrent epoch header line
verRINEX version number
tsysTime system for time stamp interpretation
timeOutput time stamp for this epoch
flagOutput epoch flag (0=OK, 1=power failure, etc.)
satsOutput vector of satellites in this epoch
Returns
int Number of satellites in epoch, or negative for error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decodeObsH()

void decodeObsH ( std::istream & inputStream,
string & line,
double ver,
E_TimeSys & tsys,
map< E_Sys, map< int, CodeType > > & sysCodeTypes,
Navigation & nav,
RinexStation & rnxRec )

Decode RINEX observation file header.

Parses header lines from RINEX observation files, extracting station information, observation types, antenna details, and system-specific configurations.

Parameters
inputStreamInput stream containing RINEX header data
lineCurrent header line being processed
verRINEX version number (2.x or 3.x)
tsysTime system used in file (GPS, UTC, etc.)
sysCodeTypesOutput map of observation code types by system
navNavigation data structure (for ionospheric parameters)
rnxRecOutput structure for station information and metadata
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decodeSeph()

int decodeSeph ( double ver,
SatSys Sat,
GTime toc,
vector< double > & data,
Seph & seph )

Decode SBAS/geostationary satellite ephemeris.

Parses ephemeris parameters for SBAS satellites using simplified geostationary orbital models.

Parameters
verRINEX version number
SatSBAS satellite identifier
tocTime of clock reference epoch
dataVector of SBAS navigation parameters
sephOutput SBAS ephemeris structure
Returns
int Processing status (1 = success, 0 = error)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decodeSto()

int decodeSto ( double ver,
SatSys Sat,
E_NavMsgType type,
GTime toc,
vector< double > & data,
STO & sto )

Decode System Time Offset (STO) message.

Processes system time offset parameters for inter-system time conversions.

Parameters
verRINEX version number
SatReference satellite system
typeNavigation message type
tocReference time epoch
dataVector of STO parameters
stoOutput system time offset structure
Returns
int Processing status (1 = success, 0 = error)
Here is the caller graph for this function:

◆ findOrCreateSignal()

template<typename SigList >
RawSig * findOrCreateSignal ( SigList & sigList,
E_ObsCode obsCode )

Find existing signal or create new one in signal list.

Template function that searches for a signal with matching observation code in the provided signal list. Creates and appends a new signal if not found.

Template Parameters
SigListType of signal list container (e.g., std::vector<RawSig>)
Parameters
sigListReference to signal list to search/modify
obsCodeObservation code to find or create
Returns
RawSig* Pointer to existing or newly created signal
Note
Template design allows use with different signal list types
Always returns valid pointer - creates new entry if needed
Here is the caller graph for this function:

◆ operator<<()

std::ostream & operator<< ( std::ostream & os,
const ObservationKey & key )
inline

Stream output operator for ObservationKey.

Enables logging and debugging output for ObservationKey structures. Formats key components in human-readable form.

Parameters
osOutput stream reference
keyObservationKey to output
Returns
std::ostream& Reference to output stream for chaining

◆ parseObservationValues()

ObservationValues parseObservationValues ( char * buff,
int position )

Parse observation values from RINEX formatted text buffer.

Extracts numerical observation value and Loss of Lock Indicator from RINEX formatted line at specified position with comprehensive bounds checking.

Parameters
buffCharacter buffer containing RINEX observation line
positionStarting position in buffer (0-based index)
Returns
ObservationValues Structure containing parsed value and LLI
Note
RINEX format: 14 chars value + 1 char LLI + 1 char signal strength
Returns zeros if parsing fails or position is out of bounds

Parse observation values from RINEX formatted text buffer.

Extracts numerical observation value and Loss of Lock Indicator from a RINEX formatted line at the specified position. Includes comprehensive bounds checking and error handling for malformed input data.

RINEX observation format:

  • 14 characters: observation value (right-justified, decimal point optional)
  • 1 character: Loss of Lock Indicator (0-3)
  • 1 character: Signal strength (optional, not currently processed)
Parameters
buffCharacter buffer containing RINEX observation line
positionStarting position in buffer (0-based index)
Returns
ObservationValues Structure containing parsed value and LLI Returns zeros if parsing fails or position is out of bounds
Note
Includes debug output for development/troubleshooting
LLI bits are masked to extract only relevant flags (bits 0-1)
Warning
Function assumes RINEX standard 16-character field width
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readRnx()

int readRnx ( std::istream & inputStream,
char & type,
ObsList & obsList,
Navigation & nav,
RinexStation & rnxRec,
double & ver,
E_Sys & sys,
E_TimeSys & tsys,
map< E_Sys, map< int, CodeType > > & sysCodeTypes )

Read and parse complete RINEX file.

Main entry point for RINEX file processing. Automatically detects file type (observation, navigation, etc.) and version, then dispatches to appropriate processing functions.

Parameters
inputStreamInput stream containing RINEX file data
typeOutput parameter for detected file type ('O', 'N', 'G', etc.)
obsListOutput list of parsed observations
navOutput navigation data structure
rnxRecOutput station information and metadata
verOutput RINEX version number
sysOutput primary GNSS system
tsysOutput time system used in file
sysCodeTypesOutput observation code type mappings by system
Returns
int Processing status (positive = success, negative = error)
Note
Automatically handles both RINEX 2.x and 3.x formats
File type detection is based on header information
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readRnxClk()

int readRnxClk ( std::istream & inputStream,
double ver,
Navigation & nav )

Read RINEX clock file.

Processes RINEX clock files containing high-precision satellite and station clock corrections.

Parameters
inputStreamInput stream containing clock file data
verRINEX version number
navNavigation data structure for clock corrections
Returns
int Processing status (positive = records, negative = error)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readRnxH()

int readRnxH ( std::istream & inputStream,
double & ver,
char & type,
E_Sys & sys,
E_TimeSys & tsys,
map< E_Sys, map< int, CodeType > > & sysCodeTypes,
Navigation & nav,
RinexStation & rnxRec )

Read RINEX file header section.

Reads and parses the complete header section with automatic file type and version detection.

Parameters
inputStreamInput stream containing RINEX file data
verOutput RINEX version number
typeOutput file type character ('O', 'N', 'G', etc.)
sysOutput primary GNSS system
tsysOutput time system
sysCodeTypesOutput observation code type mappings
navNavigation data structure
rnxRecStation information structure
Returns
int Processing status (0 = success, negative = error)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readRnxNav()

int readRnxNav ( std::istream & inputStream,
double ver,
E_Sys sys,
Navigation & nav )

Read complete RINEX navigation file.

Processes complete navigation files including GPS, GLONASS, Galileo, BeiDou, and mixed-constellation files.

Parameters
inputStreamInput stream containing navigation file
verRINEX version number
sysPrimary GNSS system
navOutput navigation data structure
Returns
int Processing status (positive = records, negative = error)
Parameters
inputStreamInput stream to read
verRINEX version
sysSatellite system
navNavigation object
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readRnxNavB()

int readRnxNavB ( std::istream & inputStream,
double ver,
E_Sys sys,
E_EphType & type,
Eph & eph,
Geph & geph,
Seph & seph,
Ceph & ceph,
STO & sto,
EOP & eop,
ION & ion )

Read RINEX navigation data body section.

Parses navigation file data section with automatic message type detection and dispatching to appropriate decoders.

Parameters
inputStreamInput stream containing navigation data
verRINEX version number
sysPrimary GNSS system
typeOutput ephemeris type detected
ephOutput GPS/GAL/QZS/BDS ephemeris
gephOutput GLONASS ephemeris
sephOutput SBAS ephemeris
cephOutput CNVX ephemeris
stoOutput system time offset
eopOutput Earth orientation parameters
ionOutput ionospheric parameters
Returns
int Processing status (1 = success, 0 = end, negative = error)
Parameters
inputStreamInput stream to read
verRINEX version
sysSatellite system
typeEphemeris type (output)
ephGPS Ephemeris
gephGlonass ephemeris
sephGeo ephemeris
cephCNVX ephemeris
stoSystem time offset data
eopEOP data
ionIonosphere data
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readRnxObs()

int readRnxObs ( std::istream & inputStream,
double ver,
E_TimeSys tsys,
map< E_Sys, map< int, CodeType > > & sysCodeTypes,
ObsList & obsList,
RinexStation & rnxRec )

Read complete RINEX observation file.

Main entry point for processing RINEX observation files with header and data section coordination.

Parameters
inputStreamInput stream containing complete observation file
verRINEX version number
tsysTime system used in file
sysCodeTypesObservation code type mappings
obsListOutput list of all parsed observations
rnxRecStation information and metadata
Returns
int Processing status (positive = success, negative = error)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readRnxObsB()

int readRnxObsB ( std::istream & inputStream,
double ver,
E_TimeSys tsys,
map< E_Sys, map< int, CodeType > > & sysCodeTypes,
int & flag,
ObsList & obsList,
RinexStation & rnxRec )

Read RINEX observation data body section.

Processes observation epochs and individual satellite observations with data validation and error recovery.

Parameters
inputStreamInput stream containing observation data
verRINEX version number
tsysTime system
sysCodeTypesObservation code type mappings
flagOutput epoch flag from last processed epoch
obsListOutput list of parsed observations
rnxRecStation information and configuration
Returns
int Number of epochs processed, or negative for error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resolveObservationConflicts()

void resolveObservationConflicts ( ObservationStaging & staging)

Resolve conflicts in staged observations.

Analyzes staged observations for conflicts and inconsistencies, applying resolution strategies to ensure data integrity. Modifies staging container to resolve detected conflicts.

Parameters
stagingReference to staging container (modified in-place)
Note
Implements conflict resolution strategies for overlapping observations
May remove or modify staged observations to resolve conflicts

Resolve conflicts in staged observations.

Here is the caller graph for this function:

◆ rinexSysDesc()

string rinexSysDesc ( E_Sys sys)

Get human-readable description of GNSS system.

Converts GNSS system enumeration to descriptive string for logging and user interface purposes.

Parameters
sysGNSS system enumeration value
Returns
string Human-readable system description
Note
Used primarily for diagnostic output and error messages
Here is the caller graph for this function:

◆ setstr()

void setstr ( char * dst,
const char * src,
int n )

Set string without trailing spaces.

Copies source string to destination buffer while removing trailing spaces. Ensures proper null termination and prevents buffer overflow.

Parameters
dstDestination character buffer
srcSource string to copy
nMaximum number of characters to copy
Warning
Assumes dst buffer is large enough to hold result
Here is the caller graph for this function:

◆ stageObservation()

void stageObservation ( ObservationStaging & staging,
char obsType,
E_ObsCode obsCode,
E_FType frequency,
double value,
double lli )

Stage regular observation for deferred processing.

Adds observation to staging area for later validation and commitment. Used for observations that can be directly resolved without priority logic.

Parameters
stagingReference to staging container map
obsTypeSingle character observation type ('C', 'L', 'P', 'D', 'S')
obsCodeResolved observation code (e.g., L1C, C1W)
frequencyFrequency type enumeration
valueNumerical observation value
lliLoss of Lock Indicator
Note
Creates composite key for unique identification
See also
stagePhaseObservation() for priority-based phase observations

Stage regular observation for deferred processing.

Adds an observation to the staging area with complete metadata for later processing. Used for observations that can be immediately resolved without requiring priority-based selection logic.

The staging pattern provides several benefits:

  • Deferred processing allows validation before commitment
  • Conflict detection and resolution
  • Consistent handling of all observation types
  • Enhanced debugging and logging capabilities
Parameters
stagingReference to staging container map
obsTypeSingle character observation type ('C', 'L', 'P', 'D', 'S')
obsCodeResolved RINEX 3 observation code (e.g., L1C, C1W)
frequencyFrequency type enumeration (F1, F2, F5, etc.)
valueNumerical observation value
lliLoss of Lock Indicator (0-3)
Note
Creates composite key from obsType + frequency + obsCode for uniqueness
Logs staging operation for debugging purposes
See also
stagePhaseObservation() for priority-based phase observations
ObservationKey for key structure details
Here is the caller graph for this function:

◆ stagePhaseObservation()

void stagePhaseObservation ( ObservationStaging & staging,
char obsType,
const vector< E_ObsCode > & priorityCodes,
E_FType frequency,
double value,
double lli )

Stage phase observation with priority-based code resolution.

Stages phase observation that requires priority-based code selection. Used when phase observation can map to multiple possible codes based on available code observations.

Parameters
stagingReference to staging container map
obsTypeSingle character observation type (typically 'L')
priorityCodesVector of observation codes in priority order
frequencyFrequency type enumeration
valueNumerical phase observation value
lliLoss of Lock Indicator
Note
Code resolution occurs during commitStagedObservations()
Uses first priority code as temporary staging key
See also
commitStagedObservations() for priority resolution implementation

Stage phase observation with priority-based code resolution.

Stages a phase observation that requires priority-based code resolution. Unlike regular observations, phase observations in RINEX 2 can map to multiple possible RINEX 3 codes, requiring selection based on available code observations.

Priority resolution example:

  • Configuration: L1 -> [L1W, L1C] (try L1W first, then L1C)
  • If P1 has data -> L1W is available -> use L1W for L1 phase
  • If P1 is zero but C1 has data -> use L1C for L1 phase
Parameters
stagingReference to staging container map
obsTypeSingle character observation type (typically 'L')
priorityCodesVector of observation codes in priority order
frequencyFrequency type enumeration
valueNumerical phase observation value
lliLoss of Lock Indicator
Note
Resolution occurs during commitStagedObservations() when code data is available
Uses first priority code as temporary key for staging
Logs priority array for debugging purposes
See also
commitStagedObservations() for priority resolution implementation
Here is the caller graph for this function:

◆ validateStagedObservations()

bool validateStagedObservations ( const ObservationStaging & staging,
const SatSys & satellite )

Validate staged observations before commitment.

Performs basic validation checks on staged observation data to ensure data quality and consistency before final processing.

Parameters
stagingContainer of staged observations to validate
satelliteSatellite system for context-specific validation
Returns
true if all validations pass
false if validation failures detected
Note
Basic validation - see validateStagedObservationsDetailed() for comprehensive checks

Validate staged observations before commitment.

Here is the call graph for this function:

◆ validateStagedObservationsDetailed()

ValidationReport validateStagedObservationsDetailed ( ObservationStaging & staging,
const SatSys & satellite )

Comprehensive validation with detailed reporting.

Performs thorough validation of staged observations with comprehensive statistics collection and detailed error reporting. Provides enhanced diagnostics for data quality assessment.

Parameters
stagingReference to staging container (may be modified for conflict resolution)
satelliteSatellite system for context-specific validation rules
Returns
ValidationReport Detailed validation results and statistics
Note
More comprehensive than validateStagedObservations()
May modify staging container during conflict resolution

Comprehensive validation with detailed reporting.

Here is the call graph for this function:
Here is the caller graph for this function: