AntexHeader Class Reference
[ANTEX]

#include <AntexHeader.hpp>

Inheritance diagram for AntexHeader:

Inheritance graph
[legend]
Collaboration diagram for AntexHeader:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class models the header for an ANTEX antenna file.

See also:
gpstk::AntexData and gpstk::AntexStream.

Definition at line 62 of file AntexHeader.hpp.

Public Types

enum  validBits {
  versionValid = 0x01, systemValid = 0x02, pcvTypeValid = 0x04, commentValid = 0x08,
  endValid = 0x080000000, allValid13 = 0x080000007
}
 Validity bits for the ANTEX Header NB. More...

Public Member Functions

 AntexHeader ()
 Default and only constructor.
void clear ()
 Clear (empty out) header.
virtual ~AntexHeader ()
 Destructor.
virtual bool isHeader () const
 AntexHeader is a "header" so this function always returns true.
virtual void dump (std::ostream &s) const
 This is a simple output function.
void ParseHeaderRecord (std::string &line) throw (FFStreamError)
 Parse a single header record, and modify valid accordingly.
void WriteHeaderRecords (FFStream &s) const throw (FFStreamError, StringUtils::StringException)
 Write all valid header records to the given stream.
bool isValid () const
 Return boolean : is this a valid Rinex header?

Public Attributes

AntexHeaderValues
unsigned long valid
double version
 ANTEX VERSION & TYPE.
char system
 The ANTEX satellite system.
char pcvType
 The PCV type (A:absolute R:relative).
std::string refAntType
 Reference antenna type.
std::string refAntSerNum
 Reference antenna serial number.
std::vector< std::string > commentList
 Comments in header (optional).

Static Public Attributes

AntexHeaderFormatStrings
ANTEX Header Formatting Strings

const std::string versionString = "ANTEX VERSION / SYST"
 "ANTEX VERSION / SYST"
const std::string pcvTypeString = "PCV TYPE / REFANT"
 "PCV TYPE / REFANT"
const std::string headerCommentString = "COMMENT"
 "COMMENT"
const std::string endOfHeaderString = "END OF HEADER"
 "END OF HEADER"

Protected Member Functions

virtual void reallyPutRecord (FFStream &s) const throw (std::exception, FFStreamError, StringUtils::StringException)
 outputs this record to the stream correctly formatted.
virtual void reallyGetRecord (FFStream &s) throw (std::exception, FFStreamError, StringUtils::StringException)
 This function retrieves the ANTEX Header from the given FFStream.


Member Enumeration Documentation

enum validBits
 

Validity bits for the ANTEX Header NB.

if version is updated, add allValid<ver> and update isValid()

Enumeration values:
versionValid  "ANTEX VERSION / SYST"
systemValid  "ANTEX VERSION / SYST"
pcvTypeValid  "PCV TYPE / REFANT"
commentValid  "COMMENT"
endValid  "END OF HEADER"
allValid13  mask for all required valid fields

Definition at line 88 of file AntexHeader.hpp.


Constructor & Destructor Documentation

AntexHeader  )  [inline]
 

Default and only constructor.

Definition at line 67 of file AntexHeader.hpp.

virtual ~AntexHeader  )  [inline, virtual]
 

Destructor.

Definition at line 110 of file AntexHeader.hpp.


Member Function Documentation

void clear  )  [inline]
 

Clear (empty out) header.

Definition at line 70 of file AntexHeader.hpp.

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

This is a simple output function.

It writes the version, name and antenna number of this ANTEX header.

Reimplemented from FFData.

Definition at line 228 of file AntexHeader.cpp.

References AntexHeader::commentList, AntexHeader::pcvType, AntexHeader::refAntSerNum, AntexHeader::refAntType, AntexHeader::system, and AntexHeader::version.

virtual bool isHeader void   )  const [inline, virtual]
 

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

Reimplemented from FFData.

Definition at line 114 of file AntexHeader.hpp.

bool isValid void   )  const [inline]
 

Return boolean : is this a valid Rinex header?

Definition at line 131 of file AntexHeader.hpp.

void ParseHeaderRecord std::string &  line  )  throw (FFStreamError)
 

Parse a single header record, and modify valid accordingly.

Used by reallyGetRecord for AntexHeader

Definition at line 132 of file AntexHeader.cpp.

References gpstk::StringUtils::asDouble(), GPSTK_THROW, and gpstk::StringUtils::stripTrailing().

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

This function retrieves the ANTEX Header from the given FFStream.

If an stream error is encountered, 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 174 of file AntexHeader.cpp.

References gpstk::StringUtils::asString(), FFTextStream::formattedGetLine(), GPSTK_RETHROW, GPSTK_THROW, AntexStream::header, AntexStream::headerRead, and gpstk::StringUtils::stripTrailing().

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

outputs this record to the stream correctly formatted.

Implements FFData.

Definition at line 58 of file AntexHeader.cpp.

References Exception::addText(), gpstk::StringUtils::asString(), GPSTK_RETHROW, GPSTK_THROW, and AntexStream::header.

void WriteHeaderRecords FFStream s  )  const throw (FFStreamError, StringUtils::StringException)
 

Write all valid header records to the given stream.

Used by reallyPutRecord for AntexHeader

Definition at line 89 of file AntexHeader.cpp.

References gpstk::StringUtils::asString(), gpstk::StringUtils::leftJustify(), FFTextStream::lineNumber, and gpstk::StringUtils::rightJustify().


Member Data Documentation

std::vector<std::string> commentList
 

Comments in header (optional).

Definition at line 106 of file AntexHeader.hpp.

Referenced by AntexHeader::dump().

const string endOfHeaderString = "END OF HEADER" [static]
 

"END OF HEADER"

Definition at line 56 of file AntexHeader.cpp.

const string headerCommentString = "COMMENT" [static]
 

"COMMENT"

Definition at line 55 of file AntexHeader.cpp.

char pcvType
 

The PCV type (A:absolute R:relative).

Definition at line 103 of file AntexHeader.hpp.

Referenced by AntexHeader::dump().

const string pcvTypeString = "PCV TYPE / REFANT" [static]
 

"PCV TYPE / REFANT"

Definition at line 54 of file AntexHeader.cpp.

std::string refAntSerNum
 

Reference antenna serial number.

Definition at line 105 of file AntexHeader.hpp.

Referenced by AntexHeader::dump().

std::string refAntType
 

Reference antenna type.

Definition at line 104 of file AntexHeader.hpp.

Referenced by AntexHeader::dump().

char system
 

The ANTEX satellite system.

Definition at line 102 of file AntexHeader.hpp.

Referenced by AntexHeader::dump().

unsigned long valid
 

Definition at line 100 of file AntexHeader.hpp.

double version
 

ANTEX VERSION & TYPE.

Definition at line 101 of file AntexHeader.hpp.

Referenced by AntexHeader::dump().

const string versionString = "ANTEX VERSION / SYST" [static]
 

"ANTEX VERSION / SYST"

Definition at line 53 of file AntexHeader.cpp.


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