⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modeledreferencepr.hpp

📁 gps源代码
💻 HPP
📖 第 1 页 / 共 2 页
字号:
/** * @file ModeledReferencePR.hpp * Class to compute modeled pseudoranges using a reference station */#ifndef GPSTK_MODELEDREFERENCEPR_HPP#define GPSTK_MODELEDREFERENCEPR_HPP//============================================================================////  This file is part of GPSTk, the GPS Toolkit.////  The GPSTk is free software; you can redistribute it and/or modify//  it under the terms of the GNU Lesser General Public License as published//  by the Free Software Foundation; either version 2.1 of the License, or//  any later version.////  The GPSTk is distributed in the hope that it will be useful,//  but WITHOUT ANY WARRANTY; without even the implied warranty of//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the//  GNU Lesser General Public License for more details.////  You should have received a copy of the GNU Lesser General Public//  License along with GPSTk; if not, write to the Free Software Foundation,//  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA//  //  Dagoberto Salazar - gAGE ( http://www.gage.es ). 2006, 2007////============================================================================#include "ModeledPseudorangeBase.hpp"#include "DayTime.hpp"#include "EngEphemeris.hpp"#include "EphemerisStore.hpp"#include "EphemerisRange.hpp"#include "TropModel.hpp"#include "IonoModel.hpp"#include "IonoModelStore.hpp"#include "Geodetic.hpp"#include "Position.hpp"#include "icd_200_constants.hpp"#include "TypeID.hpp"#include "DataStructures.hpp"namespace gpstk{      /** @addtogroup GPSsolutions */      //@{      /** This class compute modeled pseudoranges from satellites to a reference station.       *       * This class may be used either in a Vector- and Matrix-oriented way, or       * with GNSS data structure objects from "DataStructures" class. In any       * case, it is intented to be used with stations where the position is       * known (there comes the name: Modeled Reference station PseudoRange).       *       * A typical way to use this class with GNSS data structures follows:       *       * @code       *   RinexObsStream rin("ebre0300.02o");  // Data stream       *   RinexNavStream rnavin("brdc0300.02n");   // Ephemeris data stream       *   RinexNavData rNavData;       *   BCEphemerisStore bceStore;       *   while (rnavin >> rNavData) bceStore.addEphemeris(rNavData);       *   bceStore.SearchPast();  // This is the default       *       *   RinexNavHeader rNavHeader;       *   IonoModelStore ionoStore;       *   IonoModel ioModel;       *   rnavin >> rNavHeader;    // Read navigation RINEX header       *   ioModel.setModel(rNavHeader.ionAlpha, rNavHeader.ionBeta);       *   ionoStore.addIonoModel(DayTime::BEGINNING_OF_TIME, ioModel);       *       *   // EBRE station nominal position       *   Position nominalPos(4833520.3800, 41536.8300, 4147461.2800);       *       *   // Declare a tropospheric model object, setting the defaults       *   MOPSTropModel mopsTM(nominalPos.getAltitude(), nominalPos.getGeodeticLatitude(), 30);       *       *   // Declare the modeler object, setting all the parameters in one pass       *   // As stated, it will compute the model using the C1 observable       *   ModeledReferencePR modelRef(nominalPos, ionoStore, mopsTM, bceStore, TypeID::C1);       *       *   gnssRinex gRin;       *       *   while(rin >> gRin) {       *      gRin >> modelRef;       *   }       * @endcode       *       * The "ModeledReferencePR" object will visit every satellite in the        * GNSS data structure that is "gRin" and will try to compute its        * model: Prefit residual, geometric distance, relativity delay,       * ionospheric/tropospheric corrections, geometry matrix, etc.       *       * When used with the ">>" operator, this class returns the same incoming       * data structure with the extra data inserted along their corresponding       * satellites. Be warned that if a given satellite does not        * have the observations required, it will be summarily deleted from the data       * structure.       *       * @sa ModeledPseudorangeBase.hpp for base class.       *       */    class ModeledReferencePR : public ModeledPseudorangeBase    {    public:        /// Implicit constructor        ModeledReferencePR() throw(Exception) : useTGD(true), pDefaultIonoModel(NULL), pDefaultTropoModel(NULL), defaultObservable(TypeID::C1), pDefaultEphemeris(NULL)        {             InitializeValues();        };        /** Explicit constructor taking as input reference station coordinates.         *         * Those coordinates may be Cartesian (X, Y, Z in meters) or Geodetic         * (Latitude, Longitude, Altitude), but defaults to Cartesian.          *         * Also, a pointer to GeoidModel may be specified, but default is NULL          * (in which case WGS84 values will be used).         *         * @param aRx   first coordinate [ X(m), or latitude (degrees N) ]         * @param bRx   second coordinate [ Y(m), or longitude (degrees E) ]         * @param cRx   third coordinate [ Z, height above ellipsoid or radius, in m ]         * @param s     coordinate system (default is Cartesian, may be set to Geodetic).         * @param geoid pointer to GeoidModel (default is null, implies WGS84)         */        ModeledReferencePR(const double& aRx, const double& bRx, const double& cRx,             Position::CoordinateSystem s = Position::Cartesian,            GeoidModel *geoid = NULL) throw(Exception) : useTGD(true), pDefaultIonoModel(NULL), pDefaultTropoModel(NULL), defaultObservable(TypeID::C1), pDefaultEphemeris(NULL)        {             InitializeValues();            setInitialRxPosition(aRx, bRx, cRx, s, geoid);        };        /// Explicit constructor, taking as input a Position object containing reference station coordinates.        ModeledReferencePR(const Position& RxCoordinates) throw(Exception) : useTGD(true), pDefaultIonoModel(NULL), pDefaultTropoModel(NULL), defaultObservable(TypeID::C1), pDefaultEphemeris(NULL)        {             InitializeValues();            setInitialRxPosition(RxCoordinates);        };        /** Explicit constructor, taking as input reference station coordinates, default         * ionospheric and tropospheric models, ephemeris to be used, default observable          * and whether TGD will be computed or not.         *         * This constructor is meant to be used when working with GNSS data structures in         * order to set the basic parameters from the beginning.         *         * @param RxCoordinates Reference station coordinates.         * @param dIonoModel    Ionospheric model to be used by default.         * @param dTropoModel   Tropospheric model to be used by default.         * @param dEphemeris    EphemerisStore object to be used by default.         * @param dObservable   Observable type to be used by default.         * @param usetgd        Whether TGD will be used by default or not.         *         * @sa DataStructures.hpp.         */        ModeledReferencePR(const Position& RxCoordinates, IonoModelStore& dIonoModel, TropModel& dTropoModel, EphemerisStore& dEphemeris, const TypeID& dObservable, bool usetgd = true) throw(Exception) {             InitializeValues();            setInitialRxPosition(RxCoordinates);            setDefaultIonoModel(dIonoModel);            setDefaultTropoModel(dTropoModel);            setDefaultObservable(dObservable);            setDefaultEphemeris(dEphemeris);            useTGD = usetgd;        };        /** Explicit constructor, taking as input reference station coordinates, default         * ionospheric model, ephemeris to be used, default observable and whether TGD          * will be computed or not.         *         * The default tropospheric model will be set to NULL.         *         * This constructor is meant to be used when working with GNSS data structures in         * order to set the basic parameters from the beginning.         *         * @param RxCoordinates Reference station coordinates.         * @param dIonoModel    Ionospheric model to be used by default.         * @param dEphemeris    EphemerisStore object to be used by default.         * @param dObservable   Observable type to be used by default.         * @param usetgd        Whether TGD will be used by default or not.         *         * @sa DataStructures.hpp.         */        ModeledReferencePR(const Position& RxCoordinates, IonoModelStore& dIonoModel, EphemerisStore& dEphemeris, const TypeID& dObservable, bool usetgd = true) throw(Exception) : pDefaultTropoModel(NULL) {             InitializeValues();            setInitialRxPosition(RxCoordinates);            setDefaultIonoModel(dIonoModel);            setDefaultObservable(dObservable);            setDefaultEphemeris(dEphemeris);            useTGD = usetgd;        };        /** Explicit constructor, taking as input reference station coordinates, default         * tropospheric model, ephemeris to be used, default observable and whether TGD          * will be computed or not.         *         * The default ionospheric model will be set to NULL.         *         * This constructor is meant to be used when working with GNSS data structures in         * order to set the basic parameters from the beginning.         *         * @param RxCoordinates Reference station coordinates.         * @param dTropoModel   Tropospheric model to be used by default.         * @param dEphemeris    EphemerisStore object to be used by default.         * @param dObservable   Observable type to be used by default.         * @param usetgd        Whether TGD will be used by default or not.         *         * @sa DataStructures.hpp.         */        ModeledReferencePR(const Position& RxCoordinates, TropModel& dTropoModel, EphemerisStore& dEphemeris, const TypeID& dObservable, bool usetgd = true) throw(Exception) : pDefaultIonoModel(NULL) {             InitializeValues();            setInitialRxPosition(RxCoordinates);            setDefaultTropoModel(dTropoModel);            setDefaultObservable(dObservable);            setDefaultEphemeris(dEphemeris);            useTGD = usetgd;        };        /** Explicit constructor, taking as input reference station coordinates,          * ephemeris to be used, default observable and whether TGD will be computed          * or not.         *         * Both the tropospheric and ionospheric models will be set to NULL.         *         * This constructor is meant to be used when working with GNSS data structures in         * order to set the basic parameters from the beginning.         *         * @param RxCoordinates Reference station coordinates.         * @param dEphemeris    EphemerisStore object to be used by default.         * @param dObservable   Observable type to be used by default.         * @param usetgd        Whether TGD will be used by default or not.         *         * @sa DataStructures.hpp.         */        ModeledReferencePR(const Position& RxCoordinates, EphemerisStore& dEphemeris, const TypeID& dObservable, bool usetgd = true) throw(Exception) : pDefaultIonoModel(NULL), pDefaultTropoModel(NULL) {             InitializeValues();            setInitialRxPosition(RxCoordinates);            setDefaultObservable(dObservable);            setDefaultEphemeris(dEphemeris);            useTGD = usetgd;        };        /** Compute the modeled pseudoranges, given satellite ID's, pseudoranges and other data         * @param Tr            Measured time of reception of the data.         * @param Satellite     Vector of satellites; on successful return, satellites that         *                      were excluded by the algorithm are marked by a negative         *                      Satellite[i].prn         * @param Pseudorange   Vector of raw pseudoranges (parallel to satellite), in meters.         * @param Eph           EphemerisStore to be used.         * @param pTropModel    Pointer to tropospheric model to be used. By default points to NULL.         * @param pIonoModel    Pointer to ionospheric model to be used. By default points to NULL.         * @param extraBiases   Vector of extra biases to be added to the model.         *         * @return         *  Number of satellites with valid data         *         * @sa TropModel.hpp, IonoModelStore.hpp.         */        int Compute(const DayTime& Tr, Vector<SatID>& Satellite, Vector<double>& Pseudorange,            const EphemerisStore& Eph, const Vector<double>& extraBiases, TropModel             *pTropModel=NULL, IonoModelStore *pIonoModel=NULL) throw(Exception);        /// Compute the modeled pseudoranges, given satellite ID's, pseudoranges and other data        int Compute(const DayTime& Tr, Vector<SatID>& Satellite, Vector<double>& Pseudorange,            const EphemerisStore& Eph) throw(Exception);        /// Compute the modeled pseudoranges, given satellite ID's, pseudoranges and other data        int Compute(const DayTime& Tr, Vector<SatID>& Satellite, Vector<double>& Pseudorange,            const EphemerisStore& Eph, TropModel *pTropModel) throw(Exception);        /// Compute the modeled pseudoranges, given satellite ID's, pseudoranges and other data        int Compute(const DayTime& Tr, Vector<SatID>& Satellite, Vector<double>& Pseudorange,            const EphemerisStore& Eph, const Vector<double>& extraBiases, IonoModelStore            *pIonoModel) throw(Exception);        /// Compute the modeled pseudoranges, given satellite ID's, pseudoranges and other data        int Compute(const DayTime& Tr, Vector<SatID>& Satellite, Vector<double>& Pseudorange,            const EphemerisStore& Eph, IonoModelStore *pIonoModel) throw(Exception);        /// Compute the modeled pseudoranges, given satellite ID's, pseudoranges and other data        int Compute(const DayTime& Tr, Vector<SatID>& Satellite, Vector<double>& Pseudorange,            const EphemerisStore& Eph, TropModel *pTropModel, IonoModelStore *pIonoModel)            throw(Exception);        /** Compute just one modeled pseudorange, given satellite ID's, pseudorange and other data         * @param Tr            Measured time of reception of the data.         * @param Satellite     ID's of satellite         * @param Pseudorange   Pseudorange (parallel to satellite), in meters.         * @param Eph           EphemerisStore to be used.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -