PRSolution.hpp

Go to the documentation of this file.
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 //  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 //  Copyright 2004, The University of Texas at Austin
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       // input:
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       // TD optional: measurement covariance matrix
00132 
00135       int MaxNIterations;
00136 
00139       double ConvergenceLimit;
00140 
00141       // output:
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    }; // end class PRSolution
00274 
00276 
00277 } // namespace gpstk
00278 
00279 #endif

Generated on Tue Jan 6 03:31:23 2009 for GPS ToolKit Software Library by  doxygen 1.3.9.1