📄 deltaop.hpp
字号:
/** * @file DeltaOp.hpp * This is a class to apply the Delta operator (differences on ground-related data) to GNSS data structures. */#ifndef DELTAOP_HPP#define DELTAOP_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 ). 2007////============================================================================#include "TypeID.hpp"#include "ProcessingClass.hpp"namespace gpstk{ /** @addtogroup GPSsolutions */ //@{ /** * This class applies the Delta operator (differences on ground-related data) * to GNSS data structures. * * * A typical way to use this class follows: * * @code * // Input observation file stream for ROVER * RinexObsStream rin("ebre0300.02o"); * // Reference position of receiver station * Position nominalPos(4833520.2269, 41537.00768, 4147461.489); * * // Input observation file stream for REFERENCE STATION * RinexObsStream rinRef("garr1900.07o"); * // Reference station nominal position * Position nominalPosRef(4796983.7690, 160308.7500, 4187339.9860); * * // Some more code and definitions here... * * gnssRinex gRin; // GNSS data structure for rover data * gnssRinex gRef; // GNSS data structure for reference station data * * // Set defaults of models. A typical C1-based modeling is used * ModeledPR model(nominalPos, ionoStore, mopsTM, bceStore, TypeID::C1, true); * ModeledReferencePR modelRef(nominalPosRef, ionoStore, mopsTM, bceStore, TypeID::C1, true); * * // Create an object to compute the single differences of prefit residuals * DeltaOp delta; * * * while(rin >> gRin) { * * rinRef >> gRef; // Be sure that data streams ARE synchronized!!! * delta.setRefData(gRef.body); // Set the reference data to be differenced * * gRef >> modelRef; // Apply model to reference data * * // By default, difference is applied on code prefit residuals * gRin >> model >> delta >> solver; * } * * @endcode * * The "DeltaOp" object will visit every satellite in the GNSS data structure that * is "gRin" and will substract from the specified type or types (code prefit * residuals by default) the corresponding data in the "gRef" data structure. * * Take notice that in the default case the code prefit residuals were computed by * the "ModeledPR" and "ModeledReferencePR" objects, so those steps are mandatory. * * Be warned that, by default, if a given satellite does not have in "gRin" the data * required to be differenced, it will be summarily deleted from the data structure. * * @sa NablaOp.hpp for differences on satellite-related data. * */ class DeltaOp : public ProcessingClass { public: /// Default constructor. By default it will difference prefitC data and will delete satellites present in reference station data but missing in input data. DeltaOp() : deleteMissingSats(true) { diffTypes.insert(TypeID::prefitC); setIndex(); }; /** Common constructor taking a satTypeValueMap as reference station data. * By default it will difference prefitC data and will delete satellites * present in reference station data but missing in input data. * * @param gData satTypeValueMap data object holding the reference station data. * @param delSats Boolean value setting if satellites present in reference station data but missing in input data will be deleted from the later (this is the default). */ DeltaOp(const satTypeValueMap& gData, const bool& delSats=true) : refData(gData), deleteMissingSats(delSats) { diffTypes.insert(TypeID::prefitC); setIndex(); } /** Common constructor taking a satTypeValueMap as reference station data. * By default it will delete satellites present in reference station data * but missing in input data. * * @param gData satTypeValueMap data object holding the reference station data. * @param difftype TypeID of data values to be differenced. * @param delSats Boolean value setting if satellites present in reference station data but missing in input data will be deleted from the later (this is the default). */ DeltaOp(const satTypeValueMap& gData, const TypeID& difftype, const bool& delSats=true) : refData(gData), deleteMissingSats(delSats) { diffTypes.insert(difftype); setIndex(); } /** Common constructor taking a satTypeValueMap as reference station data. * By default it will delete satellites present in reference station data * but missing in input data. * * @param gData satTypeValueMap data object holding the reference station data. * @param diffSet TypeIDSet of data values to be differenced. * @param delSats Boolean value setting if satellites present in reference station data but missing in input data will be deleted from the later (this is the default). */ DeltaOp(const satTypeValueMap& gData, const TypeIDSet& diffSet, const bool& delSats=true) : refData(gData), deleteMissingSats(delSats), diffTypes(diffSet) { setIndex(); } /** Common constructor taking a gnssSatTypeValue as reference station data. * By default it will difference prefitC data and will delete satellites * present in reference station data but missing in input data. * * @param gData gnssSatTypeValue data object holding the reference station data. * @param delSats Boolean value setting if satellites present in reference station data but missing in input data will be deleted from the later (this is the default). */ DeltaOp(const gnssSatTypeValue& gData, const bool& delSats=true) : refData(gData.body), deleteMissingSats(delSats) { diffTypes.insert(TypeID::prefitC); setIndex(); } /** Common constructor taking a gnssSatTypeValue as reference station data. * By default it will delete satellites present in reference station data * but missing in input data. * * @param gData gnssSatTypeValue data object holding the reference station data. * @param difftype TypeID of data values to be differenced. * @param delSats Boolean value setting if satellites present in reference station data but missing in input data will be deleted from the later (this is the default). */ DeltaOp(const gnssSatTypeValue& gData, const TypeID& difftype, const bool& delSats=true) : refData(gData.body), deleteMissingSats(delSats) { diffTypes.insert(difftype); setIndex(); } /** Common constructor taking a gnssSatTypeValue as reference station data. * By default it will delete satellites present in reference station data * but missing in input data. * * @param gData gnssSatTypeValue data object holding the reference station data. * @param diffSet TypeIDSet of data values to be differenced. * @param delSats Boolean value setting if satellites present in reference station data but missing in input data will be deleted from the later (this is the default). */ DeltaOp(const gnssSatTypeValue& gData, const TypeIDSet& diffSet, const bool& delSats=true) : refData(gData.body), deleteMissingSats(delSats), diffTypes(diffSet) { setIndex(); } /** Common constructor taking a gnssRinex as reference station data. * By default it will difference prefitC data and will delete satellites * present in reference station data but missing in input data. *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -