#include <GNSS_RxData.h>
The 'measurement' data is public and can be accessed directly by the user! This is struct style encapsulation and to allow easy access to the data but the user must be careful (especially with the observation array in to avoiding out of bound array access).
Definition at line 363 of file GNSS_RxData.h.
Public Member Functions | |
GNSS_RxData () | |
The default constructor (no data allocated yet). | |
virtual | ~GNSS_RxData () |
The destructor. | |
bool | ZeroAllMeasurements () |
Set all data in the measurement array to zero. | |
bool | ZeroPVT () |
Set all PVT data to zero. | |
bool | SetInitialPVT (const double latitudeRads, const double longitudeRads, const double height, const double vn, const double ve, const double vup, const double clk, const double clkdrift, const double std_lat, const double std_lon, const double std_hgt, const double std_vn, const double std_ve, const double std_vup, const double std_clk, const double std_clkdrift, const double undulation=0) |
Set the initial receiver position, velocity, and time. | |
bool | UpdatePositionAndRxClock (const double latitudeRads, const double longitudeRads, const double height, const double clk, const double std_lat, const double std_lon, const double std_hgt, const double std_clk) |
Update the receiver position and clock offset. | |
bool | UpdateVelocityAndClockDrift (const double vn, const double ve, const double vup, const double clkdrift, const double std_vn, const double std_ve, const double std_vup, const double std_clkdrift) |
Update the receiver velocity and clock drift. | |
bool | Initialize (const char *path, bool &isValidPath, const GNSS_enumRxDataType rxType, const char *RINEX_ephemeris_path) |
Initialize the receiver data object with data path information. | |
bool | LoadNext (bool &endOfStream) |
Load the next epoch of data. | |
bool | LoadNext_NOVATELOEM4 (bool &endOfStream) |
Load the next epoch of data of GNSS_RXDATA_NOVATELOEM4 data. | |
bool | LoadNext_RINEX21 (bool &endOfStream) |
Load the next epoch of data of GNSS_RXDATA_RINEX21 data. | |
bool | LoadNext_RINEX211 (bool &endOfStream) |
Load the next epoch of data of GNSS_RXDATA_RINEX211 data. | |
bool | CheckRINEXObservationHeader (const char *filepath, bool &isValid) |
Check the header on the RINEX Observation file to confirm it has the correct version and the file type is Observation. | |
bool | LoadRINEXNavigationData (void) |
If a RINEX GPS Navigation file is associated with this receiver, load all the ephemeris records into the member array. | |
bool | UpdateTheEphemerisArrayWithUsingRINEX () |
If a RINEX GPS Navigation file is associated with this receiver, Load m_EphAlmArray appropriately based on the current receiver time. | |
bool | CheckForCycleSlips_UsingPhaseRatePrediction (const double nrThresholdCycles) |
Check for cycle slips using the phase rate prediction method. | |
bool | DebugPrintObservationArray (const char *filepath) |
A debugging function for printing all of the observation array to a file. | |
bool | Debug_WriteSuperMsg80CharsWide (char *buffer, const unsigned maxBufferLength, const double referenceLatitude, const double referenceLongitude, const double referenceHeight, unsigned &nrBytesInBuffer) |
The number of bytes set in the buffer. | |
Static Public Member Functions | |
static bool | GetDMS (const double angleDegs, short °rees, short &minutes, float &seconds, char *dms_str, const unsigned maxLength_dms_str) |
Get degrees, minutes, seconds from a decimal degrees angle. | |
Data Fields | |
GNSS_structMeasurement | m_ObsArray [GNSS_RXDATA_NR_CHANNELS] |
The array of GNSS measurements. | |
unsigned char | m_nrValidObs |
The number of usable items in m_ObsArray. | |
GNSS_structMeasurement | m_prev_ObsArray [GNSS_RXDATA_NR_CHANNELS] |
The previous observation set. | |
unsigned char | m_prev_nrValidObs |
The number of usable items in m_prevObsArray. | |
unsigned char | m_nrGPSL1Obs |
The number of GPS L1 observations in m_ObsArray. | |
GNSS_structPVT | m_pvt |
The receiver's position, velocity, and time information. | |
GNSS_structPVT | m_prev_pvt |
The receiver's previous position, velocity, and time information. | |
GNSS_structKlobuchar | m_klobuchar |
The klobuchar ionospheric correction parameters for GPS. | |
GPS_BroadcastEphemerisAndAlmanacArray | m_EphAlmArray |
double | m_elevationMask |
double | m_cnoMask |
double | m_locktimeMask |
unsigned | m_maxAgeEphemeris |
bool | m_DisableTropoCorrection |
A boolean to indicate if the tropospheric correction is to be disabled for all satellites. | |
bool | m_DisableIonoCorrection |
A boolean to indicate if the ionospheric correction is to be disabled for all satellites. | |
std::string | filepath |
The file path to the RINEX ephemeris data. | |
GPS_structEphemeris * | eph_array |
All of the RINEX ephemeris data is loaded into a single array at start up. | |
unsigned | max_array_length |
The length of the m_RINEX_eph_array. | |
unsigned | array_length |
The length of the m_RINEX_eph_array. | |
GNSS_structKlobuchar | iono_model |
An associated ionospheric model. | |
Protected Attributes | |
FILE * | m_fid |
A file pointer to the input. | |
unsigned char | m_message [GNSS_RXDATA_MSG_LENGTH] |
A large message buffer. | |
unsigned short | m_messageLength |
The length of the message in the message buffer. | |
GNSS_enumRxDataType | m_rxDataType |
The receiver data type. | |
bool | m_CheckRinexObservationHeader |
The RINEX Observation Header must be checked once. | |
RINEX_structDecodedHeader | m_RINEX_obs_header |
Decoded RINEX Observation Header information. | |
bool | m_RINEX_use_eph |
A boolean to indicate RINEX ephemeris information is used. | |
unsigned | m_RINEX_eph_index |
GNSS::GNSS_RxData::GNSS_RxData | ( | ) |
GNSS::GNSS_RxData::~GNSS_RxData | ( | ) | [virtual] |
bool GNSS::GNSS_RxData::ZeroAllMeasurements | ( | ) |
Set all data in the measurement array to zero.
Definition at line 400 of file GNSS_RxData.cpp.
bool GNSS::GNSS_RxData::ZeroPVT | ( | ) |
Set all PVT data to zero.
Definition at line 415 of file GNSS_RxData.cpp.
bool GNSS::GNSS_RxData::SetInitialPVT | ( | const double | latitudeRads, | |
const double | longitudeRads, | |||
const double | height, | |||
const double | vn, | |||
const double | ve, | |||
const double | vup, | |||
const double | clk, | |||
const double | clkdrift, | |||
const double | std_lat, | |||
const double | std_lon, | |||
const double | std_hgt, | |||
const double | std_vn, | |||
const double | std_ve, | |||
const double | std_vup, | |||
const double | std_clk, | |||
const double | std_clkdrift, | |||
const double | undulation = 0 | |||
) |
Set the initial receiver position, velocity, and time.
latitudeRads | The latitude [rad]. |
longitudeRads | The longitude [rad]. |
height | The orthometric height [m]. |
vn | The northing velocity [m/s]. |
ve | The easting velocity [m/s]. |
vup | The up velocity [m/s]. |
clk | The clock offset [m]. |
clkdrift | The clock drift [m/s]. |
std_lat | The standard deviation uncertainty in the latitude [m]. |
std_lon | The standard deviation uncertainty in the longitude [m]. |
std_hgt | The standard deviation uncertainty in the height [m]. |
std_vn | The standard deviation uncertainty in the northing velocity [m/s]. |
std_ve | The standard deviation uncertainty in the easting velocity [m/s]. |
std_vup | The standard deviation uncertainty in the up velocity [m/s]. |
std_clk | The standard deviation uncertainty in the clock offset [m]. |
std_clkdrift | The standard deviation uncertainty in the clock drift [m/s]. |
undulation | The undulation if known [m]. |
Definition at line 1000 of file GNSS_RxData.cpp.
bool GNSS::GNSS_RxData::UpdatePositionAndRxClock | ( | const double | latitudeRads, | |
const double | longitudeRads, | |||
const double | height, | |||
const double | clk, | |||
const double | std_lat, | |||
const double | std_lon, | |||
const double | std_hgt, | |||
const double | std_clk | |||
) |
Update the receiver position and clock offset.
latitudeRads | The latitude [rad]. |
longitudeRads | The longitude [rad]. |
height | The orthometric height [m]. |
clk | The clock offset [m]. |
std_lat | The standard deviation uncertainty in the latitude [m]. |
std_lon | The standard deviation uncertainty in the longitude [m]. |
std_hgt | The standard deviation uncertainty in the height [m]. |
std_clk | The standard deviation uncertainty in the clock offset [m]. |
Definition at line 1069 of file GNSS_RxData.cpp.
bool GNSS::GNSS_RxData::UpdateVelocityAndClockDrift | ( | const double | vn, | |
const double | ve, | |||
const double | vup, | |||
const double | clkdrift, | |||
const double | std_vn, | |||
const double | std_ve, | |||
const double | std_vup, | |||
const double | std_clkdrift | |||
) |
Update the receiver velocity and clock drift.
vn | The northing velocity [m/s]. |
ve | The easting velocity [m/s]. |
vup | The up velocity [m/s]. |
clkdrift | The clock drift [m/s]. |
std_vn | The standard deviation uncertainty in the northing velocity [m/s]. |
std_ve | The standard deviation uncertainty in the easting velocity [m/s]. |
std_vup | The standard deviation uncertainty in the up velocity [m/s]. |
std_clkdrift | The standard deviation uncertainty in the clock drift [m/s]. |
Definition at line 1127 of file GNSS_RxData.cpp.
bool GNSS::GNSS_RxData::GetDMS | ( | const double | angleDegs, | |
short & | degrees, | |||
short & | minutes, | |||
float & | seconds, | |||
char * | dms_str, | |||
const unsigned | maxLength_dms_str | |||
) | [static] |
Get degrees, minutes, seconds from a decimal degrees angle.
angleDegs | The angle [degrees]. |
degrees | The degrees part. |
minutes | The minutes part. |
seconds | The seconds part. |
dms_str | A DMS string e.g. dms_str = "-180'59'59.9999\"" |
maxLength_dms_str | The maximum length of the dms_str string. |
Definition at line 1165 of file GNSS_RxData.cpp.
bool GNSS::GNSS_RxData::Initialize | ( | const char * | path, | |
bool & | isValidPath, | |||
const GNSS_enumRxDataType | rxType, | |||
const char * | RINEX_ephemeris_path | |||
) |
Initialize the receiver data object with data path information.
path | The path to the Observation data file. |
isValidPath | A boolean to indicate if the path is valid. |
rxType | The receiver data type. |
RINEX_ephemeris_path | The path to a RINEX ephemeris file, NULL if not available. |
Definition at line 423 of file GNSS_RxData.cpp.
bool GNSS::GNSS_RxData::LoadNext | ( | bool & | endOfStream | ) |
Load the next epoch of data.
endOfStream | - indicates if the end of the input source was reached and no further data is available. |
Definition at line 497 of file GNSS_RxData.cpp.
bool GNSS::GNSS_RxData::LoadNext_NOVATELOEM4 | ( | bool & | endOfStream | ) |
Load the next epoch of data of GNSS_RXDATA_NOVATELOEM4 data.
endOfStream | - indicates if the end of the input source was reached and no further data is available. |
Definition at line 714 of file GNSS_RxData.cpp.
bool GNSS::GNSS_RxData::LoadNext_RINEX21 | ( | bool & | endOfStream | ) |
Load the next epoch of data of GNSS_RXDATA_RINEX21 data.
endOfStream | - indicates if the end of the input source was reached and no further data is available. |
Definition at line 590 of file GNSS_RxData.cpp.
bool GNSS::GNSS_RxData::LoadNext_RINEX211 | ( | bool & | endOfStream | ) |
Load the next epoch of data of GNSS_RXDATA_RINEX211 data.
endOfStream | - indicates if the end of the input source was reached and no further data is available. |
Definition at line 606 of file GNSS_RxData.cpp.
bool GNSS::GNSS_RxData::CheckRINEXObservationHeader | ( | const char * | filepath, | |
bool & | isValid | |||
) |
Check the header on the RINEX Observation file to confirm it has the correct version and the file type is Observation.
filepath | - The C string path to the observation file. | |
isValid | - A boolean indicating if the file is valid for use. |
Definition at line 535 of file GNSS_RxData.cpp.
bool GNSS::GNSS_RxData::LoadRINEXNavigationData | ( | void | ) |
If a RINEX GPS Navigation file is associated with this receiver, load all the ephemeris records into the member array.
Definition at line 1582 of file GNSS_RxData.cpp.
bool GNSS::GNSS_RxData::UpdateTheEphemerisArrayWithUsingRINEX | ( | ) |
If a RINEX GPS Navigation file is associated with this receiver, Load m_EphAlmArray appropriately based on the current receiver time.
Definition at line 1640 of file GNSS_RxData.cpp.
bool GNSS::GNSS_RxData::CheckForCycleSlips_UsingPhaseRatePrediction | ( | const double | nrThresholdCycles | ) |
Check for cycle slips using the phase rate prediction method.
nrThresholdCycles | The maximum number of cycles to use as the threshold to detect a slip [cycles]. |
Definition at line 1221 of file GNSS_RxData.cpp.
bool GNSS::GNSS_RxData::DebugPrintObservationArray | ( | const char * | filepath | ) |
A debugging function for printing all of the observation array to a file.
< The unique id for this channel (eg PRN for GPS).
< The satellite system associated with this channel.
< The code type for this channel.
< The frequency type for this channel.
< This flag indicates that the channel is active for use. If this is not set, no other flags are valid for use.
< Indicates if the code tracking is locked.
< Indicates if the phase tracking is locked.
< Indicates if the phase parity if valid.
< Indicates if the pseudorange valid for use.
< Indicates if the ADR is valid for use.
< Indicates if the Doppler if valid for use.
< Indicates if this channel has another associated channel. eg. L1 and L2 measurements.
< Indicates if the channel was receiver assigned (otherwise, the user forced this channel assignment).
< Indicates if the pseudorange has carrier smoothing enabled.
< Indicates if this channel has valid associated ephemeris information.
< Indicates if this channel has valid associated almanac information.
< Indicates if the satellite tracked is above the elevation mask.
< Indciates if the channel's C/No is above a threshold value.
< Indicates if the channel's locktime is above a treshold value.
< Indicates if the user has not forced the rejection of this channel or PRN.
< Indicates if the pseudorange was not rejetced (ie Fault Detection and Exclusion).
< Indicates if the ADR was not rejetced (ie Fault Detection and Exclusion).
< Indicates if the Doppler was not rejected (ie Fault Detection and Exclusion).
< Indicates that no cycle slip has occurred at this epoch.
< Indicates if some part (pseudorange) of this channel's measurement was used in the position solution.
< Indicates if some part (Doppler) of this channel's measurement was used in the velocity solution.
< Indicates if the the ADR is used in the solution.
< Indicates if a matching pseudrange observation is available from another receiver.
< Indicates if a matching Doppler observation is available from another receiver.
< Indicates if a matching ADR observation is available from another receiver.
< Indicates that the tropospheric correction should be applied.
< Indicates that the broadcast ionospheric correction should be applied.
< The measurement gps week (at 'transmit' time) [weeks].
< The measurement gps time of week (at 'transmit' time) [s].
< The pseudorange measurement [m].
< The carrier phase or accumulated Doppler range measurement [cycles].
< The Doppler measurement for this channel [Hz].
< The carrier to noise density ratio for this channel [dB-Hz]
< The number of seconds of continous phase tracking (no known cycle slips) [s].
< The estimated pseudorange measurement standard deviation [m].
< The estimated accumulated Doppler range measurement standard deviation [cycles].
< The estimated Doppler measurement standard deviation [Hz].
< The measured psr minus the computed psr estimate [m].
< The measured Doppler minus the computed Doppler estimate [m].
< The best estimate of the geometric range between the antenna and the satellite [m].
< The best estimate of the geometric range rate between the antenna and the satellite [m/s].
< The carrier smoothed pseudorange if available [m].
< The predicted pseudorange based on the satellite position, user position, and current clock offset [m].
< The estimated integer component of the adr. This may be the single or double differenced ambiguity [].
< The predicted Doppler based on user position, velocity, satellite position, velocity and clock rate [Hz].
< The associated satellite azimuth for this channel [rad].
< The associated satellite elevation for this channel [rad].
< The channel index of a matching differential observation. -1 means there is no matching channel.
< The channel index of a matching time differential observation. -1 means there is no matching channel.
< The index into the state vector for this ambiguity state. -1 not estimated.
< The measured ADR minus the computed ADR estimate [m]. This is likely a differential quantity.
< The design matrix row relating the pseudorange measurements to the position solution. dP/d(lat), dP/d(lon), dP/d(hgt).
< The design matrix row relating the Doppler measurements to the velocity solution. dD/d(lat), dD/d(lon), dD/d(hgt).
< The corrections associated with this channel.
< The post-adjustment (filtering) measurement residual associated with this channel.
Definition at line 1288 of file GNSS_RxData.cpp.
bool GNSS::GNSS_RxData::Debug_WriteSuperMsg80CharsWide | ( | char * | buffer, | |
const unsigned | maxBufferLength, | |||
const double | referenceLatitude, | |||
const double | referenceLongitude, | |||
const double | referenceHeight, | |||
unsigned & | nrBytesInBuffer | |||
) |
The number of bytes set in the buffer.
buffer | A large character buffer (8KB min). |
maxBufferLength | The maximum buffer length [bytes]. |
referenceLatitude | Reference position latitude [rad]. |
referenceLongitude | Reference position longitude [rad]. |
referenceHeight | Reference position height [m]. |
nrBytesInBuffer | The number of bytes set in the buffer. |
Definition at line 1404 of file GNSS_RxData.cpp.
GNSS_structMeasurement GNSS::GNSS_RxData::m_ObsArray[GNSS_RXDATA_NR_CHANNELS] |
unsigned char GNSS::GNSS_RxData::m_nrValidObs |
GNSS_structMeasurement GNSS::GNSS_RxData::m_prev_ObsArray[GNSS_RXDATA_NR_CHANNELS] |
unsigned char GNSS::GNSS_RxData::m_prev_nrValidObs |
unsigned char GNSS::GNSS_RxData::m_nrGPSL1Obs |
The receiver's position, velocity, and time information.
Definition at line 574 of file GNSS_RxData.h.
The receiver's previous position, velocity, and time information.
Definition at line 577 of file GNSS_RxData.h.
The klobuchar ionospheric correction parameters for GPS.
Definition at line 580 of file GNSS_RxData.h.
This is an object for storing and handling GPS ephemeris and almanac information for valid GPS system satellites.
Definition at line 584 of file GNSS_RxData.h.
This is the elevation mask angle [rads]. The default is 5 degrees.
Definition at line 588 of file GNSS_RxData.h.
double GNSS::GNSS_RxData::m_cnoMask |
This is the carrier to noise density ratio mask value [dB-Hz]. The default is 28.0 dB-Hz.
Definition at line 592 of file GNSS_RxData.h.
This is the minimum allowable locktime [s]. The default is 0.0.
Definition at line 596 of file GNSS_RxData.h.
unsigned GNSS::GNSS_RxData::m_maxAgeEphemeris |
The maximum usable age for an ephemeris [s]. The default is 4 hours (3600*4).
Definition at line 600 of file GNSS_RxData.h.
A boolean to indicate if the tropospheric correction is to be disabled for all satellites.
Definition at line 604 of file GNSS_RxData.h.
A boolean to indicate if the ionospheric correction is to be disabled for all satellites.
Definition at line 607 of file GNSS_RxData.h.
FILE* GNSS::GNSS_RxData::m_fid [protected] |
unsigned char GNSS::GNSS_RxData::m_message[GNSS_RXDATA_MSG_LENGTH] [protected] |
unsigned short GNSS::GNSS_RxData::m_messageLength [protected] |
GNSS_enumRxDataType GNSS::GNSS_RxData::m_rxDataType [protected] |
bool GNSS::GNSS_RxData::m_CheckRinexObservationHeader [protected] |
bool GNSS::GNSS_RxData::m_RINEX_use_eph [protected] |
A boolean to indicate RINEX ephemeris information is used.
Definition at line 633 of file GNSS_RxData.h.
std::string GNSS::GNSS_RxData::filepath |
All of the RINEX ephemeris data is loaded into a single array at start up.
Definition at line 641 of file GNSS_RxData.h.
unsigned GNSS::GNSS_RxData::max_array_length |
unsigned GNSS::GNSS_RxData::array_length |
unsigned GNSS::GNSS_RxData::m_RINEX_eph_index [protected] |
An index into m_RINEX_eph.eph_array that is used to keep track of operations.
Definition at line 655 of file GNSS_RxData.h.