00001 #pragma ident "$Id: PRSolution.hpp 1180 2008-04-04 13:51:59Z btolman $"
00002
00008 #ifndef PRS_POSITION_SOLUTION_HPP
00009 #define PRS_POSITION_SOLUTION_HPP
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include <vector>
00034 #include <ostream>
00035 #include "icd_200_constants.hpp"
00036 #include "DayTime.hpp"
00037 #include "SatID.hpp"
00038 #include "Matrix.hpp"
00039 #include "RinexObsHeader.hpp"
00040 #include "XvtStore.hpp"
00041 #include "TropModel.hpp"
00042
00043 namespace gpstk
00044 {
00047
00055 class PRSolution
00056 {
00057 public:
00059 PRSolution() throw() : RMSLimit(6.5), SlopeLimit(100.),
00060 Algebraic(false), ResidualCriterion(true), ReturnAtOnce(false),
00061 NSatsReject(-1), Debug(false), pDebugStream(&std::cout),
00062 MaxNIterations(10), ConvergenceLimit(3.e-7), Valid(false) {};
00063
00084 int RAIMCompute(const DayTime& Tr,
00085 std::vector<SatID>& Satellite,
00086 const std::vector<double>& Pseudorange,
00087 const XvtStore<SatID>& Eph,
00088 TropModel *pTropModel)
00089 throw(Exception);
00090
00092 bool isValid()
00093 const throw() { return Valid; }
00094
00095
00096
00098 double RMSLimit;
00099
00101 double SlopeLimit;
00102
00104 bool Algebraic;
00105
00110 bool ResidualCriterion;
00111
00115 bool ReturnAtOnce;
00116
00122 int NSatsReject;
00123
00125 bool Debug;
00126
00129 std::ostream *pDebugStream;
00130
00131
00132
00135 int MaxNIterations;
00136
00139 double ConvergenceLimit;
00140
00141
00142
00144 bool Valid;
00145
00149 Vector<double> Solution;
00150
00154 Matrix<double> Covariance;
00155
00159 double RMSResidual;
00160
00164 double MaxSlope;
00165
00167 int NIterations;
00168
00170 double Convergence;
00171
00173 int Nsvs;
00174
00197 static int PrepareAutonomousSolution(const DayTime& Tr,
00198 std::vector<SatID>& Sats,
00199 const std::vector<double>& Pseudorange,
00200 const XvtStore<SatID>& Eph,
00201 Matrix<double>& SVP,
00202 std::ostream *pDebug=NULL)
00203 throw();
00204
00242 static int AutonomousPRSolution(const DayTime& Tr,
00243 const std::vector<bool>& Use,
00244 const Matrix<double> SVP,
00245 TropModel *pTropModel,
00246 const bool Algebraic,
00247 int& n_iterate,
00248 double& converge,
00249 Vector<double>& Sol,
00250 Matrix<double>& Cov,
00251 Vector<double>& Resid,
00252 Vector<double>& Slope,
00253 std::ostream *pDebug=NULL)
00254 throw(Exception);
00255
00256 private:
00257
00261 Matrix<double> SVP;
00262
00265 Vector<double> APrioriSolution;
00266
00268 static int AlgebraicSolution(Matrix<double>& A,
00269 Vector<double>& Q,
00270 Vector<double>& X,
00271 Vector<double>& R);
00272
00273 };
00274
00276
00277 }
00278
00279 #endif