Isis 3 Programmer Reference
|
This class is designed to encapsulate the concept of a Latitude. More...
#include <Latitude.h>
Public Types | |
enum | ErrorChecking { ThrowAllErrors = 0, AllowPastPole } |
Some user-configurable error checking parameters. More... | |
enum | CoordinateType { Planetocentric, Planetographic } |
These are the latitude coordinate systems. More... | |
enum | Units { Degrees, Radians } |
The set of usable angle measurement units. More... | |
Public Member Functions | |
Latitude () | |
Create a blank Latitude object without Planetographic support. More... | |
Latitude (double latitude, Angle::Units latitudeUnits, ErrorChecking errors=AllowPastPole) | |
Create and initialize a Latitude value without planetographic support. More... | |
Latitude (Angle latitude, ErrorChecking errors=AllowPastPole) | |
Create and initialize a Latitude value in the planetocentric domain within the given angle. More... | |
Latitude (Angle latitude, PvlGroup mapping, ErrorChecking errors=ThrowAllErrors) | |
Create and initialize a latitude value using the mapping group's latitude units and radii. More... | |
Latitude (double latitude, PvlGroup mapping, Angle::Units latitudeUnits, ErrorChecking errors=ThrowAllErrors) | |
Create and initialize a latitude value using the latitude units and the mapping group's radii. More... | |
Latitude (double latitude, Distance equatorialRadius, Distance polarRadius, CoordinateType latType=Planetocentric, Angle::Units latitudeUnits=Angle::Radians, ErrorChecking errors=ThrowAllErrors) | |
Create and initialize a Latitude value with planetographic support. More... | |
Latitude (const Latitude &latitudeToCopy) | |
This copies the given latitude exactly. More... | |
~Latitude () | |
This cleans up the Latitude class. More... | |
double | planetocentric (Angle::Units units=Angle::Radians) const |
Get the latitude in the planetocentric (universal) coordinate system. More... | |
void | setPlanetocentric (double latitude, Angle::Units units=Angle::Radians) |
Set the latitude given a value in the Planetocentric coordinate system. More... | |
double | planetographic (Angle::Units units=Angle::Radians) const |
Get the latitude in the planetographic coordinate system. More... | |
void | setPlanetographic (double latitude, Angle::Units units=Angle::Radians) |
Set the latitude given a value in the Planetographic coordinate system. More... | |
ErrorChecking | errorChecking () const |
Get the error checking status. More... | |
void | setErrorChecking (ErrorChecking errors) |
Set the error checking status. More... | |
bool | inRange (Latitude min, Latitude max) const |
Checks if this latitude value is within the given range. More... | |
Latitude & | operator= (const Latitude &latitudeToCopy) |
This assigns another latitude to this one - making this latitude an exact duplicate of the other. More... | |
Latitude | add (Angle angleToAdd, PvlGroup mapping) |
Adds an angle to this latitude. More... | |
Latitude | add (Angle angleToAdd, Distance equatorialRadius, Distance polarRadius, CoordinateType latType) |
Adds another latitude to this one. More... | |
bool | isValid () const |
This indicates whether we have a legitimate angle stored or are in an unset, or invalid, state. More... | |
Angle | operator+ (const Angle &angle2) const |
Add angle value to another. More... | |
Angle | operator- (const Angle &angle2) const |
Subtract angle value from another and return the resulting angle. More... | |
Angle | operator* (double value) const |
Multiply this angle by a double and return the resulting angle. More... | |
Angle | operator* (int value) const |
Multiply this angle by an integer and return the resulting angle. More... | |
Angle | operator/ (double value) const |
Divide this angle by a double. More... | |
double | operator/ (Angle value) const |
Divide this angle by another angle and return the ratio. More... | |
Angle | operator/ (int value) const |
Divide this angle by an integer and return the resulting angle. More... | |
bool | operator< (const Angle &angle2) const |
Test if the other angle is less than the current angle. More... | |
bool | operator> (const Angle &angle2) const |
Test if the other angle is greater than the current angle. More... | |
void | operator+= (const Angle &angle2) |
Add angle value to another as double and replace original. More... | |
void | operator-= (const Angle &angle2) |
Subtract angle value from another and set this instance to the resulting angle. More... | |
void | operator*= (double value) |
Multiply this angle by a double and set this instance to the resulting angle. More... | |
void | operator/= (double value) |
Divide this angle by a double and return the resulting angle. More... | |
bool | operator== (const Angle &angle2) const |
Test if another angle is equal to this angle. More... | |
bool | operator!= (const Angle &angle2) const |
Test if another angle is not equal to this angle. More... | |
bool | operator<= (const Angle &angle2) const |
Test if the other angle is less than or equal to the current angle. More... | |
bool | operator>= (const Angle &angle2) const |
Test if the other angle is greater than or equal to the current angle. More... | |
double | radians () const |
Convert an angle to a double. More... | |
double | degrees () const |
Get the angle in units of Degrees. More... | |
void | setRadians (double radians) |
Set the angle in units of Radians. More... | |
void | setDegrees (double degrees) |
Set the angle in units of Degrees. More... | |
virtual QString | toString (bool includeUnits=true) const |
Get the angle in human-readable form. More... | |
double | unitWrapValue (const Units &unit) const |
Return wrap value in desired units. More... | |
virtual double | angle (const Units &unit) const |
Return angle value in desired units. More... | |
Static Public Member Functions | |
static Angle | fullRotation () |
Makes an angle to represent a full rotation (0-360 or 0-2pi). More... | |
Protected Member Functions | |
virtual void | setAngle (const double &angle, const Angle::Units &units) |
Same as planetocentric. More... | |
Private Attributes | |
Distance * | m_equatorialRadius |
Used for converting to Planetographic, this is the radius of the target on the equatorial plane. More... | |
Distance * | m_polarRadius |
Used for converting to Planetographic, this is the radius of the target perpendicular to the equatorial plane. More... | |
ErrorChecking | m_errors |
This contains which exceptions should not be thrown. More... | |
double | m_radians |
The angle measure, always stored in radians. More... | |
This class is designed to encapsulate the concept of a Latitude.
This is used primarily for surface points but is also a general purpose class. This class has error checking for past the poles. This adds the concept of 90/-90 and planetographic to the Angle class.
Definition at line 51 of file Latitude.h.
These are the latitude coordinate systems.
The universal system is Planetocentric and this class is heavily geared towards using them. If you wish to use Planetographic, planetary radii must be provided and at the moment latitudes past 90 aren't supported in Planetographic.
Definition at line 85 of file Latitude.h.
Some user-configurable error checking parameters.
This is meant to be used as a bit flag.
Example: Latitude(95, Angle::Degrees, Latitude::AllowPastPole) This will allow latitudes past 90 and not throw an exception.
Latitude(95, Angle::Degrees, Latitude::AllowPastPole | Latitude::ThrowAllErrors) This will allow latitudes past 90 still and not throw an exception.
Latitude(95, Angle::Degrees, Latitude::ThrowAllErrors) This will throw an exception.
Latitude(95, Angle::Degrees) This will throw an exception.
Enumerator | |
---|---|
ThrowAllErrors | Throw an exception if any problems are found. |
AllowPastPole | Don't throw an exception if a latitude beyond -90/90 is found. |
Definition at line 71 of file Latitude.h.
|
inherited |
The set of usable angle measurement units.
Isis::Latitude::Latitude | ( | ) |
Create a blank Latitude object without Planetographic support.
Definition at line 25 of file Latitude.cpp.
References AllowPastPole, m_equatorialRadius, m_errors, and m_polarRadius.
Referenced by add(), and planetographic().
Isis::Latitude::Latitude | ( | double | latitude, |
Angle::Units | latitudeUnits, | ||
ErrorChecking | errors = AllowPastPole |
||
) |
Create and initialize a Latitude value without planetographic support.
latitude | The latitude value this instance will represent, in the planetocentric coordinate system |
latitudeUnits | The angular units of the latitude value (degs, rads) |
errors | Error checking conditions |
Definition at line 45 of file Latitude.cpp.
References m_equatorialRadius, m_errors, m_polarRadius, and setPlanetocentric().
Isis::Latitude::Latitude | ( | Angle | latitude, |
ErrorChecking | errors = AllowPastPole |
||
) |
Create and initialize a Latitude value in the planetocentric domain within the given angle.
latitude | The latitude value this instance will represent |
errors | Error checking conditions |
Definition at line 64 of file Latitude.cpp.
References m_equatorialRadius, m_errors, m_polarRadius, Isis::Angle::Radians, Isis::Angle::radians(), and setPlanetocentric().
Isis::Latitude::Latitude | ( | Angle | latitude, |
PvlGroup | mapping, | ||
ErrorChecking | errors = ThrowAllErrors |
||
) |
Create and initialize a latitude value using the mapping group's latitude units and radii.
latitude | The latitude value this instance will represent, in the mapping group's units |
mapping | A mapping group |
errors | Error checking conditions |
IException::Unknown | "Unable to create Latitude object from given mapping group." |
IException::Programmer | "Latitude type is not recognized" |
Definition at line 90 of file Latitude.cpp.
References Isis::PvlContainer::hasKeyword(), m_equatorialRadius, m_errors, m_polarRadius, Isis::Distance::Meters, Isis::IException::Programmer, Isis::Angle::Radians, Isis::Angle::radians(), Isis::Target::radiiGroup(), setPlanetocentric(), setPlanetographic(), Isis::toDouble(), and Isis::IException::Unknown.
Isis::Latitude::Latitude | ( | double | latitude, |
PvlGroup | mapping, | ||
Angle::Units | latitudeUnits, | ||
ErrorChecking | errors = ThrowAllErrors |
||
) |
Create and initialize a latitude value using the latitude units and the mapping group's radii.
latitude | The latitude value this instance will represent, in the mapping group's units |
mapping | A mapping group |
latitudeUnits | The angular units of the latitude value (degs, rads) |
errors | Error checking conditions |
IException::Unknown | "Unable to create Latitude object from given mapping group." |
IException::Programmer | "Latitude type is not recognized" |
Definition at line 148 of file Latitude.cpp.
References Isis::PvlContainer::hasKeyword(), m_equatorialRadius, m_errors, m_polarRadius, Isis::Distance::Meters, Isis::IException::Programmer, Isis::Target::radiiGroup(), setPlanetocentric(), setPlanetographic(), Isis::toDouble(), and Isis::IException::Unknown.
Isis::Latitude::Latitude | ( | double | latitude, |
Distance | equatorialRadius, | ||
Distance | polarRadius, | ||
CoordinateType | latType = Planetocentric , |
||
Angle::Units | latitudeUnits = Angle::Radians , |
||
ErrorChecking | errors = ThrowAllErrors |
||
) |
Create and initialize a Latitude value with planetographic support.
latitude | The latitude value this instance will represent, in planetocentric |
equatorialRadius | Radius of the target (planet) at the equator |
polarRadius | Radius of the target (planet) at the poles |
latType | The coordinate system of the latitude parameter |
latitudeUnits | The angular units of the latitude value (degs, rads) |
errors | Error checking conditions |
IException::Programmer | "Enumeration value [latType] is not a valid CoordinateType" |
Definition at line 208 of file Latitude.cpp.
References m_equatorialRadius, m_errors, m_polarRadius, Planetocentric, Planetographic, Isis::IException::Programmer, setPlanetocentric(), setPlanetographic(), and Isis::Angle::toString().
Isis::Latitude::Latitude | ( | const Latitude & | latitudeToCopy | ) |
This copies the given latitude exactly.
latitudeToCopy | The latitude we're duplicating |
Definition at line 240 of file Latitude.cpp.
References m_equatorialRadius, m_errors, and m_polarRadius.
Isis::Latitude::~Latitude | ( | ) |
This cleans up the Latitude class.
Definition at line 260 of file Latitude.cpp.
References m_equatorialRadius, and m_polarRadius.
Latitude Isis::Latitude::add | ( | Angle | angleToAdd, |
Distance | equatorialRadius, | ||
Distance | polarRadius, | ||
CoordinateType | latType | ||
) |
Adds another latitude to this one.
Handles planetographic latitudes.
angleToAdd | the latitude being added to this one |
equatorialRadius | Radius of the target (planet) at the equator |
polarRadius | Radius of the target (planet) at the poles |
latType | Planetocentric or Planetographic |
Definition at line 552 of file Latitude.cpp.
References Latitude(), m_errors, Planetocentric, planetocentric(), Planetographic, planetographic(), Isis::Angle::Radians, and Isis::Angle::radians().
Adds an angle to this latitude.
The adding method is determined by the latitude type.
angleToAdd | the latitude being added to this one |
mapping | the mapping group from a projection |
IException::Unknown | "Unable to add angle to Latitude object from given mapping group." |
IException::Programmer | "Latitude type is not recognized" |
Definition at line 503 of file Latitude.cpp.
References Isis::PvlContainer::hasKeyword(), Isis::Distance::Meters, Planetocentric, Planetographic, Isis::IException::Programmer, Isis::Target::radiiGroup(), Isis::toDouble(), and Isis::IException::Unknown.
|
virtualinherited |
Return angle value in desired units.
unit | Desired units of the angle (see Angle::Units) |
Definition at line 289 of file Angle.cpp.
References Isis::Angle::Degrees, Isis::Angle::m_radians, Isis::Null, Isis::IException::Programmer, Isis::RAD2DEG, and Isis::Angle::Radians.
Referenced by Isis::Angle::Angle(), Isis::Angle::degrees(), Isis::Longitude::force360Domain(), Isis::Angle::operator<(), Isis::Angle::operator==(), Isis::Angle::operator>(), planetocentric(), Isis::Longitude::positiveEast(), Isis::Longitude::positiveWest(), Isis::Angle::radians(), setAngle(), and Isis::Angle::setAngle().
|
inlineinherited |
Get the angle in units of Degrees.
Definition at line 232 of file Angle.h.
References Isis::Angle::angle(), and Isis::Angle::Degrees.
Referenced by Isis::Angle::Angle(), Isis::MosaicGridTool::autoGrid(), Isis::MosaicAreaTool::calcLatLonRange(), Isis::PhotometricFunction::compute(), Isis::ControlPointEditWidget::createTemporaryGroundMeasure(), Isis::MosaicGridTool::drawGrid(), Isis::QnetSetAprioriDialog::fillAverageAprioriLineEdits(), Isis::QnetSetAprioriDialog::fillCurrentAprioriLineEdits(), Isis::QnetSetAprioriDialog::fillReferenceAprioriLineEdits(), Isis::QnetTool::findPointLocation(), Isis::Longitude::force180Domain(), Isis::Longitude::force360Domain(), Isis::BundleControlPoint::formatBundleLatitudinalOutputDetailString(), Isis::BundleTargetBody::formatBundleOutputString(), Isis::BundleControlPoint::formatBundleRectangularOutputDetailString(), Isis::ImageTreeWidgetItem::ImageTreeWidgetItem(), Isis::DemShape::localRadius(), Isis::ControlNetFilter::PointLatLonFilter(), Isis::MosaicGridToolConfigDialog::readSettings(), Isis::MosaicGridToolConfigDialog::refreshWidgetStates(), Isis::FeatureNomenclature::runQuery(), setAngle(), Isis::Angle::setDegrees(), Isis::CameraGroundMap::SetGround(), Isis::VimsGroundMap::SetGround(), Isis::UniversalGroundMap::SetGround(), Isis::Camera::SetGround(), Isis::CSMCamera::SetGround(), Isis::ControlPointEditWidget::setShapesForPoint(), Isis::BundleTargetBody::setSolveSettings(), Isis::UniversalGroundMap::SetUnboundGround(), Isis::CSMCamera::subSpacecraftPoint(), Isis::RingPlaneProjection::To180Domain(), Isis::TProjection::To180Domain(), Isis::RingPlaneProjection::To360Domain(), Isis::TProjection::To360Domain(), Isis::ControlNetVersioner::toPvl(), Isis::MosaicGridTool::toPvl(), Isis::Angle::toString(), Isis::Sensor::UniversalLatitude(), Isis::Sensor::UniversalLongitude(), Isis::BundleControlPoint::updateAdjustedSurfacePointLatitudinally(), Isis::MeasureTool::updateDist(), Isis::SunShadowTool::updateRow(), Isis::AdvancedTrackTool::updateRow(), Isis::ControlPointEditWidget::updateSurfacePointInfo(), and Isis::QnetTool::updateSurfacePointInfo().
Latitude::ErrorChecking Isis::Latitude::errorChecking | ( | ) | const |
Get the error checking status.
This indicates if the Latitude object will throw an error when set to an angle less than -90 degrees or greater than 90 degrees.
Definition at line 407 of file Latitude.cpp.
References m_errors.
|
staticinherited |
Makes an angle to represent a full rotation (0-360 or 0-2pi).
Definition at line 106 of file Angle.cpp.
References Isis::Angle::Angle(), and Isis::Angle::Degrees.
Referenced by Isis::Hillshade::shadedValue(), and Isis::Longitude::to360Range().
Checks if this latitude value is within the given range.
Defines the range as the change from the minimum latitude to the maximum latitude (an angle), and returns whether the change from the minimum latitude to this latitude is less than or equal to the maximum change allowed (the range).
min | The beginning of the valid latitude range |
max | The end of the valid latitude range |
IException::User | "The minimum latitude degrees is greater than the maximum latitude degrees" |
Definition at line 439 of file Latitude.cpp.
References Isis::Angle::Degrees, Isis::Angle::toString(), and Isis::IException::User.
Referenced by Isis::QnetPointRangeFilter::filter().
|
inherited |
This indicates whether we have a legitimate angle stored or are in an unset, or invalid, state.
Definition at line 95 of file Angle.cpp.
References Isis::Angle::m_radians, and Isis::Null.
Referenced by Isis::FeatureNomenclatureTool::FeaturePosition::applyExtentType(), Isis::GroundGrid::CreateGrid(), Isis::Longitude::force180Domain(), Isis::Longitude::force360Domain(), Isis::UniversalGroundMap::GroundRange(), Isis::DemShape::localRadius(), Isis::SunShadowTool::mouseMove(), Isis::Angle::operator*(), Isis::Angle::operator+(), Isis::Angle::operator-(), Isis::Angle::operator/(), Isis::Angle::operator<(), Isis::Angle::operator>(), planetographic(), Isis::NaifDskPlateModel::point(), Isis::Image::save(), Isis::Shape::save(), Isis::ControlPoint::SetAprioriSurfacePoint(), Isis::Hillshade::setAzimuth(), Isis::GroundGrid::SetGroundLimits(), Isis::SurfacePoint::SetSpherical(), Isis::SurfacePoint::SetSphericalPoint(), Isis::SurfacePoint::SetSphericalSigmas(), Isis::Hillshade::setZenith(), Isis::Longitude::to360Range(), Isis::Angle::toString(), and Isis::SunShadowTool::updateRow().
|
inlineinherited |
|
inherited |
Multiply this angle by a double and return the resulting angle.
If this is an invalid angle, then the result will be an invalid angle.
value | The value to multiply to this angle |
Definition at line 154 of file Angle.cpp.
References Isis::Angle::Angle(), Isis::Angle::isValid(), Isis::Angle::Radians, and Isis::Angle::radians().
|
inlineinherited |
|
inlineinherited |
Add angle value to another.
If either of these are invalid angles, then the result will be an invalid angle.
angle2 | The angle to add to this angle |
Definition at line 118 of file Angle.cpp.
References Isis::Angle::Angle(), Isis::Angle::isValid(), Isis::Angle::Radians, and Isis::Angle::radians().
|
inlineinherited |
Subtract angle value from another and return the resulting angle.
If either of these are invalid angles, then the result will be an invalid angle.
angle2 | The angle to subtract from this angle |
Definition at line 136 of file Angle.cpp.
References Isis::Angle::Angle(), Isis::Angle::isValid(), Isis::Angle::Radians, and Isis::Angle::radians().
|
inlineinherited |
|
inherited |
Divide this angle by another angle and return the ratio.
value | The ratio, Null if invalid |
Definition at line 194 of file Angle.cpp.
References Isis::Angle::isValid(), Isis::Null, and Isis::Angle::radians().
|
inherited |
Divide this angle by a double.
value | The double value to use as the divisor |
Definition at line 181 of file Angle.cpp.
References Isis::Angle::Angle(), Isis::Angle::isValid(), Isis::Angle::Radians, and Isis::Angle::radians().
|
inlineinherited |
|
inlineinherited |
|
inherited |
Test if the other angle is less than the current angle.
If either is invalid, then an exception will be thrown.
angle2 | The comparison angle (on right-hand-side of < operator) |
Definition at line 208 of file Angle.cpp.
References Isis::Angle::angle(), Isis::Angle::isValid(), Isis::IException::Programmer, and Isis::Angle::Radians.
|
inlineinherited |
This assigns another latitude to this one - making this latitude an exact duplicate of the other.
latitudeToCopy | The latitude we are assigning from |
Definition at line 467 of file Latitude.cpp.
References m_equatorialRadius, m_errors, m_polarRadius, planetocentric(), and setPlanetocentric().
|
inlineinherited |
Test if another angle is equal to this angle.
This does not compensate for going around a circle: Angle(360, Angle::Degrees) does not equal Angle(0, Angle::Degrees)
Invalid angles are equal to each other.
angle2 | The comparison angle (on right-hand-side of == operator) |
Definition at line 174 of file Angle.h.
References Isis::Angle::angle(), and Isis::Angle::Radians.
|
inherited |
Test if the other angle is greater than the current angle.
If either is invalid, then an exception will be thrown.
angle2 | The comparison angle (on right-hand-side of > operator) |
Definition at line 226 of file Angle.cpp.
References Isis::Angle::angle(), Isis::Angle::isValid(), Isis::IException::Programmer, and Isis::Angle::Radians.
|
inlineinherited |
double Isis::Latitude::planetocentric | ( | Angle::Units | units = Angle::Radians | ) | const |
Get the latitude in the planetocentric (universal) coordinate system.
units | The angular units to get the latitude in |
Definition at line 282 of file Latitude.cpp.
References Isis::Angle::angle().
Referenced by add(), operator=(), and Isis::NaifDskPlateModel::point().
double Isis::Latitude::planetographic | ( | Angle::Units | units = Angle::Radians | ) | const |
Get the latitude in the planetographic coordinate system.
If this instance was not constructed with the planetary radii, then an exception will be thrown.
units | The angular units to get the latitude in |
IException::Programmer | "The latitude cannot be converted to Planetographic without the planetary radii, please use the other Latitude constructor" |
IException::Programmer | "Latitudes outside of the -90/90 range cannot be converted between Planetographic and Planetocentric" |
IException::Programmer | "Invalid planetographic latitudes are not currently supported" |
Definition at line 315 of file Latitude.cpp.
References Isis::Angle::Angle(), Isis::Angle::Degrees, Isis::Angle::isValid(), Latitude(), m_equatorialRadius, m_polarRadius, Isis::IException::Programmer, Isis::Angle::Radians, Isis::Angle::radians(), and Isis::Angle::toString().
Referenced by add(), Isis::MosaicGridTool::autoGrid(), and Isis::MosaicGridToolConfigDialog::readSettings().
|
inlineinherited |
Convert an angle to a double.
This will return the radians version of the angle.
operator double() const { return angle(Radians); } Get the angle in units of Radians.
Definition at line 226 of file Angle.h.
References Isis::Angle::angle(), and Isis::Angle::Radians.
Referenced by add(), Isis::MosaicAreaTool::calcLatLonRange(), Isis::CameraGroundMap::EllipsoidPartial(), Isis::SurfacePoint::GetDistanceToPoint(), Isis::Camera::GetLocalNormal(), Isis::Longitude::inRange(), Latitude(), Isis::EmbreeShapeModel::latlonToRay(), Isis::BulletShapeModel::latlonToVector(), Isis::EllipsoidShape::localRadius(), Isis::BundleTargetBody::localRadius(), Isis::Longitude::Longitude(), Isis::SunShadowTool::mouseMove(), Isis::Angle::operator*(), Isis::Angle::operator+(), Isis::Angle::operator-(), Isis::Angle::operator/(), Isis::Angle::operator=(), Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::paint(), planetographic(), Isis::CameraGroundMap::PointPartial(), Isis::SunShadowTool::recalculateShadowHeight(), Isis::LinearAlgebra::rotate(), Isis::Image::save(), Isis::Shape::save(), Isis::SpiceRotation::setEphemerisTimePckPolyFunction(), Isis::VimsGroundMap::SetGround(), setPlanetographic(), Isis::Angle::setRadians(), Isis::BundleTargetBody::setSolveSettings(), Isis::SurfacePoint::SetSphericalPoint(), Isis::SurfacePoint::SetSphericalSigmas(), Isis::Hillshade::shadedValue(), Isis::MeasureTool::updateDist(), and Isis::SunShadowTool::updateRow().
|
protectedvirtual |
Same as planetocentric.
We're overriding this method in order to do -90/90 degree checking.
operator double() const { return planetocentric(); }
angle | The numeric value of the angle |
units | The units the angle is in (radians or degrees typically) |
IException::Programmer | "Latitudes past 90 degrees are not valid. The latitude is not allowed" |
Reimplemented from Isis::Angle.
Definition at line 583 of file Latitude.cpp.
References AllowPastPole, Isis::Angle::Angle(), Isis::Angle::angle(), Isis::Angle::Degrees, Isis::Angle::degrees(), Isis::IsSpecial(), m_errors, Isis::IException::Programmer, Isis::Angle::setAngle(), and Isis::toString().
Referenced by setPlanetocentric(), and setPlanetographic().
|
inlineinherited |
Set the angle in units of Degrees.
degrees | The new angle value, Null for invalid angle |
Definition at line 246 of file Angle.h.
References Isis::Angle::Degrees, Isis::Angle::degrees(), and Isis::Angle::setAngle().
void Isis::Latitude::setErrorChecking | ( | ErrorChecking | errors | ) |
Set the error checking status.
If set to ThrowAllErrors, then an exception will be thrown if the Latitude object is set to an angle less than -90 degrees or greater than 90 degrees. If set to AllowPastPole, then no exception will be thrown.
error | The new error checking status. |
Definition at line 420 of file Latitude.cpp.
References m_errors.
Referenced by Isis::GroundGrid::CreateGrid(), and Isis::GroundGrid::WalkBoundary().
void Isis::Latitude::setPlanetocentric | ( | double | latitude, |
Angle::Units | units = Angle::Radians |
||
) |
Set the latitude given a value in the Planetocentric coordinate system.
latitude | The planetographic latitude to set ourselves to |
units | The angular units latitude is in |
Definition at line 293 of file Latitude.cpp.
References setAngle().
Referenced by Latitude(), and operator=().
void Isis::Latitude::setPlanetographic | ( | double | latitude, |
Angle::Units | units = Angle::Radians |
||
) |
Set the latitude given a value in the Planetographic coordinate system.
latitude | The planetographic latitude to set ourselves to |
units | The angular units latitude is in |
IException::Programmer | "The latitude cannot be converted to Planetographic without the planetary radii, please use the other Latitude constructor" |
IException::Programmer | "Latitudes outside of the -90/90 range cannot be converted between Planetographic and Planetocentric" |
IException::Programmer | "Invalid planetographic latitudes are not currently supported" |
Definition at line 360 of file Latitude.cpp.
References Isis::Angle::Angle(), Isis::Angle::Degrees, Isis::IsSpecial(), m_equatorialRadius, m_polarRadius, Isis::IException::Programmer, Isis::Angle::Radians, Isis::Angle::radians(), setAngle(), and Isis::toString().
Referenced by Latitude().
|
inlineinherited |
Set the angle in units of Radians.
radians | The new angle value, Null for invalid angle |
Definition at line 239 of file Angle.h.
References Isis::Angle::Radians, Isis::Angle::radians(), and Isis::Angle::setAngle().
Referenced by Isis::LinearAlgebra::toAxisAngle(), and Isis::LinearAlgebra::toEulerAngles().
|
virtualinherited |
Get the angle in human-readable form.
includeUnits | Include the angle's units in the text. |
Definition at line 243 of file Angle.cpp.
References Isis::Angle::degrees(), Isis::Angle::isValid(), and Isis::toString().
Referenced by inRange(), Latitude(), Isis::operator<<(), planetographic(), and Isis::Hillshade::shadedValue().
|
inherited |
Return wrap value in desired units.
The 'wrap' value is the value where one circle occurs - angles greater than this are conceptually 'wrapping' back to zero. For example, this is 2*PI in radians because 2*PI == 0 on a circle. Please keep in mind we still differentiate those two angles.
unit | Desired units of the Angle wrap constant (see Angle::Units) |
Definition at line 266 of file Angle.cpp.
References Isis::Angle::Degrees, Isis::PI, Isis::IException::Programmer, and Isis::Angle::Radians.
Referenced by Isis::Longitude::positiveWest(), and Isis::Longitude::setPositiveWest().
|
private |
Used for converting to Planetographic, this is the radius of the target on the equatorial plane.
Definition at line 166 of file Latitude.h.
Referenced by Latitude(), operator=(), planetographic(), setPlanetographic(), and ~Latitude().
|
private |
This contains which exceptions should not be thrown.
Definition at line 174 of file Latitude.h.
Referenced by add(), errorChecking(), Latitude(), operator=(), setAngle(), and setErrorChecking().
|
private |
Used for converting to Planetographic, this is the radius of the target perpendicular to the equatorial plane.
Definition at line 171 of file Latitude.h.
Referenced by Latitude(), operator=(), planetographic(), setPlanetographic(), and ~Latitude().
|
privateinherited |
The angle measure, always stored in radians.
If degrees are requested then a conversion is done on the fly.
Definition at line 258 of file Angle.h.
Referenced by Isis::Angle::Angle(), Isis::Angle::angle(), Isis::Angle::isValid(), Isis::Angle::setAngle(), and Isis::Angle::~Angle().