📄 datastructures.hpp
字号:
/// Returns a gnssSatTypeValue with only this type of data. /// @param type Type of value to be extracted. gnssSatTypeValue extractTypeID(const TypeID& type) const; /// Returns a gnssSatTypeValue with only these types of data. /// @param typeSet Set (TypeIDSet) containing the types of data /// to be extracted. gnssSatTypeValue extractTypeID(const TypeIDSet& typeSet) const; /// Modifies this object, keeping only this type of data. /// @param type Type of value to be kept. gnssSatTypeValue& keepOnlyTypeID(const TypeID& type); /// Modifies this object, keeping only these types of data. /// @param typeSet Set (TypeIDSet) containing the types of data /// to be kept. gnssSatTypeValue& keepOnlyTypeID(const TypeIDSet& typeSet); /// Modifies this object, removing this satellite. /// @param satellite Satellite to be removed. gnssSatTypeValue& removeSatID(const SatID& satellite) { (*this).body.erase(satellite); return (*this); } /// Modifies this object, removing these satellites. /// @param satSet Set (SatIDSet) containing the satellites /// to be removed. gnssSatTypeValue& removeSatID(const SatIDSet& satSet); /// Modifies this object, removing this type of data. /// @param type Type of value to be kept. gnssSatTypeValue& removeTypeID(const TypeID& type) { (*this).body.removeTypeID(type); return (*this); } /// Modifies this object, removing these types of data /// @param typeSet Set (TypeIDSet) containing the types of data /// to be kept. gnssSatTypeValue& removeTypeID(const TypeIDSet& typeSet); /// Returns a GPSTk::Vector containing the data values with this type. /// @param type Type of value to be returned. Vector<double> getVectorOfTypeID(const TypeID& type) const { return ( (*this).body.getVectorOfTypeID(type) ); } /** Modifies this object, adding one vector of data with this type, * one value per satellite. * * If type already exists, data is overwritten. If the number of * values does not match with the number of satellites, a * NumberOfSatsMismatch exception is thrown. * * Given that dataVector does not store information about the * satellites the values correspond to, the user is held responsible * for having the data values stored in dataVector in the proper order * regarding the SatIDs in this object. * * @param type Type of data to be added. * @param dataVector GPSTk Vector containing the data to be added. */ gnssSatTypeValue& insertTypeIDVector( const TypeID& type, const Vector<double> dataVector ) throw(NumberOfSatsMismatch) { (*this).body.insertTypeIDVector(type, dataVector); return (*this); } /** Modifies this object, adding a matrix of data, one vector * per satellite. * * If types already exists, data is overwritten. If the number of * rows in matrix does not match with the number of satellites, a * NumberOfSatsMismatch exception is thrown. If the number of columns * in matrix does not match with the number of types in typeSet, a * NumberOfTypesMismatch exception is thrown. * * Given that dataMatrix does not store information about the * satellites and types the values correspond to, the user is held * responsible for having those data values stored in dataMatrix in * the proper order regarding the SatIDs in this object and the * provided typeSet. * * @param typeSet Set (TypeIDSet) containing the types of data * to be added. * @param dataMatrix GPSTk Matrix containing the data to be added. */ gnssSatTypeValue& insertMatrix( const TypeIDSet& typeSet, const Matrix<double> dataMatrix ) throw(NumberOfSatsMismatch, NumberOfTypesMismatch) { (*this).body.insertMatrix(typeSet, dataMatrix); return (*this); } /** Returns a reference to the typeValueMap with corresponding * satellite. * * This operator allows direct access to data values when chained * with the typeValueMap::operator(), like this: * * gRin(sat21)(TypeID::C1). * * Example: * * @code * // Create the input file stream * RinexObsStream rin("bahr1620.04o"); * * // Declare a gnssRinex object * gnssRinex gRin; * * // Create a satellite object * SatID sat21(21,SatID::systemGPS); * * // Feed the gRin data structure * while(rin >> gRin) * { * try * { * if (gRin(sat21)(TypeID::C1) == 0.0) * { * gRin(sat21)(TypeID::C1) = 123.456; * } * * cout << "C1 value for satellite G21: " * << gRin(sat21)(TypeID::C1) << endl; * } * catch (SatIDNotFound& e) * { * cout << endl << "Satellite G21 not found." << endl; * }; * } * @endcode * * @param satellite Satellite to be looked for. */ typeValueMap& operator()(const SatID& satellite) throw(SatIDNotFound) { return (*this).body(satellite); } /// Destructor. virtual ~gnssSatTypeValue() {}; }; // End of gnssSatTypeValue /// GNSS data structure with source, epoch and extra Rinex data as /// header (common indexes) and satTypeValueMap as body. struct gnssRinex : gnssSatTypeValue { /// Header. sourceEpochRinexHeader header; /// Returns a gnssRinex with only this satellite. /// @param satellite Satellite to be extracted. gnssRinex extractSatID(const SatID& satellite) const; /// Returns a gnssRinex with only one satellite, identified by /// the given parameters. /// @param p Satellite PRN number. /// @param p System the satellite belongs to. gnssRinex extractSatID( const int& p, const SatID::SatelliteSystem& s ) const; /// Returns a gnssRinex with only these satellites. /// @param satSet Set (SatIDSet) containing the satellites /// to be extracted. gnssRinex extractSatID(const SatIDSet& satSet) const; /// Modifies this object, keeping only this satellite. /// @param satellite Satellite to be kept. gnssRinex& keepOnlySatID(const SatID& satellite); /// Modifies this object, keeping only this satellite. /// @param p Satellite PRN number. /// @param p System the satellite belongs to. gnssRinex& keepOnlySatID( const int& p, const SatID::SatelliteSystem& s ); /// Modifies this object, keeping only these satellites. /// @param satSet Set (SatIDSet) containing the satellites to be kept. gnssRinex& keepOnlySatID(const SatIDSet& satSet); /// Returns a gnssRinex with only this type of data. /// @param type Type of value to be extracted. gnssRinex extractTypeID(const TypeID& type) const; /// Returns a gnssRinex with only these types of data. /// @param typeSet Set (TypeIDSet) containing the types of data /// to be extracted. gnssRinex extractTypeID(const TypeIDSet& typeSet) const; /// Modifies this object, keeping only this type of data. /// @param type Type of value to be kept. gnssRinex& keepOnlyTypeID(const TypeID& type); /// Modifies this object, keeping only these types of data. /// @param typeSet Set (TypeIDSet) containing the types of data /// to be kept. gnssRinex& keepOnlyTypeID(const TypeIDSet& typeSet); /// Destructor. virtual ~gnssRinex() {}; }; // End of gnssRinex /// Object defining the structure of a GNSS equation. The header is the /// prefit and the body is a TypeIDSet containing the unknowns. struct gnssEquationDefinition : gnssData<TypeID, TypeIDSet> { /// Default constructor. gnssEquationDefinition() {}; /// Common constructor. gnssEquationDefinition(const TypeID& h, const TypeIDSet& b) { header = h; body = b; } /// Destructor. virtual ~gnssEquationDefinition() {}; }; // End of gnssEquationDefinition /// Object defining the structure of a GNSS linear combination. The /// header is the result type and the body is a typeValueMap containing /// the GNSS data types to be combined plus corresponding coefficients. struct gnssLinearCombination : gnssData<TypeID, typeValueMap> { /// Default constructor. gnssLinearCombination() {}; /// Common constructor. gnssLinearCombination(const TypeID& h, const typeValueMap& b) { header = h; body = b; } /// Destructor. virtual ~gnssLinearCombination() {}; }; // End of gnssLinearCombination /// List containing gnssLinearCombination objects. typedef std::list<gnssLinearCombination> LinearCombList; /// Stream input for gnssSatTypeValue. /// @param i Input stream. /// @param f gnssSatTypeValue receiving the data. std::istream& operator>>( std::istream& i, gnssSatTypeValue& f) throw(FFStreamError, gpstk::StringUtils::StringException); /// Input for gnssSatTypeValue from RinexObsHeader. /// @param roh RinexObsHeader holding the data. /// @param f gnssSatTypeValue receiving the data. gnssSatTypeValue& operator>>( const RinexObsHeader& roh, gnssSatTypeValue& f ); /// Input for gnssSatTypeValue from RinexObsData. /// @param rod RinexObsData holding the data. /// @param f gnssSatTypeValue receiving the data. gnssSatTypeValue& operator>>( const RinexObsData& rod, gnssSatTypeValue& f ); /// Input for gnssRinex from RinexObsHeader. /// @param roh RinexObsHeader holding the data. /// @param f gnssRinex receiving the data. gnssRinex& operator>>( const RinexObsHeader& roh, gnssRinex& f ); /// Input for gnssRinex from RinexObsData. /// @param rod RinexObsData holding the data. /// @param f gnssRinex receiving the data. gnssRinex& operator>>( const RinexObsData& rod, gnssRinex& f ); /// Convenience function to convert from SatID system to SourceID type. /// @param sid Satellite ID. SourceID::SourceType SatIDsystem2SourceIDtype(const SatID& sid); /// Convenience function to fill a typeValueMap with data /// from RinexObsTypeMap. typeValueMap FilltypeValueMapwithRinexObsTypeMap( const RinexObsData::RinexObsTypeMap& otmap ); /// Convenience function to fill a satTypeValueMap with data /// from RinexObsData. /// @param rod RinexObsData holding the data. satTypeValueMap FillsatTypeValueMapwithRinexObsData( const RinexObsData& rod ); /** Stream input for gnssRinex. * * This handy operator allows to fed a gnssRinex data structure * directly from an input stream such a RinexObsStream object. * * For example: * * @code * // Create the input file stream * RinexObsStream rin("bahr1620.04o"); * * // Declare a gnssRinex object * gnssRinex gRin; * * // Feed the gRin data structure * while( rin >> gRin ) * { * // Lots of stuff in here... * } * @endcode */ std::istream& operator>>( std::istream& i, gnssRinex& f ) throw(FFStreamError, gpstk::StringUtils::StringException); /** This function constructs a DayTime object from the given parameters. * * @param line the encoded time string found in the RINEX record. * @param hdr the RINEX Observation Header object for the current * RINEX file. */ DayTime parseTime( const std::string& line, const RinexObsHeader& hdr ) throw(FFStreamError); //@} } // namespace gpstk#endif // DATASTRUCTURES_HPP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -