Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
gnsstk::SP3Header Class Reference

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
gnsstk::SP3Stream and gnsstk::SP3Data for more information.

Definition at line 68 of file SP3Header.hpp.

#include <SP3Header.hpp>

Inheritance diagram for gnsstk::SP3Header:
Inheritance graph
[legend]

Public Types

enum  Version {
  undefined, SP3a, SP3b, SP3c,
  SP3d
}
 

Public Member Functions

virtual void dump (std::ostream &s=std::cout) const noexcept
 Dump contents to an ostream. More...
 
Version getVersion (void) const noexcept
 
virtual bool isHeader () const
 SP3Header is a "header" so this function always returns true. More...
 
Version setVersion (const Version ver) noexcept
 
 SP3Header ()
 constructor More...
 
std::string timeSystemString () const noexcept
 return a string with time system name More...
 
char versionChar (void) const noexcept
 
std::string versionString (void) const noexcept
 
virtual ~SP3Header ()
 destructor More...
 
- Public Member Functions inherited from gnsstk::SP3Base
virtual ~SP3Base ()
 Destructor per the coding standards. More...
 
- Public Member Functions inherited from gnsstk::FFData
void getRecord (FFStream &s)
 
virtual bool isData () const
 
void putRecord (FFStream &s) const
 
virtual ~FFData (void)
 virtual desctuctor More...
 

Static Public Member Functions

static char versionChar (Version ver) noexcept
 
static std::string versionString (Version ver) noexcept
 

Public Attributes

std::string agency
 Agency generating the Orbit. More...
 
bool allowSP3aEvents
 If true, file may contain NGA SP3a events. More...
 
double baseClk
 
double basePV
 Base used in Pos or Vel (mm or 10**-4mm/sec) More...
 
std::vector< std::string > comments
 vector of 4 comment lines More...
 
bool containsVelocity
 If true, file contains velocities. More...
 
std::string coordSystem
 Coordinate System of the data. More...
 
std::string dataUsed
 Types of data input into the positions. More...
 
double epochInterval
 Duration of Epoch in seconds. More...
 
int numberOfEpochs
 Number of epochs in this file. More...
 
std::string orbitType
 Type of Orbit Estimate. More...
 
std::map< SP3SatID, short > satList
 Map<SP3SatID,accuracy flag> (all SVs in file) More...
 
SP3SatID system
 system of satellites in file, e.g. G for GPS More...
 
CommonTime time
 Time of first Epoch in file. More...
 
TimeSystem timeSystem
 Time system used. More...
 
Version version
 SP3 Version or file format. More...
 

Protected Member Functions

virtual void reallyGetRecord (FFStream &s)
 
virtual void reallyPutRecord (FFStream &s) const
 

Friends

class SP3Data
 

Member Enumeration Documentation

◆ Version

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

Enumerator
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)

SP3d 

SP3 version d (Expanded Satellites and Comments)

Definition at line 74 of file SP3Header.hpp.

Constructor & Destructor Documentation

◆ SP3Header()

gnsstk::SP3Header::SP3Header ( )
inline

constructor

Definition at line 84 of file SP3Header.hpp.

◆ ~SP3Header()

virtual gnsstk::SP3Header::~SP3Header ( )
inlinevirtual

destructor

Definition at line 90 of file SP3Header.hpp.

Member Function Documentation

◆ dump()

void gnsstk::SP3Header::dump ( std::ostream &  s = std::cout) const
virtualnoexcept

Dump contents to an ostream.

Reimplemented from gnsstk::FFData.

Definition at line 534 of file SP3Header.cpp.

◆ getVersion()

Version gnsstk::SP3Header::getVersion ( void  ) const
inlinenoexcept

access the version or file format

Returns
the current Version

Definition at line 94 of file SP3Header.hpp.

◆ isHeader()

virtual bool gnsstk::SP3Header::isHeader ( ) const
inlinevirtual

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

Reimplemented from gnsstk::FFData.

Definition at line 169 of file SP3Header.hpp.

◆ reallyGetRecord()

void gnsstk::SP3Header::reallyGetRecord ( FFStream s)
protectedvirtual

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
std::exception
StringExceptionwhen a StringUtils function fails
FFStreamErrorwhen exceptions(failbit) is set and a read or formatting error occurs. This also resets the stream to its pre-read position.
Bug:
i is uninitialized at this point and it's not clear what was intended in this exception message, so commenting out the use of i for now.

Implements gnsstk::FFData.

Definition at line 58 of file SP3Header.cpp.

◆ reallyPutRecord()

void gnsstk::SP3Header::reallyPutRecord ( FFStream s) const
protectedvirtual

Writes the record formatted to the FFStream s.

Exceptions
std::exception
StringExceptionwhen a StringUtils function fails
StringUtils::StringException

Implements gnsstk::FFData.

Definition at line 308 of file SP3Header.cpp.

◆ setVersion()

Version gnsstk::SP3Header::setVersion ( const Version  ver)
inlinenoexcept

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

Parameters
verthe Version to be assigned to this header
Returns
the current Version

Definition at line 156 of file SP3Header.hpp.

◆ timeSystemString()

std::string gnsstk::SP3Header::timeSystemString ( ) const
inlinenoexcept

return a string with time system name

Definition at line 164 of file SP3Header.hpp.

◆ versionChar() [1/2]

static char gnsstk::SP3Header::versionChar ( Version  ver)
inlinestaticnoexcept

access the version or file format as a character

Parameters
verSP3 version
Returns
a character version of the current Version

Definition at line 106 of file SP3Header.hpp.

◆ versionChar() [2/2]

char gnsstk::SP3Header::versionChar ( void  ) const
inlinenoexcept

access the version or file format as a character

Returns
a character version of the current Version

Definition at line 98 of file SP3Header.hpp.

◆ versionString() [1/2]

static std::string gnsstk::SP3Header::versionString ( Version  ver)
inlinestaticnoexcept

access the version or file format as a string

Parameters
verSP3 version
Returns
a string version of the current Version

Definition at line 134 of file SP3Header.hpp.

◆ versionString() [2/2]

std::string gnsstk::SP3Header::versionString ( void  ) const
inlinenoexcept

access the version or file format as a string

Returns
a string version of the current Version

Definition at line 126 of file SP3Header.hpp.

Friends And Related Function Documentation

◆ SP3Data

friend class SP3Data
friend

Definition at line 198 of file SP3Header.hpp.

Member Data Documentation

◆ agency

std::string gnsstk::SP3Header::agency

Agency generating the Orbit.

Definition at line 186 of file SP3Header.hpp.

◆ allowSP3aEvents

bool gnsstk::SP3Header::allowSP3aEvents

If true, file may contain NGA SP3a events.

Definition at line 179 of file SP3Header.hpp.

◆ baseClk

double gnsstk::SP3Header::baseClk

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

Definition at line 192 of file SP3Header.hpp.

◆ basePV

double gnsstk::SP3Header::basePV

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

Definition at line 191 of file SP3Header.hpp.

◆ comments

std::vector<std::string> gnsstk::SP3Header::comments

vector of 4 comment lines

Definition at line 196 of file SP3Header.hpp.

◆ containsVelocity

bool gnsstk::SP3Header::containsVelocity

If true, file contains velocities.

Definition at line 178 of file SP3Header.hpp.

◆ coordSystem

std::string gnsstk::SP3Header::coordSystem

Coordinate System of the data.

Definition at line 184 of file SP3Header.hpp.

◆ dataUsed

std::string gnsstk::SP3Header::dataUsed

Types of data input into the positions.

Definition at line 183 of file SP3Header.hpp.

◆ epochInterval

double gnsstk::SP3Header::epochInterval

Duration of Epoch in seconds.

Definition at line 181 of file SP3Header.hpp.

◆ numberOfEpochs

int gnsstk::SP3Header::numberOfEpochs

Number of epochs in this file.

Definition at line 182 of file SP3Header.hpp.

◆ orbitType

std::string gnsstk::SP3Header::orbitType

Type of Orbit Estimate.

Definition at line 185 of file SP3Header.hpp.

◆ satList

std::map<SP3SatID, short> gnsstk::SP3Header::satList

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

Definition at line 194 of file SP3Header.hpp.

◆ system

SP3SatID gnsstk::SP3Header::system

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

Definition at line 189 of file SP3Header.hpp.

◆ time

CommonTime gnsstk::SP3Header::time

Time of first Epoch in file.

Definition at line 180 of file SP3Header.hpp.

◆ timeSystem

TimeSystem gnsstk::SP3Header::timeSystem

Time system used.

Definition at line 190 of file SP3Header.hpp.

◆ version

Version gnsstk::SP3Header::version

SP3 Version or file format.

The SP3 version (file format) is initially undefined, but it will be assigned by reallyGetRecord() while reading, and may be reassigned by the user before writing.

Definition at line 177 of file SP3Header.hpp.


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


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