EngEphemeris.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: EngEphemeris.hpp 876 2007-11-06 14:16:30Z 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       
00176       short getFitInterval() const throw(gpstk::InvalidRequest);
00177 
00179          // kinda pointless, huh?
00180       unsigned char getTLMPreamble() const throw() { return 0x8b; }
00181 
00183       unsigned getTLMMessage(short subframe) const 
00184          throw(gpstk::InvalidRequest);
00185             
00188       DayTime getEphemerisEpoch() const throw(InvalidRequest);
00189 
00192       DayTime getEpochTime() const throw(gpstk::InvalidRequest);
00193 
00195       DayTime getTransmitTime() const throw(gpstk::InvalidRequest);
00196       
00198       DayTime getTimestamp() const throw(gpstk::InvalidRequest)
00199          { return getEpochTime(); }
00200      
00202       short getPRNID() const throw(gpstk::InvalidRequest);
00203       
00205       short getTracker() const throw(gpstk::InvalidRequest);
00206 
00209       double getHOWTime(short subframe) const throw(gpstk::InvalidRequest);
00210       
00213       short getASAlert(short subframe) const throw(gpstk::InvalidRequest);
00214       
00217       short getFullWeek() const throw(gpstk::InvalidRequest);
00218       
00220       short getCodeFlags() const throw(gpstk::InvalidRequest);
00221       
00225       double getAccuracy() const throw(gpstk::InvalidRequest);
00226 
00229       short getAccFlag() const throw(gpstk::InvalidRequest);
00230       
00232       short getHealth() const throw(gpstk::InvalidRequest);
00233       
00236       short getL2Pdata() const throw(gpstk::InvalidRequest);
00237       
00239       short getIODC() const throw(gpstk::InvalidRequest);
00240       
00242       short getIODE() const throw(gpstk::InvalidRequest);
00243       
00245       long getAODO() const throw(gpstk::InvalidRequest);
00246       
00249       double getToc() const throw(gpstk::InvalidRequest);
00250       
00252       double getAf0() const throw(gpstk::InvalidRequest);
00253       
00256       double getAf1() const throw(gpstk::InvalidRequest);
00257       
00260       double getAf2() const throw(gpstk::InvalidRequest);
00261       
00264       double getTgd() const throw(gpstk::InvalidRequest);
00265       
00268       double getCus() const throw(gpstk::InvalidRequest);
00269       
00272       double getCrs() const throw(gpstk::InvalidRequest);
00273       
00276       double getCis() const throw(gpstk::InvalidRequest);
00277       
00280       double getCrc() const throw(gpstk::InvalidRequest);
00281       
00284       double getCuc() const throw(gpstk::InvalidRequest);
00285       
00288       double getCic() const throw(gpstk::InvalidRequest);
00289       
00292       double getToe() const throw(gpstk::InvalidRequest);
00293       
00296       double getM0() const throw(gpstk::InvalidRequest);
00297       
00300       double getDn() const throw(gpstk::InvalidRequest);
00301       
00303       double getEcc() const throw(gpstk::InvalidRequest);
00304       
00307       double getAhalf() const throw(gpstk::InvalidRequest);
00308       
00311       double getA() const throw(gpstk::InvalidRequest);
00312       
00315       double getOmega0() const throw(gpstk::InvalidRequest);
00316       
00319       double getI0() const throw(gpstk::InvalidRequest);
00320       
00323       double getW() const throw(gpstk::InvalidRequest);
00324       
00327       double getOmegaDot() const throw(gpstk::InvalidRequest);
00328       
00331       double getIDot() const throw(gpstk::InvalidRequest);
00332       
00337       Xvt svXvt(const DayTime& t) const throw(gpstk::InvalidRequest);
00338 
00342       double svRelativity(const DayTime& t) const throw(gpstk::InvalidRequest);
00343 
00347       double svClockBias(const DayTime& t) const throw(gpstk::InvalidRequest);
00348 
00352       double svClockDrift(const DayTime& t) const throw(gpstk::InvalidRequest);
00353 
00356       short getFitInt() const throw(gpstk::InvalidRequest);
00357       
00361       double getEphkey() const throw(gpstk::InvalidRequest);
00362 
00365       long getTot() const throw(gpstk::InvalidRequest);
00366       
00386       EngEphemeris& setSF1( unsigned tlm, double how, short asalert, short fullweek,
00387                             short cflags, short acc, short svhealth, short iodc,
00388                             short l2pdata, double tgd, double toc, double Af2,
00389                             double Af1, double Af0, short Tracker, short prn )
00390          throw();
00391 
00392       
00409       EngEphemeris& setSF2( unsigned tlm, double how, short asalert, short iode,
00410                             double crs, double Dn, double m0, double cuc, double Ecc,
00411                             double cus, double ahalf, double toe, short fitInt )
00412          throw();
00413       
00428       EngEphemeris& setSF3( unsigned tlm, double how, short asalert, double cic,
00429                             double Omega0, double cis, double I0, double crc,
00430                             double W, double OmegaDot, double IDot )
00431          throw();
00432       
00434       void dump(std::ostream& s = std::cout) const;
00435 
00436    protected:
00437       bool haveSubframe[3];
00439 
00440 
00441       unsigned short tlm_message[3];
00442       short PRNID;         
00443       short tracker;       
00444       long HOWtime[3];     
00445       short ASalert[3];    
00446       short weeknum;       
00447       short codeflags;     
00448       double accuracy;      
00449       short accFlag;       
00450       short health;        
00451       short L2Pdata;       
00452       short IODC;         
00453       short IODE;         
00454       long  AODO;         
00456       
00458 
00459       double   Toc;           
00460       double   af0;           
00461       double   af1;           
00462       double   af2;           
00463       double   Tgd;           
00465 
00467 
00468       double   Cuc;           
00469       double   Cus;           
00470       double   Crc;           
00471       double   Crs;           
00472       double   Cic;           
00473       double   Cis;           
00475 
00477 
00478       double   Toe;           
00479       double   M0;            
00480       double   dn;            
00481       double   ecc;           
00482       double   Ahalf;         
00483       double   OMEGA0;        
00484       double   i0;            
00485       double   w;             
00486       double   OMEGAdot;      
00487       double   idot;          
00488       short fitint;           
00490 
00491       friend std::ostream& operator<<(std::ostream& s, 
00492                                       const EngEphemeris& eph);
00493 
00494    }; // class EngEphemeris
00495 
00497 
00498 } // namespace
00499 
00500 #endif

Generated on Wed Dec 3 03:31:20 2008 for GPS ToolKit Software Library by  doxygen 1.3.9.1