Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
gnsstk::msecHandler Class Reference

Detailed Description

Class to detect, validate and remove millisecond clock adjusts from pseudorange and phase data and timetags. Caller passes all the data to the object, in time order, and the object detects where (in time and in observables) there are millisecond adjusts. Caller can then pass data to the object again and have it remove the appropriate adjusts from pseudorange, phase and/or timetags. NB. adjusts should be removed from pseudorange and timetags together. NB. most adjusted data has jumps in pseudorange, but not phase (violates RINEX!) although the opposite (found in phase, but not pseudorange) does exist (job3326). NB. some (Ashtech) usually also have jumps in the time tags; Trimble is variable.

Definition at line 66 of file msecHandler.hpp.

#include <msecHandler.hpp>

Public Member Functions

void add (CommonTime ttag, const SatID sat, const std::string obstype, double data)
 
int afterAddbeforeFix ()
 
void fix (CommonTime &ttag, const SatID sat, const std::string obstype, double &data)
 
std::map< gnsstk::CommonTime, int > getAdjusts ()
 
std::vector< std::string > getEditCommands ()
 get find message in the form of editing commands for EditRinex More...
 
std::string getFindMessage (bool verbose=false)
 get messages generated during detection phase More...
 
std::string getFixMessage (bool verbose=false)
 get messages generated during fixing phase More...
 
int getNbadMS ()
 get the number of invalid adjusts found More...
 
int getNMS ()
 get number of valid adjusts found More...
 
std::vector< std::string > getObsTypes ()
 Get the obstypes used in the detector. More...
 
 msecHandler ()
 
void reset ()
 Reset the object. More...
 
void setDT (double dt_in)
 must set the nominal timestep before any add() or fix() More...
 
void setObstypes (const std::vector< std::string > &ots, const std::vector< double > &waves)
 

Private Member Functions

void compute (const CommonTime ttag)
 

Private Attributes

std::vector< std::string > adjMsgs
 adjust summary (i/o) More...
 
std::vector< double > ave
 average step per obstypes More...
 
std::vector< std::string > badMsgs
 bad ones More...
 
std::vector< std::map< SatID, double > > curr
 
CommonTime currttag
 for tracking timetags internally More...
 
bool doPR
 if adjusts appear in pseudorange, fix time tags also More...
 
double dt
 nominal time spacing More...
 
std::vector< std::string > editCmds
 adjust editing cmds More...
 
std::string findMsg
 
std::string fixMsg
 messages that are passed to caller More...
 
int ims
 
double intercept
 
int N
 number of obstypes (6) More...
 
std::vector< int > nms
 number of ms More...
 
std::vector< int > npt
 number of data per obstypes More...
 
int ntot
 internal bookkeeping on which adjust, total ms adjust More...
 
std::vector< std::string > obstypes
 obstypes to monitor (L1 L2 C1 C2 P1 P2) More...
 
std::vector< std::vector< std::string > > ots
 ots that jump More...
 
std::vector< std::map< SatID, double > > past
 storing data internally More...
 
CommonTime prevttag
 
bool rmvClk
 NB currently hardcoded false. More...
 
double slope
 the piece-wise linear model More...
 
std::vector< CommonTimetimes
 time of adjust More...
 
CommonTime tref
 reference time for the linear models More...
 
std::map< std::string, int > typesMap
 [string "P1 C2 !L1 !L2"] = number of adj More...
 
std::vector< double > wavelengths
 wavelengths of obstypes - 0 for code More...
 

Static Private Attributes

static const double Rfact = 0.001 * C_MPS
 one ms in m,L1cyc,L2cyc More...
 

Constructor & Destructor Documentation

◆ msecHandler()

gnsstk::msecHandler::msecHandler ( )

empty and only constructor - note that setDT() must be called before processing

Definition at line 63 of file msecHandler.cpp.

Member Function Documentation

◆ add()

void gnsstk::msecHandler::add ( CommonTime  ttag,
const SatID  sat,
const std::string  obstype,
double  data 
)

add data at one epoch. May be repeated at the same epoch, but MUST be done in time order. NB assumes, as in RINEX, that data==0 means it is missing.

Parameters
ttagtime of the data
satsatellite of the data
obstypestring observation type of the data (L1 L2 C1 C2 P1 P2)
datavalue of obstype for sat at ttag

Definition at line 124 of file msecHandler.cpp.

◆ afterAddbeforeFix()

int gnsstk::msecHandler::afterAddbeforeFix ( )

After all add() calls, and before calling fix()

Returns
number of fixes to apply

Definition at line 170 of file msecHandler.cpp.

◆ compute()

void gnsstk::msecHandler::compute ( const CommonTime  ttag)
private

compute average differences and detect adjusts. call after all input at one time is done, passing it the next timetag.

Parameters
ttagthe next time

Definition at line 356 of file msecHandler.cpp.

◆ fix()

void gnsstk::msecHandler::fix ( CommonTime ttag,
const SatID  sat,
const std::string  obstype,
double &  data 
)

edit data by removing the millisecond adjusts, and optionally a piece-wise linear model of the adjusts. Must be called in time order, as add() was. NB may call repeatedly with the same ttag, however NB ttag gets fixed every call, so don't keep calling with same variable ttag.

Parameters
ttagtime of the data
satsatellite of the data
obstypestring observation type of the data (L1 L2 C1 C2 P1 P2)
datavalue of obstype for sat at ttag

Definition at line 214 of file msecHandler.cpp.

◆ getAdjusts()

map< CommonTime, int > gnsstk::msecHandler::getAdjusts ( )

get map<CommonTime,int> of valid adjusts; should parallel getFindMessage()

Definition at line 342 of file msecHandler.cpp.

◆ getEditCommands()

std::vector<std::string> gnsstk::msecHandler::getEditCommands ( )
inline

get find message in the form of editing commands for EditRinex

Definition at line 172 of file msecHandler.hpp.

◆ getFindMessage()

string gnsstk::msecHandler::getFindMessage ( bool  verbose = false)

get messages generated during detection phase

Definition at line 287 of file msecHandler.cpp.

◆ getFixMessage()

std::string gnsstk::msecHandler::getFixMessage ( bool  verbose = false)
inline

get messages generated during fixing phase

Definition at line 175 of file msecHandler.hpp.

◆ getNbadMS()

int gnsstk::msecHandler::getNbadMS ( )
inline

get the number of invalid adjusts found

Definition at line 181 of file msecHandler.hpp.

◆ getNMS()

int gnsstk::msecHandler::getNMS ( )
inline

get number of valid adjusts found

Definition at line 178 of file msecHandler.hpp.

◆ getObsTypes()

std::vector<std::string> gnsstk::msecHandler::getObsTypes ( )
inline

Get the obstypes used in the detector.

Definition at line 135 of file msecHandler.hpp.

◆ reset()

void gnsstk::msecHandler::reset ( )

Reset the object.

Definition at line 84 of file msecHandler.cpp.

◆ setDT()

void gnsstk::msecHandler::setDT ( double  dt_in)
inline

must set the nominal timestep before any add() or fix()

Definition at line 142 of file msecHandler.hpp.

◆ setObstypes()

void gnsstk::msecHandler::setObstypes ( const std::vector< std::string > &  ots,
const std::vector< double > &  waves 
)

Re-define obstypes and wavelengths with parallel arrays. NB must set wavelength(code) = 0.

Parameters
otsvector<string> of obstypes to be passed to add() and fix().
wavesvector<double> wavelength of phases in ots or zero for codes.

Definition at line 108 of file msecHandler.cpp.

Member Data Documentation

◆ adjMsgs

std::vector<std::string> gnsstk::msecHandler::adjMsgs
private

adjust summary (i/o)

Definition at line 97 of file msecHandler.hpp.

◆ ave

std::vector<double> gnsstk::msecHandler::ave
private

average step per obstypes

Definition at line 81 of file msecHandler.hpp.

◆ badMsgs

std::vector<std::string> gnsstk::msecHandler::badMsgs
private

bad ones

Definition at line 99 of file msecHandler.hpp.

◆ curr

std::vector<std::map<SatID, double> > gnsstk::msecHandler::curr
private

Definition at line 79 of file msecHandler.hpp.

◆ currttag

CommonTime gnsstk::msecHandler::currttag
private

for tracking timetags internally

Definition at line 77 of file msecHandler.hpp.

◆ doPR

bool gnsstk::msecHandler::doPR
private

if adjusts appear in pseudorange, fix time tags also

Definition at line 102 of file msecHandler.hpp.

◆ dt

double gnsstk::msecHandler::dt
private

nominal time spacing

Definition at line 70 of file msecHandler.hpp.

◆ editCmds

std::vector<std::string> gnsstk::msecHandler::editCmds
private

adjust editing cmds

Definition at line 98 of file msecHandler.hpp.

◆ findMsg

std::string gnsstk::msecHandler::findMsg
private

Definition at line 91 of file msecHandler.hpp.

◆ fixMsg

std::string gnsstk::msecHandler::fixMsg
private

messages that are passed to caller

Definition at line 91 of file msecHandler.hpp.

◆ ims

int gnsstk::msecHandler::ims
private

Definition at line 103 of file msecHandler.hpp.

◆ intercept

double gnsstk::msecHandler::intercept
private

Definition at line 107 of file msecHandler.hpp.

◆ N

int gnsstk::msecHandler::N
private

number of obstypes (6)

Definition at line 73 of file msecHandler.hpp.

◆ nms

std::vector<int> gnsstk::msecHandler::nms
private

number of ms

Definition at line 95 of file msecHandler.hpp.

◆ npt

std::vector<int> gnsstk::msecHandler::npt
private

number of data per obstypes

Definition at line 82 of file msecHandler.hpp.

◆ ntot

int gnsstk::msecHandler::ntot
private

internal bookkeeping on which adjust, total ms adjust

Definition at line 103 of file msecHandler.hpp.

◆ obstypes

std::vector<std::string> gnsstk::msecHandler::obstypes
private

obstypes to monitor (L1 L2 C1 C2 P1 P2)

Definition at line 75 of file msecHandler.hpp.

◆ ots

std::vector<std::vector<std::string> > gnsstk::msecHandler::ots
private

ots that jump

Definition at line 96 of file msecHandler.hpp.

◆ past

std::vector<std::map<SatID, double> > gnsstk::msecHandler::past
private

storing data internally

Definition at line 80 of file msecHandler.hpp.

◆ prevttag

CommonTime gnsstk::msecHandler::prevttag
private

Definition at line 77 of file msecHandler.hpp.

◆ Rfact

const double gnsstk::msecHandler::Rfact = 0.001 * C_MPS
staticprivate

one ms in m,L1cyc,L2cyc

Definition at line 111 of file msecHandler.hpp.

◆ rmvClk

bool gnsstk::msecHandler::rmvClk
private

NB currently hardcoded false.

Definition at line 106 of file msecHandler.hpp.

◆ slope

double gnsstk::msecHandler::slope
private

the piece-wise linear model

Definition at line 107 of file msecHandler.hpp.

◆ times

std::vector<CommonTime> gnsstk::msecHandler::times
private

time of adjust

Definition at line 94 of file msecHandler.hpp.

◆ tref

CommonTime gnsstk::msecHandler::tref
private

reference time for the linear models

Definition at line 108 of file msecHandler.hpp.

◆ typesMap

std::map<std::string, int> gnsstk::msecHandler::typesMap
private

[string "P1 C2 !L1 !L2"] = number of adj

Definition at line 88 of file msecHandler.hpp.

◆ wavelengths

std::vector<double> gnsstk::msecHandler::wavelengths
private

wavelengths of obstypes - 0 for code

Definition at line 76 of file msecHandler.hpp.


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


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:45