📄 tropmodel.hpp
字号:
* * @code * nb.setReceiverHeight(height); * trop = nb.correction(elevation); * @endcode * * NB in this model, units of 'temp' are degrees Kelvin, and 'humid' * is the water vapor partial pressure. */ class NBTropModel : public TropModel { public: /// Empty constructor NBTropModel(void); /// Create a trop model using the minimum information: latitude and doy. /// Interpolate the weather unless setWeather (optional) is called. /// @param lat Latitude of the receiver in degrees. /// @param day Day of year. NBTropModel(const double& lat, const int& day); /// Create a trop model with weather. /// @param lat Latitude of the receiver in degrees. /// @param day Day of year. /// @param wx the weather to use for this correction. NBTropModel(const double& lat, const int& day, const WxObservation& wx) throw(InvalidParameter); /// Create a tropospheric model from explicit weather data /// @param lat Latitude of the receiver in degrees. /// @param day Day of year. /// @param T temperature in degrees Celsius /// @param P atmospheric pressure in millibars /// @param H relative humidity in percent NBTropModel(const double& lat, const int& day, const double& T, const double& P, const double& H) throw(InvalidParameter); /// Create a valid model from explicit input /// (weather will be estimated internally by this model). /// @param ht Height of the receiver in meters. /// @param lat Latitude of the receiver in degrees. /// @param day Day of year. NBTropModel(const double& ht, const double& lat, const int& day); /// Compute and return the full tropospheric delay /// @param elevation Elevation of satellite as seen at receiver, in degrees virtual double correction(double elevation) const throw(InvalidTropModel); /** * Compute and return the full tropospheric delay, given the positions of * receiver and satellite and the time tag. This version is most useful * within positioning algorithms, where the receiver position and timetag * may vary; it computes the elevation (and other receiver location * information) and passes them to appropriate set...() routines and the * correction(elevation) routine. * @param RX Receiver position * @param SV Satellite position * @param tt Time tag of the signal */ virtual double correction(const Position& RX, const Position& SV, const DayTime& tt) throw(InvalidTropModel); /** \deprecated * Compute and return the full tropospheric delay, given the positions of * receiver and satellite and the time tag. This version is most useful * within positioning algorithms, where the receiver position and timetag * may vary; it computes the elevation (and other receiver location * information) and passes them to appropriate set...() routines and the * correction(elevation) routine. * @param RX Receiver position in ECEF cartesian coordinates (meters) * @param SV Satellite position in ECEF cartesian coordinates (meters) * @param tt Time tag of the signal */ virtual double correction(const Xvt& RX, const Xvt& SV, const DayTime& tt) throw(InvalidTropModel); /// Compute and return the zenith delay for dry component /// of the troposphere virtual double dry_zenith_delay(void) const throw(InvalidTropModel); /// Compute and return the zenith delay for wet component /// of the troposphere virtual double wet_zenith_delay(void) const throw(InvalidTropModel); /// Compute and return the mapping function for dry component of /// the troposphere. /// @param elevation Elevation of satellite as seen at receiver, in degrees virtual double dry_mapping_function(double elevation) const throw(InvalidTropModel); /// Compute and return the mapping function for wet component of /// the troposphere. /// @param elevation Elevation of satellite as seen at receiver, in degrees virtual double wet_mapping_function(double elevation) const throw(InvalidTropModel); /// Re-define the tropospheric model with explicit weather data. /// Typically called just before correction(). /// @param wx the weather to use for this correction virtual void setWeather(const WxObservation& wx) throw(InvalidParameter); /// Define the weather data; typically called just before correction(). /// @param T temperature in degrees Celsius /// @param P atmospheric pressure in millibars /// @param H relative humidity in percent virtual void setWeather(const double& T, const double& P, const double& H) throw(InvalidParameter); /// configure the model to estimate the weather using lat and doy void setWeather() throw(InvalidTropModel); /// Define the receiver height; this required before calling /// correction() or any of the zenith_delay or mapping_function routines. /// @param ht Height of the receiver in meters. void setReceiverHeight(const double& ht); /// Define the latitude of the receiver; this is required before calling /// correction() or any of the zenith_delay or mapping_function routines. /// @param lat Latitude of the receiver in degrees. void setReceiverLatitude(const double& lat); /// Define the day of year; this is required before calling /// correction() or any of the zenith_delay or mapping_function routines. /// @param d Day of year. void setDayOfYear(const int& d); private: bool interpolateWeather; // if true, compute T,P,H from latitude,doy double height; // height (m) of the receiver double latitude; // latitude (deg) of receiver int doy; // day of year bool validWeather; bool validRxLatitude; bool validRxHeight; bool validDOY; }; // end class NBTropModel //--------------------------------------------------------------------------------- /** Saastamoinen tropospheric model based on Saastamoinen, J., 'Atmospheric * Correction for the Troposphere and Stratosphere in Radio Ranging of * Satellites,' Geophysical Monograph 15, American Geophysical Union, 1972, * and Ch 9 of McCarthy, D and Petit, G, IERS Conventions (2003), IERS * Technical Note 32, IERS, 2004. The mapping functions are from * Neill, A.E., 1996, 'Global Mapping Functions for the Atmosphere Delay of * Radio Wavelengths,' J. Geophys. Res., 101, pp. 3227-3246 (also see IERS TN 32). * * This model includes a wet and dry component, and requires input of the * geodetic latitude, day of year and height above the ellipsoid of the receiver. * * Usually, the caller will set the latitude and day of year at the same * time the weather is set * SaasTropModel stm; * stm.setReceiverLatitude(lat); * stm.setDayOfYear(doy); * stm.setWeather(T,P,H); * Then, when the correction (and/or delay and map) is computed, receiver height * should be set before the call to correction(elevation): * stm.setReceiverHeight(height); * trop_corr = stm.correction(elevation); * * NB in this model, units of 'temp' are degrees Celsius and * humid actually stores water vapor partial pressure in mbars */ class SaasTropModel : public TropModel { public: /// Empty constructor SaasTropModel(void); /// Create a trop model using the minimum information: latitude and doy. /// @param lat Latitude of the receiver in degrees. /// @param day Day of year. SaasTropModel(const double& lat, const int& day); /// Create a trop model with weather. /// @param lat Latitude of the receiver in degrees. /// @param day Day of year. /// @param wx the weather to use for this correction. SaasTropModel(const double& lat, const int& day, const WxObservation& wx) throw(InvalidParameter); /// Create a tropospheric model from explicit weather data /// @param lat Latitude of the receiver in degrees. /// @param day Day of year. /// @param T temperature in degrees Celsius /// @param P atmospheric pressure in millibars /// @param H relative humidity in percent SaasTropModel(const double& lat, const int& day, const double& T, const double& P, const double& H) throw(InvalidParameter); /// Compute and return the full tropospheric delay /// @param elevation Elevation of satellite as seen at receiver, in degrees virtual double correction(double elevation) const throw(InvalidTropModel); /** * Compute and return the full tropospheric delay, given the positions of * receiver and satellite and the time tag. This version is most useful * within positioning algorithms, where the receiver position and timetag * may vary; it computes the elevation (and other receiver location * information) and passes them to appropriate set...() routines and the * correction(elevation) routine. * @param RX Receiver position * @param SV Satellite position * @param tt Time tag of the signal */ virtual double correction(const Position& RX, const Position& SV, const DayTime& tt) throw(InvalidTropModel); /** \deprecated * Compute and return the full tropospheric delay, given the positions of * receiver and satellite and the time tag. This version is most useful * within positioning algorithms, where the receiver position and timetag * may vary; it computes the elevation (and other receiver location * information) and passes them to appropriate set...() routines and the * correction(elevation) routine. * @param RX Receiver position in ECEF cartesian coordinates (meters) * @param SV Satellite position in ECEF cartesian coordinates (meters) * @param tt Time tag of the signal */ virtual double correction(const Xvt& RX, const Xvt& SV, const DayTime& tt) throw(InvalidTropModel); /// Compute and return the zenith delay for dry component /// of the troposphere virtual double dry_zenith_delay(void) const throw(InvalidTropModel); /// Compute and return the zenith delay for wet component /// of the troposphere virtual double wet_zenith_delay(void) const throw(InvalidTropModel); /// Compute and return the mapping function for dry component of /// the troposphere. NB this function will return infinity at zero elevation. /// @param elevation Elevation of satellite as seen at receiver, in degrees virtual double dry_mapping_function(double elevation) const throw(InvalidTropModel); /// Compute and return the mapping function for wet component of /// the troposphere. /// @param elevation Elevation of satellite as seen at receiver, in degrees virtual double wet_mapping_function(double elevation) const throw(InvalidTropModel); /// Re-define the tropospheric model with explicit weather data. /// Typically called just before correction(). /// @param wx the weather to use for this correction virtual void setWeather(const WxObservation& wx) throw(InvalidParameter); /// Define the weather data; typically called just before correction(). /// @param T temperature in degrees Celsius /// @param P atmospheric pressure in millibars /// @param H relative humidity in percent virtual void setWeather(const double& T, const double& P, const double& H) throw(InvalidParameter); /// Define the receiver height; this required before calling /// correction() or any of the zenith_delay or mapping_function routines. /// @param ht Height of the receiver in meters. void setReceiverHeight(const double& ht); /// Define the latitude of the receiver; this is required before calling /// correction() or any of the zenith_delay or mapping_function routines. /// @param lat Latitude of the receiver in degrees. void setReceiverLatitude(const double& lat); /// Define the day of year; this is required before calling /// correction() or any of the zenith_delay or mapping_function routines.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -