FICData Class Reference

#include <FICData.hpp>

Inheritance diagram for FICData:

Inheritance graph
[legend]
Collaboration diagram for FICData:

Collaboration graph
[legend]
List of all members.

Detailed Description

This does all the grunt-work in reading/decoding FIC-formatted files (ASCII And Binary).

See also:
fic_test.cpp, fic_read_write.cpp, fica_test.cpp for examples.

FICStream, FICAStream, and FICHeader.

Definition at line 101 of file FICData.hpp.

data members

long blockNum
 Block number for this FIC Record.
std::vector< double > f
 Vector of floating point numbers.
std::vector< long > i
 Vector of long integers.
std::vector< char > c
 Vector of characters.
const std::string blockString = "BLK "
 "BLK " record header constsnt

Public Member Functions

 FICData ()
 Default constructor.
virtual ~FICData ()
 Destructor.
bool isValid () const
 Returns whether or not this FICData is valid.
virtual bool isData () const
 This class is "data" so this function always returns "true".
virtual void dump (std::ostream &s) const
 Debug output function.
void prettyDump (std::ostream &os) const
 Prints the FIC data in a nice format, labeling all the important subframes and quantities.
bool getTransmitTime (CommonTime &dt) const
 Sets the transmit time of the current block of data.
 operator EngEphemeris () const throw (WrongBlockNumber)
 Cast *this to an Engineering Ephemeiris Object.
 operator AlmOrbit () const throw (WrongBlockNumber)
 cast *this into an AlmOrbit, only for block 62s
std::string generateUniqueKey () const throw (WrongBlockNumber, WrongBlockFormat)
 Generates a unique key for this FIC data so that redundant messages can be filtered.
bool operator== (const FICData &rhs)
std::string getElementLabel (char type, size_t indx) const

Protected Member Functions

virtual void reallyPutRecord (FFStream &s) const throw (std::exception, gpstk::StringUtils::StringException, gpstk::FFStreamError)
 Writes this record to the stream s.
virtual void reallyGetRecord (FFStream &s) throw (std::exception, gpstk::StringUtils::StringException, gpstk::FFStreamError)
 Read a "FICData" record from the FFStream s.


Constructor & Destructor Documentation

FICData  )  [inline]
 

Default constructor.

Definition at line 105 of file FICData.hpp.

virtual ~FICData  )  [inline, virtual]
 

Destructor.

Definition at line 115 of file FICData.hpp.


Member Function Documentation

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

Debug output function.

Dump the contents of each of the f, i, and c vectors to the given ostream s.

Reimplemented from FFData.

Definition at line 176 of file FICData.cpp.

References FICData::blockNum, FICData::c, FICData::f, and FICData::i.

std::string generateUniqueKey  )  const throw (WrongBlockNumber, WrongBlockFormat)
 

Generates a unique key for this FIC data so that redundant messages can be filtered.

Uses the same criteria as other generateUniqueKey() functions. Currently only for blocks 9 and 62 (otherwise it throws)

See also:
NavSF::generateUniqueKey()

EngEphData::generateUniqueKey()

Definition at line 1156 of file FICData.cpp.

References gpstk::StringUtils::asString(), FICData::f, and GPSTK_THROW.

string getElementLabel char  type,
size_t  indx
const
 

Definition at line 1233 of file FICData.cpp.

References gpstk::StringUtils::asString(), and gpstk::StringUtils::word().

bool getTransmitTime CommonTime dt  )  const
 

Sets the transmit time of the current block of data.

Parameters:
dt (output) a CommonTime object containing the transmit time
Returns:
if the process was sucessful, return true, else false

Definition at line 213 of file FICData.cpp.

References FICData::f, and FICData::i.

Referenced by FICDataFilterEndTime::operator()(), and FICDataFilterStartTime::operator()().

virtual bool isData void   )  const [inline, virtual]
 

This class is "data" so this function always returns "true".

Reimplemented from FFData.

Definition at line 125 of file FICData.hpp.

bool isValid  )  const
 

Returns whether or not this FICData is valid.

Checks the sizes of the f, i, and c vectors using different metrics for each FIC Record Type. See the ICD-GPS-200 for complete details.

Definition at line 148 of file FICData.cpp.

References FICData::c, FICData::f, and FICData::i.

operator AlmOrbit  )  const throw (WrongBlockNumber)
 

cast *this into an AlmOrbit, only for block 62s

Returns:
the constructed AlmOrbit object

Definition at line 1137 of file FICData.cpp.

References gpstk::StringUtils::asString(), FICData::f, and GPSTK_THROW.

operator EngEphemeris  )  const throw (WrongBlockNumber)
 

Cast *this to an Engineering Ephemeiris Object.

Returns:
the constructed EngEphemeris object

Definition at line 1093 of file FICData.cpp.

References EngEphemeris::addSubframe(), gpstk::StringUtils::asString(), FICData::f, GPSTK_THROW, EngEphemeris::setSF1(), EngEphemeris::setSF2(), and EngEphemeris::setSF3().

bool operator== const FICData rhs  ) 
 

Definition at line 1225 of file FICData.cpp.

References FICData::blockNum, FICData::c, FICData::f, and FICData::i.

void prettyDump std::ostream &  os  )  const
 

Prints the FIC data in a nice format, labeling all the important subframes and quantities.

Definition at line 192 of file FICData.cpp.

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

Read a "FICData" record from the FFStream s.

If an error is encountered, the function will return the stream to its original state and mark its fail-bit.

Exceptions:
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 958 of file FICData.cpp.

References gpstk::StringUtils::asInt(), gpstk::StringUtils::asString(), FICBlkHdrSize, gpstk::StringUtils::for2doub(), FFTextStream::formattedGetLine(), FFBinaryStream::getData(), GPSTK_THROW, FICStreamBase::header, FICStreamBase::headerRead, gpstk::BinUtils::intelToHost(), and FFStream::recordNumber.

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

Writes this record to the stream s.

Implements FFData.

Definition at line 74 of file FICData.cpp.

References gpstk::StringUtils::doub2for(), GPSTK_THROW, gpstk::BinUtils::hostToIntel(), index(), and FFBinaryStream::writeData().


Member Data Documentation

long blockNum
 

Block number for this FIC Record.

Definition at line 187 of file FICData.hpp.

Referenced by FICData::dump(), FICDataUniqueBlock162::operator()(), FICDataUniqueBlock62::operator()(), FICDataUniqueBlock109::operator()(), FICDataUniqueBlock9::operator()(), FICDataOperatorLessThanFull::operator()(), FICDataOperatorLessThanBlock109::operator()(), FICDataOperatorLessThanBlock9::operator()(), FICDataFindBlock::operator()(), FICDataFilterBlock::operator()(), FICDataFilterPRN::operator()(), and FICData::operator==().

const string blockString = "BLK " [static]
 

"BLK " record header constsnt

Definition at line 72 of file FICData.cpp.

std::vector<char> c
 

Vector of characters.

Definition at line 190 of file FICData.hpp.

Referenced by FICData::dump(), FICData::isValid(), FICDataOperatorLessThanFull::operator()(), and FICData::operator==().

std::vector<double> f
 

Vector of floating point numbers.

Definition at line 188 of file FICData.hpp.

Referenced by FICData::dump(), FICData::generateUniqueKey(), FICData::getTransmitTime(), FICData::isValid(), FICData::operator AlmOrbit(), FICData::operator EngEphemeris(), FICDataUniqueBlock62::operator()(), FICDataUniqueBlock9::operator()(), FICDataOperatorLessThanFull::operator()(), FICDataOperatorLessThanBlock9::operator()(), FICDataFilterPRN::operator()(), and FICData::operator==().

std::vector<long> i
 

Vector of long integers.

Definition at line 189 of file FICData.hpp.

Referenced by FICData::dump(), FICData62::FICData62(), FICData9::firstFiveItems(), FICData::getTransmitTime(), FICData::isValid(), FICDataUniqueBlock162::operator()(), FICDataUniqueBlock62::operator()(), FICDataUniqueBlock109::operator()(), FICDataOperatorLessThanFull::operator()(), FICDataOperatorLessThanBlock109::operator()(), FICDataFilterPRN::operator()(), FICData::operator==(), and MinSfTest::process().


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