ClockSatStore Class Reference
[Ephemstore]

#include <ClockSatStore.hpp>

Inheritance diagram for ClockSatStore:

Inheritance graph
[legend]
Collaboration diagram for ClockSatStore:

Collaboration graph
[legend]
List of all members.

Detailed Description

Store a table of data vs time for each of several satellites.

The data are stored as ClockRecords, one for each (satellite,time) pair. The getValue(sat, t) routine interpolates the table for sat at time t and returns the result as a DataRecord object. NB this class (dump()) requires that operator<<(DataRecord) be defined, unless dump() is declared and defined in this class. NB. It is assumed that the units of the quanitities are 'coordinated' meaning that units(drift) == units(bias)/sec, units(acc) == units(drift)/s/s and units(sigX) == units(X). This assumption is critical only when interpolation is used to estimate X/sec from X data. No other assumptions are made about units. Note that SP3 data (in the file and in SP3Data) are NOT coordinated; users and derived classes must deal with units consistently.

Definition at line 49 of file ClockSatStore.hpp.

Public Member Functions

 ClockSatStore () throw ()
 Default constructor.
virtual ~ClockSatStore ()
 Destructor.
bool hasClockAccel () const throw ()
virtual ClockRecord getValue (const SatID &sat, const CommonTime &ttag) const throw (InvalidRequest)
 Return value for the given satellite at the given time (usually via interpolation of the data table).
double getClockBias (const SatID &sat, const CommonTime &ttag) const throw (InvalidRequest)
 Return the clock bias for the given satellite at the given time.
double getClockDrift (const SatID &sat, const CommonTime &ttag) const throw (InvalidRequest)
 Return the clock drift for the given satellite at the given time.
virtual void dump (std::ostream &os=std::cout, int detail=0) const throw ()
 Dump information about the object to an ostream.
void addClockRecord (const SatID &sat, const CommonTime &ttag, const ClockRecord &rec) throw (InvalidRequest)
 Add a complete ClockRecord to the store; this is the preferred method of adding data to the tables.
void addClockBias (const SatID &sat, const CommonTime &ttag, const double &bias, const double &sig=0.0) throw (InvalidRequest)
 Add clock bias data (only) to the store.
void addClockDrift (const SatID &sat, const CommonTime &ttag, const double &drift, const double &sig=0.0) throw (InvalidRequest)
 Add clock drift data (only) to the store.
void addClockAcceleration (const SatID &sat, const CommonTime &ttag, const double &accel, const double &sig=0.0) throw (InvalidRequest)
 Add clock acceleration data (only) to the store.
unsigned int getInterpolationOrder (void) throw ()
 Get current interpolation order.
void setInterpolationOrder (unsigned int order) throw ()
 Set the interpolation order; this routine forces the order to be even.
void rejectBadClocks (const bool flag)
 Set the flag; if true then bad position values are rejected when adding data to the store.
void setLagrangeInterp (void) throw ()
 Set the type of interpolation to Lagrange (default).
void setLinearInterp (void) throw ()
 Set the type of interpolation to linear. Note that.

Protected Attributes

bool haveClockAccel
 flag indicating whether acceleration data is present
int interpType
 Type of interpolation: 1=linear, 2=Lagrange, 3=numerical derivative?
unsigned int interpOrder
 Order of Lagrange interpolation; should be even, is forced to be even in setInterpolationOrder (for linear interpolation it is 2).
unsigned int Nhalf
 Store half the interpolation order, for convenience.
bool rejectBadClockFlag
 Flag to reject bad clock data; default true.


Constructor & Destructor Documentation

ClockSatStore  )  throw () [inline]
 

Default constructor.

Definition at line 76 of file ClockSatStore.hpp.

virtual ~ClockSatStore  )  [inline, virtual]
 

Destructor.

Definition at line 87 of file ClockSatStore.hpp.


Member Function Documentation

void addClockAcceleration const SatID sat,
const CommonTime ttag,
const double &  accel,
const double &  sig = 0.0
throw (InvalidRequest)
 

Add clock acceleration data (only) to the store.

Definition at line 371 of file ClockSatStore.cpp.

References ClockDataRecord::accel, ClockDataRecord::bias, gpstk::ClockRecord, ClockDataRecord::drift, GPSTK_RETHROW, ClockDataRecord::sig_accel, ClockDataRecord::sig_bias, and ClockDataRecord::sig_drift.

void addClockBias const SatID sat,
const CommonTime ttag,
const double &  bias,
const double &  sig = 0.0
throw (InvalidRequest)
 

Add clock bias data (only) to the store.

Definition at line 313 of file ClockSatStore.cpp.

References ClockDataRecord::accel, ClockDataRecord::bias, gpstk::ClockRecord, ClockDataRecord::drift, GPSTK_RETHROW, ClockDataRecord::sig_accel, ClockDataRecord::sig_bias, and ClockDataRecord::sig_drift.

void addClockDrift const SatID sat,
const CommonTime ttag,
const double &  drift,
const double &  sig = 0.0
throw (InvalidRequest)
 

Add clock drift data (only) to the store.

Definition at line 341 of file ClockSatStore.cpp.

References ClockDataRecord::accel, ClockDataRecord::bias, gpstk::ClockRecord, ClockDataRecord::drift, GPSTK_RETHROW, ClockDataRecord::sig_accel, ClockDataRecord::sig_bias, and ClockDataRecord::sig_drift.

void addClockRecord const SatID sat,
const CommonTime ttag,
const ClockRecord rec
throw (InvalidRequest)
 

Add a complete ClockRecord to the store; this is the preferred method of adding data to the tables.

NB. If these addXXX() routines are used more than once for the same record (sat,ttag), be aware that since ttag is used as they key in a std::map, the value used must be EXACTLY the same in all calls; (numerical noise could cause the std::map to consider two "equal" ttags as different).

Definition at line 281 of file ClockSatStore.cpp.

References ClockDataRecord::accel, ClockDataRecord::bias, gpstk::ClockRecord, ClockDataRecord::drift, GPSTK_RETHROW, ClockDataRecord::sig_accel, ClockDataRecord::sig_bias, and ClockDataRecord::sig_drift.

virtual void dump std::ostream &  os = std::cout,
int  detail = 0
const throw () [inline, virtual]
 

Dump information about the object to an ostream.

Parameters:
[in] os ostream to receive the output; defaults to std::cout
[in] detail integer level of detail to provide; allowed values are 0: number of satellites, time step and time limits, flags, gap and interval flags and values, and file information 1: number of data/sat 2: above plus all the data tables

Reimplemented from TabularSatStore< ClockRecord >.

Reimplemented in RinexClockStore.

Definition at line 134 of file ClockSatStore.hpp.

References gpstk::dump().

double getClockBias const SatID sat,
const CommonTime ttag
const throw (InvalidRequest)
 

Return the clock bias for the given satellite at the given time.

Parameters:
[in] sat the SatID of the satellite of interest
[in] ttag the time (CommonTime) of interest
Returns:
double the clock bias
Exceptions:
InvalidRequest if bias cannot be computed, for example because a) the time t does not lie within the time limits of the data table b) checkDataGap is true and there is a data gap c) checkInterval is true and the interval is larger than maxInterval

Definition at line 167 of file ClockSatStore.cpp.

References ClockDataRecord::bias, gpstk::ClockRecord, GPSTK_RETHROW, and gpstk::LagrangeInterpolation().

double getClockDrift const SatID sat,
const CommonTime ttag
const throw (InvalidRequest)
 

Return the clock drift for the given satellite at the given time.

Parameters:
[in] sat the SatID of the satellite of interest
[in] ttag the time (CommonTime) of interest
Returns:
double the clock drift
Exceptions:
InvalidRequest if drift cannot be computed, for example because a) the time t does not lie within the time limits of the data table b) checkDataGap is true and there is a data gap c) checkInterval is true and the interval is larger than maxInterval d) there is no drift data in the store

Definition at line 216 of file ClockSatStore.cpp.

References ABS, gpstk::ClockRecord, ClockDataRecord::drift, GPSTK_RETHROW, and gpstk::LagrangeInterpolation().

unsigned int getInterpolationOrder void   )  throw () [inline]
 

Get current interpolation order.

Definition at line 173 of file ClockSatStore.hpp.

ClockRecord getValue const SatID sat,
const CommonTime ttag
const throw (InvalidRequest) [virtual]
 

Return value for the given satellite at the given time (usually via interpolation of the data table).

This interface from TabularSatStore.

Parameters:
[in] sat the SatID of the satellite of interest
[in] ttag the time (CommonTime) of interest
Returns:
object of type ClockRecord containing the data value(s).
Exceptions:
InvalidRequest if data value cannot be computed, for example because a) the time t does not lie within the time limits of the data table b) checkDataGap is true and there is a data gap c) checkInterval is true and the interval is larger than maxInterval

Implements TabularSatStore< ClockRecord >.

Definition at line 36 of file ClockSatStore.cpp.

References ABS, ClockDataRecord::accel, ClockDataRecord::bias, gpstk::ClockRecord, ClockDataRecord::drift, GPSTK_RETHROW, gpstk::LagrangeInterpolation(), gpstk::RSS(), ClockDataRecord::sig_accel, ClockDataRecord::sig_bias, and ClockDataRecord::sig_drift.

bool hasClockAccel  )  const throw () [inline]
 

Definition at line 90 of file ClockSatStore.hpp.

void rejectBadClocks const bool  flag  )  [inline]
 

Set the flag; if true then bad position values are rejected when adding data to the store.

Definition at line 186 of file ClockSatStore.hpp.

void setInterpolationOrder unsigned int  order  )  throw () [inline]
 

Set the interpolation order; this routine forces the order to be even.

Definition at line 177 of file ClockSatStore.hpp.

void setLagrangeInterp void   )  throw () [inline]
 

Set the type of interpolation to Lagrange (default).

Definition at line 190 of file ClockSatStore.hpp.

void setLinearInterp void   )  throw () [inline]
 

Set the type of interpolation to linear. Note that.

Definition at line 194 of file ClockSatStore.hpp.


Member Data Documentation

bool haveClockAccel [protected]
 

flag indicating whether acceleration data is present

Definition at line 57 of file ClockSatStore.hpp.

unsigned int interpOrder [protected]
 

Order of Lagrange interpolation; should be even, is forced to be even in setInterpolationOrder (for linear interpolation it is 2).

Definition at line 64 of file ClockSatStore.hpp.

int interpType [protected]
 

Type of interpolation: 1=linear, 2=Lagrange, 3=numerical derivative?

Definition at line 60 of file ClockSatStore.hpp.

unsigned int Nhalf [protected]
 

Store half the interpolation order, for convenience.

Definition at line 67 of file ClockSatStore.hpp.

bool rejectBadClockFlag [protected]
 

Flag to reject bad clock data; default true.

Definition at line 70 of file ClockSatStore.hpp.


The documentation for this class was generated from the following files:
Generated on Sun May 19 03:31:46 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1