124 QString msg =
"Unable to create Latitude object from given mapping group.";
131 if (mapping[
"LatitudeType"][0] ==
"Planetographic") {
134 else if (mapping[
"LatitudeType"][0] ==
"Planetocentric") {
138 QString msg =
"Latitude type [" + mapping[
"LatitudeType"][0] +
139 "] is not recognized";
184 QString msg =
"Unable to create Latitude object from given mapping group.";
191 if (mapping[
"LatitudeType"][0] ==
"Planetographic") {
194 else if (mapping[
"LatitudeType"][0] ==
"Planetocentric") {
198 QString msg =
"Latitude type [" + mapping[
"LatitudeType"][0] +
199 "] is not recognized";
242 QString msg =
"Enumeration value [" +
toString(latType) +
"] is not a valid CoordinateType";
331 QString msg =
"Latitude [" +
toString(
true) +
"] cannot " 332 "be converted to Planetographic without the planetary radii, please " 333 "use the other Latitude constructor.";
339 QString msg =
"Latitudes outside of the -90/90 range cannot be converted " 340 "between Planetographic and Planetocentric";
345 QString msg =
"Invalid planetographic latitudes are not currently " 350 double ographicLatitude = atan(tan(
radians()) *
376 QString msg =
"Latitude [" +
Isis::toString(latitude) +
" degrees] cannot be " 377 "converted to Planetocentic without the planetary radii, please use " 378 "the other Latitude constructor.";
382 Angle inputAngle(latitude, units);
386 QString msg =
"Latitudes outside of the -90/90 range cannot be converted " 387 "between Planetographic and Planetocentric";
395 QString msg =
"Invalid planetographic latitudes are not currently " 400 double ocentricLatitude = atan(tan(inputAngle.
radians()) *
405 if ((ocentricLatitude > 0) != (inputAngle.
radians() > 0)) {
406 ocentricLatitude *= -1;
456 QString msg =
"Minimum latitude [" + min.
toString(
true) +
457 "] is greater than maximum latitude [" +
464 Latitude adjustedMin = min - epsilon;
465 Latitude adjustedMax = max + epsilon;
468 return *
this >= adjustedMin && *
this <= adjustedMax;
482 if (
this == &latitudeToCopy)
return *
this;
537 QString msg =
"Unable to add angle to Latitude object from given mapping group.";
542 if (mapping[
"LatitudeType"][0] ==
"Planetocentric")
544 else if (mapping[
"LatitudeType"][0] ==
"Planetographic")
547 QString msg =
"Latitude type [" + mapping[
"LatitudeType"][0] +
"] is not recognized";
551 return add(angleToAdd, equatorialRadius, polarRadius, latType);
604 QString msg =
"Latitudes past 90 degrees are not valid. The latitude [" void setErrorChecking(ErrorChecking errors)
Set the error checking status.
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Units
The set of usable angle measurement units.
Distance * m_polarRadius
Used for converting to Planetographic, this is the radius of the target perpendicular to the equatori...
Don't throw an exception if a latitude beyond -90/90 is found.
double planetographic(Angle::Units units=Angle::Radians) const
Get the latitude in the planetographic coordinate system.
double radians() const
Convert an angle to a double.
virtual void setAngle(const double &angle, const Units &unit)
Set angle value in desired units.
Latitude()
Create a blank Latitude object without Planetographic support.
double planetocentric(Angle::Units units=Angle::Radians) const
Get the latitude in the planetocentric (universal) coordinate system.
This class is designed to encapsulate the concept of a Latitude.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
double toDouble(const QString &string)
Global function to convert from a string to a double.
This error is for when a programmer made an API call that was illegal.
Distance measurement, usually in meters.
double degrees() const
Get the angle in units of Degrees.
This is the universal (and default) latitude coordinate system.
ErrorChecking m_errors
This contains which exceptions should not be thrown.
bool inRange(Latitude min, Latitude max) const
Checks if this latitude value is within the given range.
This is a secondary coordinate system for latitudes.
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.
Contains multiple PvlContainers.
virtual QString toString(bool includeUnits=true) const
Get the angle in human-readable form.
#define _FILEINFO_
Macro for the filename and line number.
A type of error that could only have occurred due to a mistake on the user's part (e...
static PvlGroup radiiGroup(QString target)
Creates a Pvl Group with keywords TargetName, EquitorialRadius, and PolarRadius.
A type of error that cannot be classified as any of the other error types.
bool IsSpecial(const double d)
Returns if the input pixel is special.
void setPlanetographic(double latitude, Angle::Units units=Angle::Radians)
Set the latitude given a value in the Planetographic coordinate system.
void setPlanetocentric(double latitude, Angle::Units units=Angle::Radians)
Set the latitude given a value in the Planetocentric coordinate system.
ErrorChecking errorChecking() const
Get the error checking status.
Distance * m_equatorialRadius
Used for converting to Planetographic, this is the radius of the target on the equatorial plane...
virtual void setAngle(const double &angle, const Angle::Units &units)
Same as planetocentric.
Defines an angle and provides unit conversions.
virtual double angle(const Units &unit) const
Return angle value in desired units.
~Latitude()
This cleans up the Latitude class.
Namespace for ISIS/Bullet specific routines.
ErrorChecking
Some user-configurable error checking parameters.
CoordinateType
These are the latitude coordinate systems.
The distance is being specified in meters.
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...
Latitude add(Angle angleToAdd, PvlGroup mapping)
Adds an angle to this latitude.
Latitude & operator=(const Latitude &latitudeToCopy)
This assigns another latitude to this one - making this latitude an exact duplicate of the other...
Unless noted otherwise, the portions of Isis written by the USGS are public domain.