#include <PRSolution.hpp>
Collaboration diagram for PRSolution:

RAIM ref. "A Baseline GPS RAIM Scheme and a Note on the Equivalence of Three RAIM Methods," by R. Grover Brown, Journal of the Institute of Navigation, Vol. 39, No. 3, Fall 1992, pg 301.
The main point of entry is RAIMCompute(); it will compute a solution given the pseudoranges from a number of satellites, using a RAIM-based algorithm to detect and exclude 'bad' data from the solution. Alternately, the user may compute a straightforward solution using all the input data, without the RAIM algorithm; this is done by first calling PreparePRSolution() and then SimplePRSolution().
The class is able to use GPS and/or Glonass satellite data, and assumes that the Glonass ephemeris is in the GPS frame but the Glonass clocks are in the Glonass time frame. If the input data is mixed (both GPS and GLO) then the solution has a 5th element, namely the GPS-GLO time offset, as estimated by the algorithm. If the data is not mixed (either all-GPS or all-GLO), this element is zero and has no meaning. An all-GLO solution will have clock bias in Glonass time; otherwise it will be in GPS time.
Note that a problem can arise when processing a timeseries of mixed data by calling RAIMCompute at each epoch; it is possible that the RAIM algorithm may, at some epochs, happen to reject all the Glonass satellites or all the GPS satellites. In this case the GPS-GLO timeoffset is undefined (and returned as zero).
Definition at line 310 of file PRSolution.hpp.
Public Member Functions | |
| PRSolution () throw () | |
| Constructor. | |
| bool | isValid () const throw () |
| Return the status of solution. | |
| int | PreparePRSolution (const CommonTime &Tr, std::vector< SatID > &Sats, std::vector< SatID::SatelliteSystem > &Syss, const std::vector< double > &Pseudorange, const XvtStore< SatID > *pEph, Matrix< double > &SVP) const throw () |
| Compute the satellite position / corrected range matrix (SVP) which is used by SimplePRSolution(). | |
| int | SimplePRSolution (const CommonTime &Tr, const std::vector< SatID > &Sats, const Matrix< double > &SVP, const Matrix< double > &invMC, TropModel *pTropModel, const int &niterLimit, const double &convLimit, const std::vector< SatID::SatelliteSystem > &Syss, const Vector< double > &APSol, Vector< double > &Resids, Vector< double > &Slopes) throw (Exception) |
| Compute a single autonomous pseudorange solution. | |
| int | RAIMCompute (const CommonTime &Tr, std::vector< SatID > &Satellites, std::vector< SatID::SatelliteSystem > &Systems, const std::vector< double > &Pseudorange, const Matrix< double > &invMC, const XvtStore< SatID > *pEph, TropModel *pTropModel) throw (Exception) |
| Compute a position/time solution, given satellite PRNs and pseudoranges using a RAIM algorithm. | |
| int | DOPCompute (void) throw (Exception) |
| Compute DOPs using the partials matrix from the last successful solution. | |
| std::string | outputPOSString (std::string tag, int iret=-99, const Vector< double > &Vec=PRSNullVector) throw () |
| conveniences for printing the results of the pseudorange solution algorithm output position, error code and V/NV | |
| std::string | outputCLKString (std::string tag, int iret=-99) throw () |
| output {SYS clock} for all systems, error code and V/NV | |
| std::string | outputNAVString (std::string tag, int iret=-99, const Vector< double > &Vec=PRSNullVector) throw () |
| output info in POS and CLK | |
| std::string | outputRMSString (std::string tag, int iret=-99) throw () |
| output NSVdropped, Nsvs, RMS residual, TDOP, PDOP, GDOP, Slope, niter, conv, satellites, error code and V/NV | |
| std::string | outputValidString (int iret=-99) throw () |
| std::string | outputString (std::string tag, int iret=-99, const Vector< double > &Vec=PRSNullVector) throw () |
| output POS, CLK and RMS strings | |
| std::string | errorCodeString (int iret) throw () |
| A convenience for printing the error code (return value). | |
| std::string | configString (std::string tag) throw () |
| A convenience for printing the current configuarion. | |
Public Attributes | |
| double | RMSLimit |
| RMS limit (m) on residual of fit. | |
| double | SlopeLimit |
| Slope limit (dimensionless). | |
| bool | Algebraic |
| Use an algebraic (if true) or linearized least squares (if false) algorithm. | |
| bool | ResidualCriterion |
| Use a rejection criterion based on RMS residual of fit (true) or RMS distance from an a priori position. | |
| bool | ReturnAtOnce |
| Return as soon as a solution meeting the limit requirements is found (this makes it a non-RAIM algorithm). | |
| int | NSatsReject |
| Maximum number of satellites that may be rejected in the RAIM algorithm; if this = -1, as many as possible will be rejected (RAIM requires at least 5 satellites). | |
| bool | Debug |
| If true, RAIMCompute() will output solution information to *pDebugStream. | |
| std::ostream * | pDebugStream |
| Pointer to an ostream, default &std::cout; if Debug is true, RAIMCompute() will print all preliminary solutions to this stream. | |
| int | MaxNIterations |
| Maximum number of iterations allowed in the linearized least squares algorithm. | |
| double | ConvergenceLimit |
| Convergence limit (m): continue iteration loop while RSS change in solution exceeds this. | |
| std::vector< SatID::SatelliteSystem > | SystemIDs |
| vector<SatID> containing the satellite systems included in the solution. | |
| bool | hasMemory |
| This determines whether this object will maintain a "memory" of all the solutions it has computed. | |
| std::vector< SatID > | SatelliteIDs |
| vector<SatID> containing satellite IDs for all the satellites input, with bad (excluded) ones identified by (Satellite[.] < 0). | |
| Vector< double > | Solution |
| Vector<double> containing the computed position solution (3 components, ECEF in the frame of the ephemeris, meter), the receiver clock bias (m), and the GPS-GLO time offset (m). | |
| Matrix< double > | Covariance |
| Matrix<double> containing the computed solution covariance (meter^2); see doc. | |
| Matrix< double > | invMeasCov |
| Matrix<double> containing the inverse measurement covariance matrix (m^-2) that was used in computing the final solution. | |
| Matrix< double > | Partials |
| Matrix<double> containing the partials matrix used in the final solution. | |
| PRSMemory | memory |
| The "memory" object, used only when hasMemory is true. | |
| Vector< double > | PreFitResidual |
| Prefit residuals; only valid if memory exists b/c it needs apriori solution. | |
| double | RMSResidual |
| Root mean square residual of fit (except when RMSDistanceFlag is set, then RMS distance from apriori position); in meters. | |
| double | MaxSlope |
| Slope computed in the RAIM algorithm (largest of all satellite values) for the returned solution, dimensionless. | |
| double | TDOP |
| DOPs computed in a call to DOPCompute() or outputString(). | |
| double | PDOP |
| DOPs computed in a call to DOPCompute() or outputString(). | |
| double | GDOP |
| DOPs computed in a call to DOPCompute() or outputString(). | |
| int | NIterations |
| the actual number of iterations used | |
| double | Convergence |
| the RSS change in solution at the end of iterations. | |
| int | Nsvs |
| the number of good satellites used in the final computation | |
| bool | Mixed |
| if true, the solution was constructed from a mixed dataset, including both GPS and Glonass satellites. | |
| bool | TropFlag |
| if true, the returned solution may be degraded because the tropospheric correction was not applied to one or more satellites; applies after calls to both SimplePRSolution() and RAIMCompute(). | |
| bool | RMSFlag |
| if true, the returned solution may be degraded because the RMS residual or the slope is large; applies only after calls to RAIMCompute(). | |
| bool | SlopeFlag |
| if true, the returned solution may be degraded because the RMS residual or the slope is large; applies only after calls to RAIMCompute(). | |
|
|
Constructor.
Definition at line 314 of file PRSolution.hpp. |
|
|
A convenience for printing the current configuarion.
Definition at line 894 of file PRSolution.cpp. References gpstk::printTime(). |
|
|
Compute DOPs using the partials matrix from the last successful solution. RAIMCompute(), if successful, calls this before returning. Results stored in PRSolution::TDOP,PDOP,GDOP. Definition at line 753 of file PRSolution.cpp. References PRSolution::GDOP, GPSTK_RETHROW, gpstk::inverseLUD(), PRSolution::Partials, PRSolution::PDOP, Matrix::rows(), gpstk::RSS(), SQRT, PRSolution::TDOP, and gpstk::transpose(). |
|
|
A convenience for printing the error code (return value).
Definition at line 882 of file PRSolution.cpp. |
|
|
Return the status of solution.
Definition at line 329 of file PRSolution.hpp. |
|
||||||||||||
|
output {SYS clock} for all systems, error code and V/NV
Definition at line 827 of file PRSolution.cpp. References gpstk::printTime(), and RinexSatID::systemString3(). |
|
||||||||||||||||
|
output info in POS and CLK
Definition at line 790 of file PRSolution.cpp. References gpstk::printTime(), and RinexSatID::systemString3(). |
|
||||||||||||||||
|
conveniences for printing the results of the pseudorange solution algorithm output position, error code and V/NV
Definition at line 811 of file PRSolution.cpp. References gpstk::printTime(). |
|
||||||||||||
|
output NSVdropped, Nsvs, RMS residual, TDOP, PDOP, GDOP, Slope, niter, conv, satellites, error code and V/NV
Definition at line 844 of file PRSolution.cpp. References gpstk::abs(), and gpstk::printTime(). |
|
||||||||||||||||
|
output POS, CLK and RMS strings
Definition at line 872 of file PRSolution.cpp. |
|
|
Definition at line 774 of file PRSolution.cpp. |
|
||||||||||||||||||||||||||||
|
Compute the satellite position / corrected range matrix (SVP) which is used by SimplePRSolution(). SVP is output, dimensioned (N,4) where N is the number of satellites and the length of both Satellite and Pseudorange. Data is ignored whenever Sats[i].id is < 0. NB caller should verify that the number of good entries (Satellite[.] > 0) is > 4 before proceeding. Even though this is a member function, it changes none of the member data.
Definition at line 54 of file PRSolution.cpp. References gpstk::C_MPS, Xvt::clkbias, DEBUG, LOG, gpstk::printTime(), Xvt::relcorr, gpstk::vectorindex(), and Xvt::x. |
|
||||||||||||||||||||||||||||||||
|
Compute a position/time solution, given satellite PRNs and pseudoranges using a RAIM algorithm. This is the main computation done by this class.
Definition at line 459 of file PRSolution.cpp. References gpstk::abs(), Matrix::cols(), DEBUG, GPSTK_RETHROW, Combinations::isSelected(), ConfigureLOG::Level(), LOG, LOGlevel, Combinations::Next(), Matrix::rows(), and Vector::size(). |
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
Compute a single autonomous pseudorange solution. On output, all the member data is filled with results. Input only (first 3 should be just as returned from PreparePRSolution()):
Definition at line 153 of file PRSolution.cpp. References GPSEllipsoid::angVelocity(), GPSEllipsoid::c(), DEBUG, Position::elevation(), ERROR, Position::getHeight(), GPSTK_RETHROW, GPSTK_THROW, gpstk::inverseSVD(), LOG, gpstk::norm(), gpstk::printTime(), Matrix::resize(), gpstk::RMS(), gpstk::RSS(), Position::setECEF(), Vector::size(), Triple::size(), SQRT, gpstk::transpose(), gpstk::vectorindex(), and Xvt::x. |
|
|
Use an algebraic (if true) or linearized least squares (if false) algorithm.
Definition at line 340 of file PRSolution.hpp. |
|
|
the RSS change in solution at the end of iterations.
Definition at line 444 of file PRSolution.hpp. |
|
|
Convergence limit (m): continue iteration loop while RSS change in solution exceeds this.
Definition at line 374 of file PRSolution.hpp. |
|
|
Matrix<double> containing the computed solution covariance (meter^2); see doc. for Solution for the components; valid only when isValid() is true. Definition at line 414 of file PRSolution.hpp. |
|
|
If true, RAIMCompute() will output solution information to *pDebugStream.
Definition at line 360 of file PRSolution.hpp. |
|
|
DOPs computed in a call to DOPCompute() or outputString().
Definition at line 438 of file PRSolution.hpp. Referenced by PRSolution::DOPCompute(). |
|
|
This determines whether this object will maintain a "memory" of all the solutions it has computed. This is used for several things, including the computation of pre-fit residuals, and thus of the aposteriori variance of unit weight (APV), the number of data, solutions and degrees of freedom and a combined weighted average solution. Definition at line 390 of file PRSolution.hpp. |
|
|
Matrix<double> containing the inverse measurement covariance matrix (m^-2) that was used in computing the final solution.
Definition at line 418 of file PRSolution.hpp. |
|
|
Maximum number of iterations allowed in the linearized least squares algorithm.
Definition at line 370 of file PRSolution.hpp. |
|
|
Slope computed in the RAIM algorithm (largest of all satellite values) for the returned solution, dimensionless.
Definition at line 435 of file PRSolution.hpp. |
|
|
The "memory" object, used only when hasMemory is true.
Definition at line 424 of file PRSolution.hpp. |
|
|
if true, the solution was constructed from a mixed dataset, including both GPS and Glonass satellites. This means the Solution vector will have length 5, with the last element being the estimated GPS-GLO time offset. Definition at line 452 of file PRSolution.hpp. |
|
|
the actual number of iterations used
Definition at line 441 of file PRSolution.hpp. |
|
|
Maximum number of satellites that may be rejected in the RAIM algorithm; if this = -1, as many as possible will be rejected (RAIM requires at least 5 satellites). A (single) non-RAIM solution can be obtained by setting this to 0 before calling RAIMCompute(). Definition at line 357 of file PRSolution.hpp. |
|
|
the number of good satellites used in the final computation
Definition at line 447 of file PRSolution.hpp. |
|
|
Matrix<double> containing the partials matrix used in the final solution.
Definition at line 421 of file PRSolution.hpp. Referenced by PRSolution::DOPCompute(). |
|
|
Pointer to an ostream, default &std::cout; if Debug is true, RAIMCompute() will print all preliminary solutions to this stream.
Definition at line 364 of file PRSolution.hpp. |
|
|
DOPs computed in a call to DOPCompute() or outputString().
Definition at line 438 of file PRSolution.hpp. Referenced by PRSolution::DOPCompute(). |
|
|
Prefit residuals; only valid if memory exists b/c it needs apriori solution.
Definition at line 427 of file PRSolution.hpp. |
|
|
Use a rejection criterion based on RMS residual of fit (true) or RMS distance from an a priori position. If false, member Vector Solution must be defined as this a priori position when RAIMCompute() is called. Definition at line 346 of file PRSolution.hpp. |
|
|
Return as soon as a solution meeting the limit requirements is found (this makes it a non-RAIM algorithm).
Definition at line 351 of file PRSolution.hpp. |
|
|
if true, the returned solution may be degraded because the RMS residual or the slope is large; applies only after calls to RAIMCompute().
Definition at line 461 of file PRSolution.hpp. |
|
|
RMS limit (m) on residual of fit.
Definition at line 334 of file PRSolution.hpp. |
|
|
Root mean square residual of fit (except when RMSDistanceFlag is set, then RMS distance from apriori position); in meters.
Definition at line 431 of file PRSolution.hpp. |
|
|
vector<SatID> containing satellite IDs for all the satellites input, with bad (excluded) ones identified by (Satellite[.] < 0). This vector is saved after each call to the computation routines (SimplePRSolution and RAIMCompute) and used for printing. Definition at line 398 of file PRSolution.hpp. |
|
|
if true, the returned solution may be degraded because the RMS residual or the slope is large; applies only after calls to RAIMCompute().
Definition at line 461 of file PRSolution.hpp. |
|
|
Slope limit (dimensionless).
Definition at line 337 of file PRSolution.hpp. |
|
|
Vector<double> containing the computed position solution (3 components, ECEF in the frame of the ephemeris, meter), the receiver clock bias (m), and the GPS-GLO time offset (m). In the case of GPS-only or GLO-only data, the last element is zero and has no meaning. This vector is valid only when isValid() is true. If this vector is defined on input, it is used as an apriori position, both to initialized the iterative algorithm, and to compute position residuals after a good solution is found. Definition at line 410 of file PRSolution.hpp. |
|
|
vector<SatID> containing the satellite systems included in the solution. It should be defined before the first solution call; if it is empty at that time it will be determined by the input SatelliteIDs. It is used to determine which clock biases are included in the solution; ordering of this vector determines ordering of the clock states in the RAIM solution: Solution ~ X,Y,Z,(clks ~ SystemIDs). The SimplePRSolution is similarly defined by the vector which is returned by that routine. Definition at line 383 of file PRSolution.hpp. |
|
|
DOPs computed in a call to DOPCompute() or outputString().
Definition at line 438 of file PRSolution.hpp. Referenced by PRSolution::DOPCompute(). |
|
|
if true, the returned solution may be degraded because the tropospheric correction was not applied to one or more satellites; applies after calls to both SimplePRSolution() and RAIMCompute().
Definition at line 457 of file PRSolution.hpp. |
1.3.9.1