EngEphemeris.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: EngEphemeris.hpp 2368 2010-03-25 18:56:06Z renfroba $"
00002 
00003 
00004 
00010 #ifndef GPSTK_ENGEPHEMERIS_HPP
00011 #define GPSTK_ENGEPHEMERIS_HPP
00012 
00013 //============================================================================
00014 //
00015 //  This file is part of GPSTk, the GPS Toolkit.
00016 //
00017 //  The GPSTk is free software; you can redistribute it and/or modify
00018 //  it under the terms of the GNU Lesser General Public License as published
00019 //  by the Free Software Foundation; either version 2.1 of the License, or
00020 //  any later version.
00021 //
00022 //  The GPSTk is distributed in the hope that it will be useful,
00023 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00024 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00025 //  GNU Lesser General Public License for more details.
00026 //
00027 //  You should have received a copy of the GNU Lesser General Public
00028 //  License along with GPSTk; if not, write to the Free Software Foundation,
00029 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00030 //  
00031 //  Copyright 2004, The University of Texas at Austin
00032 //
00033 //============================================================================
00034 
00035 //============================================================================
00036 //
00037 //This software developed by Applied Research Laboratories at the University of
00038 //Texas at Austin, under contract to an agency or agencies within the U.S. 
00039 //Department of Defense. The U.S. Government retains all rights to use,
00040 //duplicate, distribute, disclose, or release this software. 
00041 //
00042 //Pursuant to DoD Directive 523024 
00043 //
00044 // DISTRIBUTION STATEMENT A: This software has been approved for public 
00045 //                           release, distribution is unlimited.
00046 //
00047 //=============================================================================
00048 
00049 
00050 
00051 
00052 
00053 
00054 #include "EngNav.hpp"
00055 #include "Exception.hpp"
00056 #include "DayTime.hpp"
00057 #include "Xvt.hpp"
00058 
00059 namespace gpstk
00060 {
00063 
00070    class EngEphemeris : public EngNav
00071    {
00072    public:
00074       EngEphemeris() throw();
00075 
00077       virtual ~EngEphemeris() {}
00078 
00089       bool addSubframe(const long subframe[10], const int gpsWeek,
00090                        short PRN, short track)
00091          throw(gpstk::InvalidParameter);
00092        
00107       bool addSubframeNoParity(const long subframe[10],
00108                                const long gpsWeek,
00109                                const short PRN,
00110                                const short track)
00111          throw(gpstk::InvalidParameter);
00112 
00137       bool addIncompleteSF1Thru3(
00138          const long sf1[8], const long sf2[8], const long sf3[8], 
00139          const long sf1TransmitSOW, const int gpsWeek,
00140          const short PRN, const short track);
00141 
00149       bool isData(short subframe) const throw(gpstk::InvalidRequest);
00150 
00165       void setAccuracy(const double& acc) throw(gpstk::InvalidParameter);
00166       
00177       short getFitInterval() const throw(gpstk::InvalidRequest);
00178 
00180          // kinda pointless, huh?
00181       unsigned char getTLMPreamble() const throw() { return 0x8b; }
00182 
00184       unsigned getTLMMessage(short subframe) const 
00185          throw(gpstk::InvalidRequest);
00186             
00189       DayTime getEphemerisEpoch() const throw(InvalidRequest);
00190 
00193       DayTime getEpochTime() const throw(gpstk::InvalidRequest);
00194 
00196       DayTime getTransmitTime() const throw(gpstk::InvalidRequest);
00197       
00199       DayTime getTimestamp() const throw(gpstk::InvalidRequest)
00200          { return getEpochTime(); }
00201      
00203       short getPRNID() const throw(gpstk::InvalidRequest);
00204       
00206       short getTracker() const throw(gpstk::InvalidRequest);
00207 
00210       double getHOWTime(short subframe) const throw(gpstk::InvalidRequest);
00211       
00214       short getASAlert(short subframe) const throw(gpstk::InvalidRequest);
00215       
00218       short getFullWeek() const throw(gpstk::InvalidRequest);
00219       
00221       short getCodeFlags() const throw(gpstk::InvalidRequest);
00222       
00226       double getAccuracy() const throw(gpstk::InvalidRequest);
00227 
00230       short getAccFlag() const throw(gpstk::InvalidRequest);
00231       
00233       short getHealth() const throw(gpstk::InvalidRequest);
00234       
00237       short getL2Pdata() const throw(gpstk::InvalidRequest);
00238       
00240       short getIODC() const throw(gpstk::InvalidRequest);
00241       
00243       short getIODE() const throw(gpstk::InvalidRequest);
00244       
00246       long getAODO() const throw(gpstk::InvalidRequest);
00247       
00250       double getToc() const throw(gpstk::InvalidRequest);
00251       
00253       double getAf0() const throw(gpstk::InvalidRequest);
00254       
00257       double getAf1() const throw(gpstk::InvalidRequest);
00258       
00261       double getAf2() const throw(gpstk::InvalidRequest);
00262       
00265       double getTgd() const throw(gpstk::InvalidRequest);
00266       
00269       double getCus() const throw(gpstk::InvalidRequest);
00270       
00273       double getCrs() const throw(gpstk::InvalidRequest);
00274       
00277       double getCis() const throw(gpstk::InvalidRequest);
00278       
00281       double getCrc() const throw(gpstk::InvalidRequest);
00282       
00285       double getCuc() const throw(gpstk::InvalidRequest);
00286       
00289       double getCic() const throw(gpstk::InvalidRequest);
00290       
00293       double getToe() const throw(gpstk::InvalidRequest);
00294       
00297       double getM0() const throw(gpstk::InvalidRequest);
00298       
00301       double getDn() const throw(gpstk::InvalidRequest);
00302       
00304       double getEcc() const throw(gpstk::InvalidRequest);
00305       
00308       double getAhalf() const throw(gpstk::InvalidRequest);
00309       
00312       double getA() const throw(gpstk::InvalidRequest);
00313       
00316       double getOmega0() const throw(gpstk::InvalidRequest);
00317       
00320       double getI0() const throw(gpstk::InvalidRequest);
00321       
00324       double getW() const throw(gpstk::InvalidRequest);
00325       
00328       double getOmegaDot() const throw(gpstk::InvalidRequest);
00329       
00332       double getIDot() const throw(gpstk::InvalidRequest);
00333       
00338       Xvt svXvt(const DayTime& t) const throw(gpstk::InvalidRequest);
00339 
00343       double svRelativity(const DayTime& t) const throw(gpstk::InvalidRequest);
00344 
00348       double svClockBias(const DayTime& t) const throw(gpstk::InvalidRequest);
00349 
00353       double svClockDrift(const DayTime& t) const throw(gpstk::InvalidRequest);
00354 
00357       short getFitInt() const throw(gpstk::InvalidRequest);
00358       
00362       double getEphkey() const throw(gpstk::InvalidRequest);
00363 
00366       long getTot() const throw(gpstk::InvalidRequest);
00367       
00387       EngEphemeris& setSF1( unsigned tlm, double how, short asalert, short fullweek,
00388                             short cflags, short acc, short svhealth, short iodc,
00389                             short l2pdata, double tgd, double toc, double Af2,
00390                             double Af1, double Af0, short Tracker, short prn )
00391          throw();
00392 
00393       
00410       EngEphemeris& setSF2( unsigned tlm, double how, short asalert, short iode,
00411                             double crs, double Dn, double m0, double cuc, double Ecc,
00412                             double cus, double ahalf, double toe, short fitInt )
00413          throw();
00414       
00429       EngEphemeris& setSF3( unsigned tlm, double how, short asalert, double cic,
00430                             double Omega0, double cis, double I0, double crc,
00431                             double W, double OmegaDot, double IDot )
00432          throw();
00433       
00435       void dump(std::ostream& s = std::cout) const;
00436 
00437    protected:
00438       bool haveSubframe[3];
00440 
00441 
00442       unsigned short tlm_message[3];
00443       short PRNID;         
00444       short tracker;       
00445       long HOWtime[3];     
00446       short ASalert[3];    
00447       short weeknum;       
00448       short codeflags;     
00449       double accuracy;      
00450       short accFlag;       
00451       short health;        
00452       short L2Pdata;       
00453       short IODC;         
00454       short IODE;         
00455       long  AODO;         
00457       
00459 
00460       double   Toc;           
00461       double   af0;           
00462       double   af1;           
00463       double   af2;           
00464       double   Tgd;           
00466 
00468 
00469       double   Cuc;           
00470       double   Cus;           
00471       double   Crc;           
00472       double   Crs;           
00473       double   Cic;           
00474       double   Cis;           
00476 
00478 
00479       double   Toe;           
00480       double   M0;            
00481       double   dn;            
00482       double   ecc;           
00483       double   Ahalf;         
00484       double   OMEGA0;        
00485       double   i0;            
00486       double   w;             
00487       double   OMEGAdot;      
00488       double   idot;          
00489       short fitint;           
00491 
00492       friend std::ostream& operator<<(std::ostream& s, 
00493                                       const EngEphemeris& eph);
00494 
00495    }; // class EngEphemeris
00496 
00498 
00499 } // namespace
00500 
00501 #endif

Generated on Thu Feb 9 03:30:56 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1