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

Detailed Description

This class stores, reads, and writes RINEX 2 & 3 Met records.

Warning
When writing a RinexMetData, the RinexMetStream::headerData must have the correct observation types set or else no data will be written.
See also
rinex_met_read_write.cpp for an example.
rinex_met_test.cpp for an example.
RinexMetStream.
RinexMetHeader for information on writing RINEX 2 & 3 Met files.

Definition at line 71 of file RinexMetData.hpp.

#include <RinexMetData.hpp>

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

Public Types

typedef std::map< RinexMetHeader::RinexMetType, double > RinexMetMap
 

Public Member Functions

virtual void dump (std::ostream &s) const
 
virtual bool isData (void) const
 RinexMetData is "data" so this function always returns true. More...
 
bool operator< (const RinexMetData &right) const
 less-than operator, for use with STL sort() More...
 
 RinexMetData ()
 
virtual std::string stableText () const
 
- Public Member Functions inherited from gnsstk::RinexMetBase
virtual ~RinexMetBase ()
 Destructor. More...
 
- Public Member Functions inherited from gnsstk::FFData
void getRecord (FFStream &s)
 
virtual bool isHeader () const
 
void putRecord (FFStream &s) const
 
virtual ~FFData (void)
 virtual desctuctor More...
 

Public Attributes

RinexMetMap data
 The data itself in map form. More...
 
CommonTime time
 The time this data was recorded, in GPS time system. More...
 

Static Public Attributes

static const GNSSTK_EXPORT int maxObsPerContinuationLine = 10
 
static const GNSSTK_EXPORT int maxObsPerLine = 8
 The maximum number of obs per line before you need a new line. More...
 

Protected Member Functions

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

Private Member Functions

CommonTime parseTime (const std::string &line, double version) const
 
void processContinuationLine (const std::string &line, const RinexMetHeader &hdr)
 
void processFirstLine (const std::string &line, const RinexMetHeader &hdr, double version)
 
std::string writeTime (const CommonTime &dtd, double version=2.11) const
 

Member Typedef Documentation

◆ RinexMetMap

A map for storing one line of observations, mapping the observation type to its value.

Definition at line 101 of file RinexMetData.hpp.

Constructor & Destructor Documentation

◆ RinexMetData()

gnsstk::RinexMetData::RinexMetData ( )
inline

Definition at line 76 of file RinexMetData.hpp.

Member Function Documentation

◆ dump()

void gnsstk::RinexMetData::dump ( std::ostream &  s) const
virtual

A debug output function. Interface stability: Volatile

Reimplemented from gnsstk::FFData.

Definition at line 285 of file RinexMetData.cpp.

◆ isData()

virtual bool gnsstk::RinexMetData::isData ( void  ) const
inlinevirtual

RinexMetData is "data" so this function always returns true.

Reimplemented from gnsstk::FFData.

Definition at line 81 of file RinexMetData.hpp.

◆ operator<()

bool gnsstk::RinexMetData::operator< ( const RinexMetData right) const
inline

less-than operator, for use with STL sort()

Definition at line 96 of file RinexMetData.hpp.

◆ parseTime()

CommonTime gnsstk::RinexMetData::parseTime ( const std::string &  line,
double  version 
) const
private

Parses the time portion of a line into a CommonTime object.

Parameters
versionof Rinex file (3.02, 3.01, 2.11, ...)
Exceptions
FFStreamError

Definition at line 198 of file RinexMetData.cpp.

◆ processContinuationLine()

void gnsstk::RinexMetData::processContinuationLine ( const std::string &  line,
const RinexMetHeader hdr 
)
private

Parses string line to get data on continuation lines.

Exceptions
FFStreamError

Definition at line 176 of file RinexMetData.cpp.

◆ processFirstLine()

void gnsstk::RinexMetData::processFirstLine ( const std::string &  line,
const RinexMetHeader hdr,
double  version 
)
private

Parses string line to get time and met data

Parameters
versionof Rinex file (3.02, 3.01, 2.11, ...)
Exceptions
FFStreamError

Definition at line 150 of file RinexMetData.cpp.

◆ reallyGetRecord()

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

This function retrieves a RINEX 2 or 3 Met record from the given FFStream. If an error is encountered reading from the stream, the stream is returned 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.

Implements gnsstk::FFData.

Definition at line 111 of file RinexMetData.cpp.

◆ reallyPutRecord()

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

Writes the met data to the file stream formatted correctly.

Exceptions
std::exception
FFStreamError
StringUtils::StringException

Implements gnsstk::FFData.

Definition at line 58 of file RinexMetData.cpp.

◆ stableText()

string gnsstk::RinexMetData::stableText ( ) const
virtual

Returns a string representation of the data in this record. Interface stability: Committed

Definition at line 297 of file RinexMetData.cpp.

◆ writeTime()

string gnsstk::RinexMetData::writeTime ( const CommonTime dtd,
double  version = 2.11 
) const
private

Writes the CommonTime object into RINEX format. If it's a bad time, it will return blanks.

Parameters
versionRinex version, default to 2.11 for backwards compatability
Exceptions
StringUtils::StringException

Definition at line 255 of file RinexMetData.cpp.

Member Data Documentation

◆ data

RinexMetMap gnsstk::RinexMetData::data

The data itself in map form.

Definition at line 104 of file RinexMetData.hpp.

◆ maxObsPerContinuationLine

const int gnsstk::RinexMetData::maxObsPerContinuationLine = 10
static

The max number of obs per continuation line before you need a new line.

Definition at line 110 of file RinexMetData.hpp.

◆ maxObsPerLine

const int gnsstk::RinexMetData::maxObsPerLine = 8
static

The maximum number of obs per line before you need a new line.

Definition at line 107 of file RinexMetData.hpp.

◆ time

CommonTime gnsstk::RinexMetData::time

The time this data was recorded, in GPS time system.

Definition at line 103 of file RinexMetData.hpp.


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


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