This is a class to read and parse satellite data from PRN_GPS-like files.
Jet Propulsion Laboratory (JPL) provides a file called "PRN_GPS" with satellite information such as launch and deactivation dates, block type GPS number, etc. This information is important for some precise GPS data processing algorithms, and is used in Gipsy/OASIS software.
You may find this file using FTP:
ftp://sideshow.jpl.nasa.gov:/pub/gipsy_products/gipsy_params
where the PRN_GPS file resides, usually compressed in .gz format.
A typical way to use this class follows:
Definition at line 95 of file SatDataReader.hpp.
#include <SatDataReader.hpp>
Classes | |
struct | svData |
A structure used to store satellite data. More... | |
Public Member Functions | |
virtual SatDataReader & | clearData () |
Method to clear all previously loaded satellite data. More... | |
virtual std::string | getBlock (const SatID &sat, const CommonTime &epoch) const |
virtual CommonTime | getDeactivationDate (const SatID &sat, const CommonTime &epoch) const |
virtual int | getGPSNumber (const SatID &sat, const CommonTime &epoch) const |
virtual CommonTime | getLaunchDate (const SatID &sat, const CommonTime &epoch) const |
virtual void | open (const char *fn) |
Method to open AND load satellite data file. More... | |
virtual void | open (const std::string &fn) |
Method to open AND load satellite data file. More... | |
SatDataReader () | |
Default constructor. More... | |
SatDataReader (const char *fn) | |
SatDataReader (const std::string &fn) | |
virtual | ~SatDataReader () |
Destructor. More... | |
![]() | |
FFTextStream () | |
Default constructor. More... | |
FFTextStream (const char *fn, std::ios::openmode mode=std::ios::in) | |
FFTextStream (const std::string &fn, std::ios::openmode mode=std::ios::in) | |
void | formattedGetLine (std::string &line, const bool expectEOF=false) |
virtual void | open (const char *fn, std::ios::openmode mode) |
Overrides open to reset the line number. More... | |
virtual void | open (const std::string &fn, std::ios::openmode mode) |
Overrides open to reset the line number. More... | |
virtual | ~FFTextStream () |
Destructor. More... | |
![]() | |
void | conditionalThrow (void) |
void | dumpState (std::ostream &s=std::cout) const |
A function to help debug FFStreams. More... | |
FFStream () | |
Default constructor, initialize internal data. More... | |
FFStream (const char *fn, std::ios::openmode mode=std::ios::in) | |
FFStream (const std::string &fn, std::ios::openmode mode=std::ios::in) | |
virtual | ~FFStream () |
Virtual destructor, close the stream etc. More... | |
Private Types | |
typedef std::multimap< SatID, svData >::const_iterator | satDataIt |
Handy iterator type. More... | |
Private Member Functions | |
virtual void | loadData (void) |
void | setData (const SatID &sat, const svData &data) |
Private Attributes | |
std::multimap< SatID, svData > | SatelliteData |
Map holding the information regarding every satellite. More... | |
Additional Inherited Members | |
![]() | |
static bool | isFFStream (std::istream &i) |
Check if the input stream is the kind of RinexObsStream. More... | |
![]() | |
unsigned int | lineNumber |
![]() | |
std::string | filename |
file name More... | |
FFStreamError | mostRecentException |
This stores the most recently thrown exception. More... | |
unsigned int | recordNumber |
keeps track of the number of records read More... | |
![]() | |
virtual void | tryFFStreamGet (FFData &rec) |
virtual void | tryFFStreamPut (const FFData &rec) |
|
private |
Handy iterator type.
Definition at line 214 of file SatDataReader.hpp.
|
inline |
Default constructor.
Definition at line 100 of file SatDataReader.hpp.
|
inline |
Common constructor. It will always open file for read and will load satellite data in one pass.
fn | Satellite data file to read |
Definition at line 108 of file SatDataReader.hpp.
|
inline |
Common constructor. It will always open file for read and will load satellite data in one pass.
fn | Satellite data file to read |
Definition at line 118 of file SatDataReader.hpp.
|
inlinevirtual |
Destructor.
Definition at line 191 of file SatDataReader.hpp.
|
inlinevirtual |
Method to clear all previously loaded satellite data.
Definition at line 132 of file SatDataReader.hpp.
|
virtual |
Method to get the block type of a given SV at a given epoch.
sat | Satellite ID. |
epoch | Epoch of interest. |
Definition at line 223 of file SatDataReader.cpp.
|
virtual |
Method to get the deactivation date of a given SV.
sat | Satellite ID. |
epoch | Epoch of interest. |
Definition at line 373 of file SatDataReader.cpp.
|
virtual |
Method to get the GPS number of a given SV at a given epoch.
sat | Satellite ID. |
epoch | Epoch of interest. |
Definition at line 273 of file SatDataReader.cpp.
|
virtual |
Method to get the launch date of a given SV.
sat | Satellite ID. |
epoch | Epoch of interest. |
Definition at line 323 of file SatDataReader.cpp.
|
privatevirtual |
Method to load satellite data in this class' data map
FFStreamError | |
StringUtils::StringException |
Definition at line 53 of file SatDataReader.cpp.
|
virtual |
Method to open AND load satellite data file.
Definition at line 178 of file SatDataReader.cpp.
|
virtual |
Method to open AND load satellite data file.
Definition at line 196 of file SatDataReader.cpp.
Method to store satellite data in this class' data map
sat | Satellite ID. |
data | svData structure holding the SV data |
Definition at line 225 of file SatDataReader.hpp.
Map holding the information regarding every satellite.
Definition at line 218 of file SatDataReader.hpp.