SVNumXRef.hpp

Go to the documentation of this file.
00001 
00078 #ifndef SVNUMXREF_HPP
00079 #define SVNUMXREF_HPP
00080 
00081    // Language Headers
00082 #include <map>
00083 #include <utility>
00084 
00085    // Library Headers
00086 #include "DayTime.hpp"
00087 #include "gps_constants.hpp"
00088 #include "Exception.hpp"
00089 
00090    // Project Headers
00091 
00092 namespace gpstk
00093 {
00094 
00095 class XRefNode
00096 {
00097    public:
00098       XRefNode( const int NumArg,
00099                      const gpstk::DayTime begDT,
00100                      const gpstk::DayTime endDT );
00101       int getNAVSTARNum() const;
00102       int getPRNNum() const;
00103       gpstk::DayTime getBeginTime() const;
00104       gpstk::DayTime getEndTime() const;
00105       bool isApplicable( gpstk::DayTime dt ) const;
00106                   
00107    protected:
00108       int Num;
00109       gpstk::DayTime begValid;
00110       gpstk::DayTime endValid;
00111 };
00112 
00113 typedef std::multimap<int, XRefNode>::const_iterator SVNumXRefListCI;
00114 typedef std::pair<SVNumXRefListCI,SVNumXRefListCI> SVNumXRefPair;
00115 typedef std::multimap<int, XRefNode>::const_iterator NAVNumXRefCI;
00116 typedef std::pair<NAVNumXRefCI,NAVNumXRefCI> NAVNumXRefPair;
00117 
00118 class SVNumXRef
00119 {
00120    public:
00121       NEW_EXCEPTION_CLASS( NoPRNNumberFound, gpstk::Exception);
00122       NEW_EXCEPTION_CLASS( NoNAVSTARNumberFound, gpstk::Exception);
00123 
00124       enum BlockType 
00125       {
00126       I,
00127       II,
00128       IIA,
00129       IIR,
00130       IIR_M,
00131       IIF
00132       };  
00133       SVNumXRef( );
00134       ~SVNumXRef() {}
00135       BlockType getBlockType( const int NAVSTARID ) const;
00136       std::string getBlockTypeString( const int NAVSTARID ) const;
00137       int getNAVSTAR( const int PRNID, const gpstk::DayTime dt = gpstk::DayTime() ) const;
00138       int getPRNID( const int NAVSTARID, const gpstk::DayTime dt = gpstk::DayTime() ) const;
00139       bool PRNIDAvailable( const int NAVSTARID, const gpstk::DayTime dt = gpstk::DayTime() ) const;
00140       bool NAVSTARIDAvailable( const int PRNID, const gpstk::DayTime dt = gpstk::DayTime() ) const;
00141       bool BlockTypeAvailable( const int NAVSTARID ) const;
00142       bool NAVSTARIDActive( const int NAVSTARID, const gpstk::DayTime dt = gpstk::DayTime() ) const;
00143       
00144    protected:
00145       std::multimap<int,XRefNode> NtoPMap;
00146       std::multimap<int,XRefNode> PtoNMap;
00147       std::map<int,BlockType> NtoBMap;
00148 };
00149 
00150 inline int XRefNode::getNAVSTARNum() const { return(Num); }
00151 inline int XRefNode::getPRNNum() const { return(Num); }
00152 inline gpstk::DayTime XRefNode::getBeginTime() const { return( begValid ); }
00153 inline gpstk::DayTime XRefNode::getEndTime() const { return( endValid ); }
00154 
00155 
00156 }
00157 #endif

Generated on Tue May 22 03:31:02 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1