|
FhSim
3.1.0
Marine systems simulation
|
#include <DepthProfile.h>
Public Member Functions | |
| DepthProfile (std::vector< double > depths, std::vector< double > values) | |
| Status | Evaluate (double z, double &value) const |
| const DepthAxis & | Axis () const |
| The depth axis. | |
| const std::vector< double > & | Values () const |
| The value at each layer. | |
One quantity tabulated at depth layers: linear between the layers, clamped at both ends (owner ruling R122, MENV-0053).
Outside the layers the value is that of the nearest layer, with Status::OUT_OF_RANGE_INACCURATE, a usable value (marenv::IsUsable()); a current of zero below the deepest layer, or a linear extrapolation above the first, would be a guess with no data behind it.
Example usage:
| marenv::calc::DepthProfile::DepthProfile | ( | std::vector< double > | depths, |
| std::vector< double > | values | ||
| ) |
| Status marenv::calc::DepthProfile::Evaluate | ( | double | z, |
| double & | value | ||
| ) | const |
Returns the value at a depth.
| [in] | z | Depth, in the measure of the layers. |
| [out] | value | The interpolated value (DepthAxis::Locate(), DepthInterval::Interpolate()); 0 for Status::ERROR_NOT_SET. |