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 MUST be read before data can be read from an SP3 file because the header contains the file version or format. The version in this Header is used by SP3Stream to determine the format of output SP3Data.
See also:
gpstk::SP3Stream and gpstk::SP3Data for more information.

Definition at line 67 of file SP3Header.hpp.

Public Types

enum  Version { undefined, SP3a, SP3b, SP3c }
 Supported SP3 versions (file formats) : 'a' 'b' or 'c' See the SP3 format definition documents. More...

Public Member Functions

 SP3Header ()
 constructor
virtual ~SP3Header ()
 destructor
Version getVersion (void) const throw ()
 access the version or file format
char versionChar (void) const throw ()
 access the version or file format as a character
std::string versionString (void) const throw ()
 access the version or file format as a string
Version setVersion (const Version ver) throw ()
 set the version or file format.
std::string timeSystemString () const throw ()
 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=std::cout) const throw ()
 Dump contents to an ostream.

Public Attributes

data members
Version version
 SP3 Version or file format.
bool containsVelocity
 If true, file contains velocities.
CommonTime 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
 system of satellites in file, e.g. G for GPS
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< SP3SatID, short > satList
 Map<SP3SatID,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 Version
 

Supported SP3 versions (file formats) : 'a' 'b' or 'c' See the SP3 format definition documents.

Enumeration values:
undefined  Unknown or undefined SP3 file format.
SP3a  SP3 version a.
SP3b  SP3 version b (very similar to SP3a).
SP3c  SP3 version c (contains a/b as a subset).

Definition at line 73 of file SP3Header.hpp.


Constructor & Destructor Documentation

SP3Header  )  [inline]
 

constructor

Definition at line 82 of file SP3Header.hpp.

virtual ~SP3Header  )  [inline, virtual]
 

destructor

Definition at line 88 of file SP3Header.hpp.


Member Function Documentation

void dump std::ostream &  s = std::cout  )  const throw () [virtual]
 

Dump contents to an ostream.

Reimplemented from FFData.

Definition at line 383 of file SP3Header.cpp.

References CivilTime::printf(), and CivilTime::second.

Version getVersion void   )  const throw () [inline]
 

access the version or file format

Returns:
the current Version

Definition at line 92 of file SP3Header.hpp.

Referenced by SP3Data::reallyGetRecord(), and SP3Data::reallyPutRecord().

virtual bool isHeader void   )  const [inline, virtual]
 

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

Reimplemented from FFData.

Definition at line 147 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 58 of file SP3Header.cpp.

References gpstk::StringUtils::asDouble(), gpstk::StringUtils::asInt(), gpstk::StringUtils::asString(), FFTextStream::formattedGetLine(), GPSTK_THROW, SP3Stream::header, index(), and gpstk::StringUtils::upperCase().

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 256 of file SP3Header.cpp.

References gpstk::StringUtils::asString(), GPSTK_RETHROW, GPSTK_THROW, SP3Stream::header, SatID::id, gpstk::StringUtils::leftJustify(), FFTextStream::lineNumber, GPSWeekSecond::printf(), CivilTime::printf(), and gpstk::StringUtils::rightJustify().

Version setVersion const Version  ver  )  throw () [inline]
 

set the version or file format.

Note that reading an SP3 file automatically sets the version in the SP3Header object that is read.

Parameters:
ver the Version to be assigned to this header
Returns:
the current Version

Definition at line 134 of file SP3Header.hpp.

std::string timeSystemString  )  const throw () [inline]
 

return a string with time system name

Definition at line 142 of file SP3Header.hpp.

Referenced by SP3Data::reallyGetRecord().

char versionChar void   )  const throw () [inline]
 

access the version or file format as a character

Returns:
a character version of the current Version

Definition at line 96 of file SP3Header.hpp.

std::string versionString void   )  const throw () [inline]
 

access the version or file format as a string

Returns:
a string version of the current Version

Definition at line 114 of file SP3Header.hpp.


Friends And Related Function Documentation

friend class SP3Data [friend]
 

Definition at line 181 of file SP3Header.hpp.


Member Data Documentation

std::string agency
 

Agency generating the Orbit.

Definition at line 167 of file SP3Header.hpp.

Referenced by SatOrbitStore::writeSP3File().

double baseClk
 

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

Definition at line 173 of file SP3Header.hpp.

Referenced by SatOrbitStore::writeSP3File().

double basePV
 

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

Definition at line 172 of file SP3Header.hpp.

Referenced by SatOrbitStore::writeSP3File().

std::vector<std::string> comments
 

vector of 4 comment lines

Definition at line 177 of file SP3Header.hpp.

Referenced by SatOrbitStore::writeSP3File().

bool containsVelocity
 

If true, file contains velocities.

Definition at line 160 of file SP3Header.hpp.

Referenced by SatOrbitStore::writeSP3File().

std::string coordSystem
 

Coordinate System of the data.

Definition at line 165 of file SP3Header.hpp.

Referenced by SatOrbitStore::writeSP3File().

std::string dataUsed
 

Types of data input into the positions.

Definition at line 164 of file SP3Header.hpp.

Referenced by SatOrbitStore::writeSP3File().

double epochInterval
 

Duration of Epoch in seconds.

Definition at line 162 of file SP3Header.hpp.

Referenced by SatOrbitStore::writeSP3File().

int numberOfEpochs
 

Number of epochs in this file.

Definition at line 163 of file SP3Header.hpp.

Referenced by SatOrbitStore::writeSP3File().

std::string orbitType
 

Type of Orbit Estimate.

Definition at line 166 of file SP3Header.hpp.

Referenced by SatOrbitStore::writeSP3File().

std::map<SP3SatID, short> satList
 

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

Definition at line 175 of file SP3Header.hpp.

Referenced by SatOrbitStore::writeSP3File().

SP3SatID system
 

system of satellites in file, e.g. G for GPS

Definition at line 170 of file SP3Header.hpp.

CommonTime time
 

Time of first Epoch in file.

Definition at line 161 of file SP3Header.hpp.

Referenced by SatOrbitStore::writeSP3File().

TimeSystem timeSystem
 

Time system used.

Definition at line 171 of file SP3Header.hpp.

Referenced by SatOrbitStore::writeSP3File().

Version version
 

SP3 Version or file format.

Definition at line 159 of file SP3Header.hpp.

Referenced by SatOrbitStore::writeSP3File().


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