00001 #pragma ident "$Id: MDPObsEpoch.hpp 1202 2008-04-17 12:35:36Z ocibu $"
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef MDPOBSEPOCH_HPP
00040 #define MDPOBSEPOCH_HPP
00041
00042 #include <map>
00043
00044 #include "MDPHeader.hpp"
00045 #include "miscenum.hpp"
00046
00047 namespace gpstk
00048 {
00051 class MDPObsEpoch : public MDPHeader
00052 {
00053 public:
00054
00055 class Observation
00056 {
00057 public:
00058 Observation() throw(): carrier(ccUnknown), range(rcUnknown),bw(0),
00059 snr(0), lockCount(0), pseudorange(0), phase(0), doppler(0) {}
00060
00061 void dump(std::ostream& out) const throw();
00062 std::string encode() const throw();
00063
00064
00065
00066 void decode(std::string& str) throw();
00067
00068 CarrierCode carrier;
00069 RangeCode range;
00070 unsigned bw;
00071 double snr;
00072 unsigned long lockCount;
00073
00074 double pseudorange;
00075 double phase;
00076 double doppler;
00077
00078 };
00079
00080 MDPObsEpoch() throw();
00081
00085 virtual std::string encode() const
00086 throw();
00087
00092 virtual void decode(std::string str)
00093 throw();
00094
00095 virtual std::string getName() const {return "obs";};
00096
00100 void dump(std::ostream& out) const throw();
00101
00102 typedef std::pair<CarrierCode, RangeCode> ObsKey;
00103 typedef std::map<ObsKey, Observation> ObsMap;
00104
00105 unsigned numSVs;
00106 unsigned channel;
00107 unsigned prn;
00108 unsigned status;
00109 double elevation;
00110 double azimuth;
00111
00112 ObsMap obs;
00113
00114 bool haveObservation(const CarrierCode cc, const RangeCode rc) const;
00115 Observation getObservation(const CarrierCode cc, const RangeCode rc)
00116 const;
00117
00118 bool haveObservation(const ObsKey& ok) const
00119 {return haveObservation(ok.first, ok.second);}
00120
00121 Observation getObservation(const ObsKey& ok) const
00122 {return getObservation(ok.first, ok.second);}
00123
00124 static const unsigned myId = 300;
00125
00126 static const unsigned myLength = 8;
00127
00128 static const unsigned myObsLength=32;
00129 };
00130
00131
00132 typedef std::multimap<int, gpstk::MDPObsEpoch> MDPEpoch;
00133
00134
00135 typedef std::pair<MDPEpoch::const_iterator, MDPEpoch::const_iterator> MCIP;
00136
00137 void dump(std::ostream& out, const MDPEpoch& me);
00138
00139 FFStream& operator>>(FFStream& s, MDPEpoch& oe);
00140 FFStream& operator<<(FFStream& s, const MDPEpoch& oe);
00141
00142 }
00143
00144 #endif //MDPOBSEPOCH_HPP