70 QString::SectionFlag flag = QString::SectionSkipEmpty;
71 bool degreesSucceeded, minutesSucceeded, secondsSucceeded;
73 double degrees =
angle.section(
' ', 0, 0, flag).toDouble(°reesSucceeded);
74 double minutes =
angle.section(
' ', 1, 1, flag).toDouble(&minutesSucceeded);
75 double seconds =
angle.section(
' ', 2, 2, flag).toDouble(&secondsSucceeded);
77 if (!(degreesSucceeded && minutesSucceeded && secondsSucceeded) ) {
78 QString msg = QObject::tr(
"[%1] is not a vaid input to Angle. It needs to be of the form: " 79 "\"dd mm ss.ss\"").arg(
angle);
89 double decimalDegrees =
degrees + minutes/60.0 + seconds/3600.0;
137 double otherAngle = angle2.
radians();
155 double otherAngle = angle2.
radians();
225 IString msg =
"Cannot compare a invalid angles with the < operator";
243 IString msg =
"Cannot compare a invalid angles with the > operator";
259 QString textResult =
"";
265 textResult +=
" degrees";
292 IString msg =
"Angle can not interpret the enumerated value [" +
310 double angleValue =
Null;
322 if(angleValue ==
Null) {
323 IString msg =
"Angle can not interpret the enumerated value [" +
341 IString msg =
"Angle cannot be a non-Null special pixel";
361 IString msg =
"Angle can not interpret the enumerated value [" +
384 dbg.nospace() << angleToPrint.
radians() <<
" <radians> (" 385 << angleToPrint.
degrees() <<
" <degrees>)";
Angle operator*(double value) const
Multiply this angle by a double and return the resulting angle.
const double Null
Value for an Isis Null pixel.
Units
The set of usable angle measurement units.
const double PI
The mathematical constant PI.
Angle operator-(const Angle &angle2) const
Subtract angle value from another and return the resulting angle.
double radians() const
Convert an angle to a double.
virtual void setAngle(const double &angle, const Units &unit)
Set angle value in desired units.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Angle operator*(double mult, Angle angle)
Multiply this angle by a double and return the resulting angle.
This error is for when a programmer made an API call that was illegal.
double degrees() const
Get the angle in units of Degrees.
Angle operator+(const Angle &angle2) const
Add angle value to another.
QDebug operator<<(QDebug dbg, const Isis::Angle &angleToPrint)
Display an Angle for a debugging statement.
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
Angle()
Constructs a blank angle object which needs a value to be set in order to do any calculations.
virtual QString toString(bool includeUnits=true) const
Get the angle in human-readable form.
#define _FILEINFO_
Macro for the filename and line number.
bool IsSpecial(const double d)
Returns if the input pixel is special.
double unitWrapValue(const Units &unit) const
Return wrap value in desired units.
const double DEG2RAD
Multiplier for converting from degrees to radians.
static Angle fullRotation()
Makes an angle to represent a full rotation (0-360 or 0-2pi).
Defines an angle and provides unit conversions.
bool operator<(const Angle &angle2) const
Test if the other angle is less than the current angle.
Angle operator/(double value) const
Divide this angle by a double.
virtual ~Angle()
Destroys the angle object.
virtual double angle(const Units &unit) const
Return angle value in desired units.
Adds specific functionality to C++ strings.
Namespace for ISIS/Bullet specific routines.
bool isValid() const
This indicates whether we have a legitimate angle stored or are in an unset, or invalid, state.
Radians are generally used in mathematical equations, 0-2*PI is one circle, however these are more di...
const double RAD2DEG
Multiplier for converting from radians to degrees.
double m_radians
The angle measure, always stored in radians.
bool operator>(const Angle &angle2) const
Test if the other angle is greater than the current angle.