00001 #pragma ident "$Id: ExtractPC.hpp 2741 2011-06-22 16:37:02Z nwu $" 00002 00008 #ifndef ExtractPC_GPSTK 00009 #define ExtractPC_GPSTK 00010 00011 //============================================================================ 00012 // 00013 // This file is part of GPSTk, the GPS Toolkit. 00014 // 00015 // The GPSTk is free software; you can redistribute it and/or modify 00016 // it under the terms of the GNU Lesser General Public License as published 00017 // by the Free Software Foundation; either version 2.1 of the License, or 00018 // any later version. 00019 // 00020 // The GPSTk is distributed in the hope that it will be useful, 00021 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 // GNU Lesser General Public License for more details. 00024 // 00025 // You should have received a copy of the GNU Lesser General Public 00026 // License along with GPSTk; if not, write to the Free Software Foundation, 00027 // Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00028 // 00029 // Dagoberto Salazar - gAGE. 2006 00030 // 00031 //============================================================================ 00032 00033 00034 00035 #include "ExtractCombinationData.hpp" 00036 #include "icd_200_constants.hpp" 00037 00038 namespace gpstk 00039 { 00040 00043 00044 00046 class ExtractPC : public ExtractCombinationData 00047 { 00048 public: 00049 00051 ExtractPC() throw(InvalidData) : typeObs1(RinexObsHeader::P1), typeObs2(RinexObsHeader::P2) 00052 { 00053 valid = false; 00054 checkData = true; 00055 }; 00056 00057 00064 virtual int getData(const RinexObsData& rinexData) throw(InvalidData) 00065 { 00066 return ExtractCombinationData::getData(rinexData, typeObs1, typeObs2); 00067 }; // end ExtractPC::getData() 00068 00069 00071 void useC1() { typeObs1 = RinexObsHeader::C1; }; 00072 00073 00075 virtual ~ExtractPC() {}; 00076 00077 00078 protected: 00079 // Compute the combination of observables. 00080 virtual double getCombination(double obs1, double obs2) throw(InvalidData) 00081 { 00082 return ( (GAMMA_GPS*obs1 - obs2)/(GAMMA_GPS - 1.0) ); 00083 }; 00084 00085 00086 private: 00087 RinexObsHeader::RinexObsType typeObs1; 00088 RinexObsHeader::RinexObsType typeObs2; 00089 00090 00091 }; // end class ExtractPC 00092 00093 00095 00096 } 00097 00098 #endif
1.3.9.1