ReFRACtor
|
This class handles the calculation of the altitude an gravity constants, automatically updating with the surface pressure or temperature profile is updated. More...
#include <altitude_hydrostatic.h>
Public Member Functions | |
AltitudeHydrostatic (const boost::shared_ptr< Pressure > &P, const boost::shared_ptr< Temperature > &T, const DoubleWithUnit &Latitude, const DoubleWithUnit &Surface_height, const int Num_sublayer=10) | |
Constructor. More... | |
virtual | ~AltitudeHydrostatic () |
virtual void | add_observer (Observer< Altitude > &Obs) |
Add an observer. More... | |
void | add_observer_and_keep_reference (boost::shared_ptr< Observer< Altitude > > &Obs) |
Add an observer and keep a reference to it. More... | |
virtual AutoDerivativeWithUnit< double > | altitude (const AutoDerivativeWithUnit< double > &P) const |
Return altitude grid for the given pressure. More... | |
virtual boost::shared_ptr< Altitude > | clone () const |
Clone an Altitude object. More... | |
virtual boost::shared_ptr< Altitude > | clone (const boost::shared_ptr< Pressure > &Press, const boost::shared_ptr< Temperature > &Temp) const |
This version of clone takes a pressure and temperature to use. More... | |
virtual AutoDerivativeWithUnit< double > | gravity (const AutoDerivativeWithUnit< double > &P) const |
Return gravity constant for the given pressure. More... | |
virtual void | notify_add (Temperature &Observed_object) |
Called when an object is added to an Observable. More... | |
virtual void | notify_add (Pressure &Observed_object) |
Called when an object is added to an Observable. More... | |
virtual void | notify_add () |
virtual void | notify_add () |
virtual void | notify_remove (Pressure &Observed_object) |
Called when an object is removed from an Observable. More... | |
virtual void | notify_remove (Temperature &Observed_object) |
Called when an object is removed from an Observable. More... | |
virtual void | notify_remove () |
virtual void | notify_remove () |
virtual void | notify_update (const Pressure &P) |
For performance, we cache some data as we calculate it. More... | |
virtual void | notify_update (const Temperature &T) |
For performance, we cache some data as we calculate it. More... | |
virtual void | print (std::ostream &Os) const |
std::string | print_to_string () const |
Print to string. More... | |
virtual void | remove_observer (Observer< Altitude > &Obs) |
Remove an observer. More... | |
Protected Member Functions | |
void | add_observer_do (Observer< Altitude > &Obs, Altitude &t) |
Add an observer. More... | |
void | add_observer_do (Observer< Altitude > &Obs) |
void | clean_dead_ptr () |
Remove any dead pointers. More... | |
void | notify_update_do (const Altitude &Self) |
Function to call to notify Observers of a state change. More... | |
void | remove_observer_do (Observer< Altitude > &Obs, Altitude &t) |
Remove an observer. More... | |
void | remove_observer_do (Observer< Altitude > &Obs) |
Protected Attributes | |
std::list< boost::weak_ptr< Observer< Altitude > > > | olist |
std::vector< boost::shared_ptr< Observer< Altitude > > > | ref_list |
This class handles the calculation of the altitude an gravity constants, automatically updating with the surface pressure or temperature profile is updated.
We do this by solving the hydrostatic equations.
Definition at line 19 of file altitude_hydrostatic.h.
AltitudeHydrostatic::AltitudeHydrostatic | ( | const boost::shared_ptr< Pressure > & | P, |
const boost::shared_ptr< Temperature > & | T, | ||
const DoubleWithUnit & | Latitude, | ||
const DoubleWithUnit & | Surface_height, | ||
const int | Num_sublayer = 10 |
||
) |
Constructor.
Latitude for the surface point should be in degrees, and height in meters.
Definition at line 163 of file altitude_hydrostatic.cc.
|
inlinevirtual |
Definition at line 29 of file altitude_hydrostatic.h.
|
inlinevirtualinherited |
Add an observer.
Implements FullPhysics::Observable< Altitude >.
Definition at line 22 of file altitude.h.
|
inlineinherited |
Add an observer and keep a reference to it.
See the discussion in the Observer class description for details.
Definition at line 107 of file observer.h.
|
inlineprotectedinherited |
Add an observer.
Definition at line 148 of file observer.h.
|
inlineprotectedinherited |
Definition at line 159 of file observer.h.
|
inlinevirtual |
Return altitude grid for the given pressure.
Implements FullPhysics::Altitude.
Definition at line 56 of file altitude_hydrostatic.h.
|
inlineprotectedinherited |
Remove any dead pointers.
Definition at line 196 of file observer.h.
|
inlinevirtual |
Clone an Altitude object.
Note that the cloned version will not be attached to and StateVector or Observer<Altitude>, although you can of course attach them after receiving the cloned object.
Because this isn't attached to the StateVector, one use of the clone operator is to create a "frozen" Altitude object.
Implements FullPhysics::Altitude.
Definition at line 67 of file altitude_hydrostatic.h.
|
virtual |
This version of clone takes a pressure and temperature to use.
The intent is that the pressure and temperature has been cloned from the original pressure and temperature (although this class has no way to verify this). This allows sets of objects to be cloned using a common Pressure and Temperature clone, e.g. Atmosphere.
Implements FullPhysics::Altitude.
Definition at line 201 of file altitude_hydrostatic.cc.
|
inlinevirtual |
Return gravity constant for the given pressure.
Implements FullPhysics::Altitude.
Definition at line 61 of file altitude_hydrostatic.h.
|
inlinevirtualinherited |
Called when an object is added to an Observable.
Default is to do nothing.
Definition at line 47 of file observer.h.
|
inlinevirtualinherited |
Called when an object is added to an Observable.
Default is to do nothing.
Definition at line 47 of file observer.h.
|
inlinevirtualinherited |
Definition at line 48 of file observer.h.
|
inlinevirtualinherited |
Definition at line 48 of file observer.h.
|
inlinevirtualinherited |
Called when an object is removed from an Observable.
Default is to do nothing.
Definition at line 55 of file observer.h.
|
inlinevirtualinherited |
Called when an object is removed from an Observable.
Default is to do nothing.
Definition at line 55 of file observer.h.
|
inlinevirtualinherited |
Definition at line 56 of file observer.h.
|
inlinevirtualinherited |
Definition at line 56 of file observer.h.
|
inlinevirtual |
For performance, we cache some data as we calculate it.
This becomes stale when the pressure is changed, so we observe press and mark the cache when it changes.
Reimplemented from FullPhysics::Observer< Pressure >.
Definition at line 39 of file altitude_hydrostatic.h.
|
inlinevirtual |
For performance, we cache some data as we calculate it.
This becomes stale when the temperature is changed, so we observe temperature and mark the cache when it changes.
Reimplemented from FullPhysics::Observer< Temperature >.
Definition at line 50 of file altitude_hydrostatic.h.
|
inlineprotectedinherited |
Function to call to notify Observers of a state change.
The object should pass itself to this function, so it can be passed to the Observers.
Definition at line 121 of file observer.h.
|
inlinevirtual |
Reimplemented from FullPhysics::Altitude.
Definition at line 66 of file altitude_hydrostatic.h.
|
inlineinherited |
Print to string.
This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.
Definition at line 31 of file printable.h.
|
inlinevirtualinherited |
Remove an observer.
Implements FullPhysics::Observable< Altitude >.
Definition at line 24 of file altitude.h.
|
inlineprotectedinherited |
Remove an observer.
Definition at line 173 of file observer.h.
|
inlineprotectedinherited |
Definition at line 181 of file observer.h.
|
protectedinherited |
Definition at line 200 of file observer.h.
|
protectedinherited |
Definition at line 201 of file observer.h.