![]() |
MineLink
|
This class allows to store different slope angles depending on azimuth. More...
#include <rosetta.h>
Public Member Functions | |
RosettaSlope (vector< double > azimuth_angles, vector< double > slopes) | |
Creates a new rosetta. More... | |
unsigned long | NumAngles () const |
Returns the number of angles (Azimuth/Slopes). More... | |
unsigned long | GetNumAngles () const |
Returns the number of angles (Azimuth/Slopes). More... | |
double | SlopeAngleByIndex (const unsigned int &i) const |
Returns the \(i\)-th slope angle. More... | |
double | AzimuthAngleByIndex (const unsigned int &i) const |
Returns the \(i\)-th-th azimuth angle. More... | |
double | SlopeAngleAt (const double &azimuth) const |
Returns the slope angle that applies at a given Azimuth. More... | |
This class allows to store different slope angles depending on azimuth.
This class is not a precedence. It only stores values that are useful in order to construct one.
delphos::RosettaSlope::RosettaSlope | ( | vector< double > | azimuth_angles, |
vector< double > | slopes | ||
) |
Creates a new rosetta.
azimuth_angles | The azimuth angles (in degrees). 0 corresponds to North. |
slopes | The slope angles (in degrees) that apply for each azimuth. |
Azimuth angles should be positive and add up to 360. If the addition is larger than 360, then the "rest" is ignored. It they add less than 360, then the last angle is used to complete the difference.
Azimuth angles shoull be between 0 and 360 (both inclusive). Slope angles should be between 0 and 90 (both inclusive).
Angles cannot be changed after the object is constructed.
If the azimuth_angles and slopes vectors have a different sizes, only the smallest one is used (so remaining values in the larger vector are ignored). In particular, if the slopes vector is smaller, then some azimuth angles could be ignored.
If any of the submitted angle containers is empty, an exception is thrown.
double delphos::RosettaSlope::AzimuthAngleByIndex | ( | const unsigned int & | i | ) | const |
Returns the \(i\)-th-th azimuth angle.
i | The index of the angle (starting at 0). |
The given index must be between 0 and RosettaSlope::NumAngles()-1. If the index is greater than RosettaSlope::NumAngles()-1, an exception is thrown.
unsigned long delphos::RosettaSlope::GetNumAngles | ( | ) | const |
Returns the number of angles (Azimuth/Slopes).
unsigned long delphos::RosettaSlope::NumAngles | ( | ) | const |
Returns the number of angles (Azimuth/Slopes).
double delphos::RosettaSlope::SlopeAngleAt | ( | const double & | azimuth | ) | const |
Returns the slope angle that applies at a given Azimuth.
azimuth | The azimuth angle to look by. |
This method will look at the azimuth section that applies to the given value and return the slope angle for that section.
If the submmited azimuth angle is negative the slope angle for the 0-azimuth is returned, if it is greater than 360 the slope angle for the 360-azimuth angle is returned.
double delphos::RosettaSlope::SlopeAngleByIndex | ( | const unsigned int & | i | ) | const |
Returns the \(i\)-th slope angle.
i | The index of the angle (starting at 0). |
The given index must be between 0 and RosettaSlope::NumAngles()-1. If the index is greater than RosettaSlope::NumAngles()-1, an exception is thrown.