SatDataReader Class Reference
[Formatted file I/O]

#include <SatDataReader.hpp>

Inheritance diagram for SatDataReader:

Inheritance graph
[legend]
Collaboration diagram for SatDataReader:

Collaboration graph
[legend]
List of all members.

Detailed Description

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:

   SatDataReader satread;

   SatID prn28(28, SatID::systemGPS);
   DayTime time(1995, 331, 43200);

   satread.open("PRN_GPS");

   string prn28Block = satread.getBlock(prn28, time);
   // From 1992 to 1997, PRN 28 belonged to a block IIA satellite

Warning:
Be aware that PRN numbers are recycled, so several different satellites may have the same PRN number at different epochs. Therefore, you must provide the epoch of interest when calling get methods.

Definition at line 86 of file SatDataReader.hpp.

Public Member Functions

 SatDataReader ()
 Default constructor.
 SatDataReader (const char *fn)
 Common constructor.
 SatDataReader (const string &fn)
 Common constructor.
virtual void open (const char *fn)
 Method to open AND load satellite data file.
virtual void open (const string &fn)
 Method to open AND load satellite data file.
virtual SatDataReaderclearData ()
 Method to clear all previously loaded satellite data.
virtual string getBlock (const SatID &sat, const DayTime &epoch) const
 Method to get the block type of a given SV at a given epoch.
virtual int getGPSNumber (const SatID &sat, const DayTime &epoch) const
 Method to get the GPS number of a given SV at a given epoch.
virtual DayTime getLaunchDate (const SatID &sat, const DayTime &epoch) const
 Method to get the launch date of a given SV.
virtual DayTime getDeactivationDate (const SatID &sat, const DayTime &epoch) const
 Method to get the deactivation date of a given SV.
virtual ~SatDataReader ()
 Destructor.


Constructor & Destructor Documentation

SatDataReader  )  [inline]
 

Default constructor.

Definition at line 91 of file SatDataReader.hpp.

SatDataReader const char *  fn  )  [inline]
 

Common constructor.

It will always open file for read and will load satellite data in one pass.

Parameters:
fn Satellite data file to read

Definition at line 99 of file SatDataReader.hpp.

SatDataReader const string &  fn  )  [inline]
 

Common constructor.

It will always open file for read and will load satellite data in one pass.

Parameters:
fn Satellite data file to read

Definition at line 109 of file SatDataReader.hpp.

virtual ~SatDataReader  )  [inline, virtual]
 

Destructor.

Definition at line 181 of file SatDataReader.hpp.


Member Function Documentation

virtual SatDataReader& clearData  )  [inline, virtual]
 

Method to clear all previously loaded satellite data.

Definition at line 122 of file SatDataReader.hpp.

string getBlock const SatID sat,
const DayTime epoch
const [virtual]
 

Method to get the block type of a given SV at a given epoch.

Parameters:
sat Satellite ID.
epoch Epoch of interest.
Returns:
String containing satellite's block. If satellite is not found or epoch is out of proper launch/deactivation bounds, this method will return an empty string.

Definition at line 208 of file SatDataReader.cpp.

References gpstk::range().

DayTime getDeactivationDate const SatID sat,
const DayTime epoch
const [virtual]
 

Method to get the deactivation date of a given SV.

Parameters:
sat Satellite ID.
epoch Epoch of interest.
Returns:
DayTime object containing satellite's deactivation date. If satellite is not found, epoch is out of proper launch/deactivation bounds or satellite is still active, this method will return DayTime::BEGINNING_OF_TIME.

Definition at line 358 of file SatDataReader.cpp.

References gpstk::range().

int getGPSNumber const SatID sat,
const DayTime epoch
const [virtual]
 

Method to get the GPS number of a given SV at a given epoch.

Parameters:
sat Satellite ID.
epoch Epoch of interest.
Returns:
Integer containing satellite's block. If satellite is not found or epoch is out of proper launch/deactivation bounds, this method will return -1.

Definition at line 258 of file SatDataReader.cpp.

References gpstk::range().

DayTime getLaunchDate const SatID sat,
const DayTime epoch
const [virtual]
 

Method to get the launch date of a given SV.

Parameters:
sat Satellite ID.
epoch Epoch of interest.
Returns:
DayTime object containing satellite's launch date. If satellite is not found or epoch is out of proper launch/deactivation bounds, this method will return DayTime::END_OF_TIME.

Definition at line 308 of file SatDataReader.cpp.

References gpstk::range().

void open const string &  fn  )  [virtual]
 

Method to open AND load satellite data file.

Definition at line 181 of file SatDataReader.cpp.

void open const char *  fn  )  [virtual]
 

Method to open AND load satellite data file.

Definition at line 163 of file SatDataReader.cpp.

Referenced by ComputeWindUp::setFilename(), and ComputeSatPCenter::setFilename().


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