SP3Header Class Reference
[SP3 format file I/O]

#include <SP3Header.hpp>

Inheritance diagram for SP3Header:

Inheritance graph
[legend]
Collaboration diagram for SP3Header:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class models the header for a SP3 file.

Note:
A valid header does not need to be read before data can be read from an sp3 file because a large part of the SP3 file header is skipped and not processed.
See also:
gpstk::SP3Stream and gpstk::SP3Data for more information.

sp3_test.cpp for an example.

Definition at line 69 of file SP3Header.hpp.

Public Types

enum  TimeSystem { timeGPS = 1, timeUTC }
 Supported time systems (version 'c'). More...

Public Member Functions

 SP3Header ()
 constructor
virtual ~SP3Header ()
 destructor
std::string timeSystemString () const
 return a string with time system name
virtual bool isHeader () const
 SP3Header is a "header" so this function always returns true.
virtual void dump (std::ostream &s) const
 Debug output operator.

Public Attributes

char version
 Version of the SP3 File, 'a' or 'c'.
char pvFlag
 P or V: File contains positions only (P) or positions and velocities (V).
DayTime time
 Time of first Epoch in file.
double epochInterval
 Duration of Epoch in seconds.
int numberOfEpochs
 Number of Epochs in this file.
std::string dataUsed
 Types of data input into the positions.
std::string coordSystem
 Coordinate System of the data.
std::string orbitType
 Type of Orbit Estimate.
std::string agency
 Agency generating the Orbit.
SP3SatID system
 File type (system of satellites in file).
TimeSystem timeSystem
 Time system used.
double basePV
 Base used in Pos or Vel (mm or 10**-4mm/sec).
double baseClk
 Base used in Clk or rate (psec or 10**-4psec/sec).
std::map< SatID, short > satList
 Map<SatID,accuracy flag> (all SVs in file).
std::vector< std::string > comments
 vector of 4 comment lines

Protected Member Functions

virtual void reallyPutRecord (FFStream &s) const throw (std::exception, FFStreamError, StringUtils::StringException)
 Writes the record formatted to the FFStream s.
virtual void reallyGetRecord (FFStream &s) throw (std::exception, FFStreamError, StringUtils::StringException)
 This function retrieves the SP3 header from the given FFStream.

Friends

class SP3Data


Member Enumeration Documentation

enum TimeSystem
 

Supported time systems (version 'c').

Enumeration values:
timeGPS 
timeUTC 

Definition at line 74 of file SP3Header.hpp.


Constructor & Destructor Documentation

SP3Header  )  [inline]
 

constructor

Definition at line 81 of file SP3Header.hpp.

virtual ~SP3Header  )  [inline, virtual]
 

destructor

Definition at line 87 of file SP3Header.hpp.


Member Function Documentation

void dump std::ostream &  s  )  const [virtual]
 

Debug output operator.

Reimplemented from FFData.

Definition at line 165 of file SP3Header.cpp.

References SP3Header::agency, SP3Header::baseClk, SP3Header::basePV, SP3Header::comments, SP3Header::coordSystem, SP3Header::dataUsed, SP3Header::epochInterval, SP3Header::numberOfEpochs, SP3Header::orbitType, SP3Header::pvFlag, SP3Header::satList, SP3Header::system, SP3SatID::systemChar(), SP3SatID::systemString(), SP3Header::time, SP3Header::timeSystemString(), and SP3Header::version.

virtual bool isHeader void   )  const [inline, virtual]
 

SP3Header is a "header" so this function always returns true.

Reimplemented from FFData.

Definition at line 101 of file SP3Header.hpp.

void reallyGetRecord FFStream s  )  throw (std::exception, FFStreamError, StringUtils::StringException) [protected, virtual]
 

This function retrieves the SP3 header from the given FFStream.

If an error is encountered in the retrieval of the header, the stream is reset to its original position and its fail-bit is set.

Exceptions:
StringException when a StringUtils function fails
FFStreamError when exceptions(failbit) is set and a read or formatting error occurs. This also resets the stream to its pre-read position.

Implements FFData.

Definition at line 205 of file SP3Header.cpp.

References gpstk::StringUtils::asDouble(), gpstk::StringUtils::asInt(), FFTextStream::formattedGetLine(), GPSTK_THROW, and index().

void reallyPutRecord FFStream s  )  const throw (std::exception, FFStreamError, StringUtils::StringException) [protected, virtual]
 

Writes the record formatted to the FFStream s.

Exceptions:
StringException when a StringUtils function fails

Implements FFData.

Definition at line 53 of file SP3Header.cpp.

References gpstk::StringUtils::asString(), GPSTK_THROW, SatID::id, gpstk::StringUtils::leftJustify(), and gpstk::StringUtils::rightJustify().

std::string timeSystemString  )  const [inline]
 

return a string with time system name

Definition at line 90 of file SP3Header.hpp.

Referenced by SP3Header::dump().


Friends And Related Function Documentation

friend class SP3Data [friend]
 

Definition at line 125 of file SP3Header.hpp.


Member Data Documentation

std::string agency
 

Agency generating the Orbit.

Definition at line 115 of file SP3Header.hpp.

Referenced by SP3Header::dump(), and SatOrbitStore::writeSP3File().

double baseClk
 

Base used in Clk or rate (psec or 10**-4psec/sec).

Definition at line 120 of file SP3Header.hpp.

Referenced by SP3Header::dump(), and SatOrbitStore::writeSP3File().

double basePV
 

Base used in Pos or Vel (mm or 10**-4mm/sec).

Definition at line 119 of file SP3Header.hpp.

Referenced by SP3Header::dump(), and SatOrbitStore::writeSP3File().

std::vector<std::string> comments
 

vector of 4 comment lines

Definition at line 123 of file SP3Header.hpp.

Referenced by SP3Header::dump(), and SatOrbitStore::writeSP3File().

std::string coordSystem
 

Coordinate System of the data.

Definition at line 113 of file SP3Header.hpp.

Referenced by SP3Header::dump(), and SatOrbitStore::writeSP3File().

std::string dataUsed
 

Types of data input into the positions.

Definition at line 112 of file SP3Header.hpp.

Referenced by SP3Header::dump(), and SatOrbitStore::writeSP3File().

double epochInterval
 

Duration of Epoch in seconds.

Definition at line 110 of file SP3Header.hpp.

Referenced by SP3Header::dump(), and SatOrbitStore::writeSP3File().

int numberOfEpochs
 

Number of Epochs in this file.

Definition at line 111 of file SP3Header.hpp.

Referenced by SP3Header::dump(), and SatOrbitStore::writeSP3File().

std::string orbitType
 

Type of Orbit Estimate.

Definition at line 114 of file SP3Header.hpp.

Referenced by SP3Header::dump(), and SatOrbitStore::writeSP3File().

char pvFlag
 

P or V: File contains positions only (P) or positions and velocities (V).

Definition at line 107 of file SP3Header.hpp.

Referenced by SP3Header::dump(), and SatOrbitStore::writeSP3File().

std::map<SatID, short> satList
 

Map<SatID,accuracy flag> (all SVs in file).

Definition at line 122 of file SP3Header.hpp.

Referenced by SP3Header::dump(), and SatOrbitStore::writeSP3File().

SP3SatID system
 

File type (system of satellites in file).

Definition at line 117 of file SP3Header.hpp.

Referenced by SP3Header::dump().

DayTime time
 

Time of first Epoch in file.

Definition at line 109 of file SP3Header.hpp.

Referenced by SP3Header::dump(), and SatOrbitStore::writeSP3File().

TimeSystem timeSystem
 

Time system used.

Definition at line 118 of file SP3Header.hpp.

Referenced by SatOrbitStore::writeSP3File().

char version
 

Version of the SP3 File, 'a' or 'c'.

Definition at line 106 of file SP3Header.hpp.

Referenced by SP3Header::dump(), and SatOrbitStore::writeSP3File().


The documentation for this class was generated from the following files:
Generated on Wed Feb 8 03:31:42 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1