USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::Latitude Class Reference

This class is designed to encapsulate the concept of a Latitude. More...

#include <Latitude.h>

Inheritance diagram for Isis::Latitude:
Inheritance graph
Collaboration diagram for Isis::Latitude:
Collaboration graph

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.
 
 Latitude (double latitude, Angle::Units latitudeUnits, ErrorChecking errors=AllowPastPole)
 Create and initialize a Latitude value without planetographic support.
 
 Latitude (Angle latitude, ErrorChecking errors=AllowPastPole)
 Create and initialize a Latitude value in the planetocentric domain within the given angle.
 
 Latitude (Angle latitude, PvlGroup mapping, ErrorChecking errors=ThrowAllErrors)
 Create and initialize a Latitude value using the mapping group's latitude units and radii.
 
 Latitude (double latitude, PvlGroup mapping, Angle::Units latitudeUnits, ErrorChecking errors=ThrowAllErrors)
 Create and initialize a Latitude value using the mapping group's latitude units and radii.
 
 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 (const Latitude &latitudeToCopy)
 This copies the given latitude exactly.
 
 ~Latitude ()
 This cleans up the Latitude class.
 
double planetocentric (Angle::Units units=Angle::Radians) const
 Get the latitude in the planetocentric (universal) coordinate system.
 
void setPlanetocentric (double latitude, Angle::Units units=Angle::Radians)
 Set the latitude given a value in the Planetocentric coordinate system.
 
double planetographic (Angle::Units units=Angle::Radians) const
 Get the latitude in the planetographic coordinate system.
 
void setPlanetographic (double latitude, Angle::Units units=Angle::Radians)
 Set the latitude given a value in the Planetographic coordinate system.
 
bool inRange (Latitude min, Latitude max) const
 Checks if this latitude value is within the given range.
 
Latitudeoperator= (const Latitude &latitudeToCopy)
 This assigns another latitude to this one - making this latitude an exact duplicate of the other.
 
Latitude add (Angle angleToAdd, PvlGroup mapping)
 Adds an angle to this latitude.
 
Latitude add (Angle angleToAdd, Distance equatorialRadius, Distance polarRadius, CoordinateType latType)
 Adds another latitude to this one.
 
bool isValid () const
 This indicates whether we have a legitimate angle stored or are in an unset, or invalid, state.
 
Angle operator+ (const Angle &angle2) const
 Add angle value to another.
 
Angle operator- (const Angle &angle2) const
 Subtract angle value from another and return the resulting angle.
 
Angle operator* (double value) const
 Multiply this angle by a double and return the resulting angle.
 
Angle operator* (int value) const
 Multiply this angle by an integer and return the resulting angle.
 
Angle operator/ (double value) const
 Divide this angle by a double.
 
double operator/ (Angle value) const
 Divide this angle by another angle and return the ratio.
 
Angle operator/ (int value) const
 Divide this angle by an integer and return the resulting angle.
 
bool operator< (const Angle &angle2) const
 Test if the other angle is less than the current angle.
 
bool operator> (const Angle &angle2) const
 Test if the other angle is greater than the current angle.
 
void operator+= (const Angle &angle2)
 Add angle value to another as double and replace original.
 
void operator-= (const Angle &angle2)
 Subtract angle value from another and set this instance to the resulting angle.
 
void operator*= (double value)
 Multiply this angle by a double and set this instance to the resulting angle.
 
void operator/= (double value)
 Divide this angle by a double and return the resulting angle.
 
bool operator== (const Angle &angle2) const
 Test if another angle is equal to this angle.
 
bool operator!= (const Angle &angle2) const
 Test if another angle is not equal to this angle.
 
bool operator<= (const Angle &angle2) const
 Test if the other angle is less than or equal to the current angle.
 
bool operator>= (const Angle &angle2) const
 Test if the other angle is greater than or equal to the current angle.
 
double radians () const
 Convert an angle to a double.
 
double degrees () const
 Get the angle in units of Degrees.
 
void setRadians (double radians)
 Set the angle in units of Radians.
 
void setDegrees (double degrees)
 Set the angle in units of Degrees.
 
virtual QString toString (bool includeUnits=true) const
 Get the angle in human-readable form.
 

Static Public Member Functions

static Angle fullRotation ()
 Makes an angle to represent a full rotation (0-360 or 0-2pi).
 

Protected Member Functions

virtual void setAngle (double angle, const Angle::Units &units)
 Same as planetocentric.
 
double unitWrapValue (const Units &unit) const
 Return wrap value in desired units.
 
virtual double angle (const Units &unit) const
 Return angle value in desired units.
 
virtual void setAngle (const double &angle, const Units &unit)
 Set angle value in desired units.
 

Private Attributes

Distancem_equatorialRadius
 Used for converting to Planetographic, this is the radius of the target on the equatorial plane.
 
Distancem_polarRadius
 Used for converting to Planetographic, this is the radius of the target perpendicular to the equatorial plane.
 
ErrorChecking m_errors
 This contains which exceptions should not be thrown.
 

Detailed Description

This class is designed to encapsulate the concept of a Latitude.

This is used primary 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.

Author
2010-10-13 Steven Lambright
History:

2011-01-25 Steven Lambright - Added a constructor which takes a mapping group.

2012-07-26 Kimberly Oyama and Steven Lambright - Added two add methods to handle planetographic latitudes. The first takes the angle to add and a Pvl mapping group to determine the latitude type and add accordingly. The second takes the angle to add, the equatorial and polar radii, and the latitude type. References #604.

2013-03-06 Steven Lambright - Added support for getting Radii from TargetName keyword. References #1534.

Definition at line 50 of file Latitude.h.

Member Enumeration Documentation

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.

Enumerator
Planetocentric 

This is the universal (and default) latitude coordinate system.

Latitudes in this system are the angle from the the equatorial plane (the line at 0 degrees latitude) to the requested latitude.

Planetographic 

This is a secondary coordinate system for latitudes.

Latitudes in this system are angle between the equatorial plane and the perpendicular to the surface at the point. Conceptually you draw the perpendicular to the surface back to the equatorial plane and the angle created is the planetographic latitude. This doesn't differ from Planetocentric on a sphere. These latitudes require the planetary radii to work with them at all, since the radii affect the latitude values themselves.

Definition at line 84 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 70 of file Latitude.h.

enum Isis::Angle::Units
inherited

The set of usable angle measurement units.

Enumerator
Degrees 

Degrees are generally considered more human readable, 0-360 is one circle, however most math does not use this unit.

Use these for displaying to the user and accepting input from the user.

Radians 

Radians are generally used in mathematical equations, 0-2*PI is one circle, however these are more difficult for users to understand when displayed since they have PI in them.

This is the default unit and is necessary for most math library calls.

Definition at line 62 of file Angle.h.

Constructor & Destructor Documentation

Isis::Latitude::Latitude ( )

Create a blank Latitude object without Planetographic support.

Definition at line 36 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.

See Also
ErrorChecking
CoordinateType
Parameters
latitudeThe latitude value this instance will represent, in the planetocentric coordinate system
latitudeUnitsThe angular units of the latitude value (degs, rads)
errorsError checking conditions

Definition at line 54 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.

Parameters
latitudeThe latitude value this instance will represent
errorsError checking conditions

Definition at line 72 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.

See Also
ErrorChecking
CoordinateType
Parameters
latitudeThe latitude value this instance will represent, in the mapping group's units
mappingA mapping group
latitudeUnitsThe angular units of the latitude value (degs, rads)
errorsError checking conditions

Definition at line 94 of file Latitude.cpp.

References _FILEINFO_, Isis::PvlContainer::hasKeyword(), m_equatorialRadius, m_errors, m_polarRadius, Isis::Distance::Meters, Isis::IException::Programmer, Isis::Angle::Radians, Isis::Angle::radians(), setPlanetocentric(), setPlanetographic(), Isis::TProjection::TargetRadii(), and Isis::toDouble().

Isis::Latitude::Latitude ( double  latitude,
PvlGroup  mapping,
Angle::Units  latitudeUnits,
ErrorChecking  errors = ThrowAllErrors 
)

Create and initialize a Latitude value using the mapping group's latitude units and radii.

See Also
ErrorChecking
CoordinateType
Parameters
latitudeThe latitude value this instance will represent, in the mapping group's units
mappingA mapping group
latitudeUnitsThe angular units of the latitude value (degs, rads)
errorsError checking conditions

Definition at line 142 of file Latitude.cpp.

References _FILEINFO_, Isis::PvlContainer::hasKeyword(), m_equatorialRadius, m_errors, m_polarRadius, Isis::Distance::Meters, Isis::IException::Programmer, setPlanetocentric(), setPlanetographic(), Isis::TProjection::TargetRadii(), and Isis::toDouble().

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.

See Also
ErrorChecking
CoordinateType
Parameters
latitudeThe latitude value this instance will represent, in planetocentric
equatorialRadiusRadius of the target (planet) at the equator
polarRadiusRadius of the target (planet) at the poles
latTypeThe coordinate system of the latitude parameter
latitudeUnitsThe angular units of the latitude value (degs, rads)
errorsError checking conditions

Definition at line 193 of file Latitude.cpp.

References _FILEINFO_, m_equatorialRadius, m_errors, m_polarRadius, Planetocentric, Planetographic, Isis::IException::Programmer, setPlanetocentric(), and setPlanetographic().

Isis::Latitude::Latitude ( const Latitude latitudeToCopy)

This copies the given latitude exactly.

Parameters
latitudeToCopyThe latitude we're duplicating

Definition at line 225 of file Latitude.cpp.

References m_equatorialRadius, m_errors, and m_polarRadius.

Isis::Latitude::~Latitude ( )

This cleans up the Latitude class.

Definition at line 244 of file Latitude.cpp.

References m_equatorialRadius, and m_polarRadius.

Member Function Documentation

Latitude Isis::Latitude::add ( Angle  angleToAdd,
PvlGroup  mapping 
)

Adds an angle to this latitude.

The adding method is determined by the latitude type.

Parameters
angleToAddthe latitude being added to this one
mappingthe mapping group from a projection
Returns
The result

Definition at line 429 of file Latitude.cpp.

References _FILEINFO_, Isis::PvlContainer::hasKeyword(), Isis::Distance::Meters, Planetocentric, Planetographic, Isis::IException::Programmer, Isis::TProjection::TargetRadii(), and Isis::toDouble().

Latitude Isis::Latitude::add ( Angle  angleToAdd,
Distance  equatorialRadius,
Distance  polarRadius,
CoordinateType  latType 
)

Adds another latitude to this one.

Handles planetographic latitudes.

Parameters
angleToAddthe latitude being added to this one
equatorialRadius
polarRadius
latType
Returns
The result

Definition at line 473 of file Latitude.cpp.

References Latitude(), m_errors, Planetocentric, planetocentric(), Planetographic, planetographic(), Isis::Angle::Radians, and Isis::Angle::radians().

double Isis::Angle::angle ( const Units unit) const
protectedvirtualinherited
double Isis::Angle::degrees ( ) const
inlineinherited

Get the angle in units of Degrees.

Returns
A double-value representing this angle. Null if not valid.

Definition at line 245 of file Angle.h.

References Isis::Angle::angle(), and Isis::Angle::Degrees.

Referenced by Isis::Angle::Angle(), Isis::BundleAdjust::applyParameterCorrections_CHOLMOD(), Isis::BundleAdjust::applyParameterCorrections_SPECIALK(), Isis::MosaicGridTool::autoGrid(), Isis::MosaicGridTool::drawGrid(), Isis::Longitude::force180Domain(), Isis::Longitude::force360Domain(), Isis::ImageTreeWidgetItem::ImageTreeWidgetItem(), inRange(), Isis::QnetTool::loadGroundMeasure(), Isis::QnetTool::loadPoint(), Isis::DemShape::localRadius(), operator<<(), Isis::BundleAdjust::OutputNoErrorPropagation(), Isis::BundleAdjust::OutputPointsCSV(), Isis::BundleAdjust::OutputWithErrorPropagation(), planetographic(), Isis::ControlNetFilter::PointLatLonFilter(), Isis::MosaicGridToolConfigDialog::readSettings(), Isis::MosaicGridToolConfigDialog::refreshWidgetStates(), Isis::FeatureNomenclature::runQuery(), setAngle(), Isis::CameraGroundMap::SetGround(), Isis::VimsGroundMap::SetGround(), Isis::UniversalGroundMap::SetGround(), Isis::Camera::SetGround(), Isis::RingPlaneProjection::To180Domain(), Isis::TProjection::To180Domain(), Isis::RingPlaneProjection::To360Domain(), Isis::TProjection::To360Domain(), Isis::ControlNetFileV0002::toPvl(), Isis::MosaicGridTool::toPvl(), Isis::Angle::toString(), Isis::Sensor::UniversalLatitude(), Isis::Sensor::UniversalLongitude(), Isis::BundleAdjust::Update(), Isis::MeasureTool::updateDist(), Isis::SunShadowTool::updateRow(), Isis::AdvancedTrackTool::updateRow(), and Isis::QnetTool::updateSurfacePointInfo().

Angle Isis::Angle::fullRotation ( )
staticinherited

Makes an angle to represent a full rotation (0-360 or 0-2pi).

Returns
the angle of 1 full rotation

Definition at line 121 of file Angle.cpp.

References Isis::Angle::Angle(), and Isis::Angle::Degrees.

Referenced by Isis::Hillshade::shadedValue(), and Isis::Longitude::to360Range().

bool Isis::Latitude::inRange ( Latitude  min,
Latitude  max 
) const

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).

Parameters
minThe beginning of the valid latitude range
maxThe end of the valid latitude range
Returns
Whether the latitude is in the given range

Definition at line 373 of file Latitude.cpp.

References _FILEINFO_, Isis::Angle::Degrees, Isis::Angle::degrees(), and Isis::IException::User.

Referenced by Isis::QnetPointRangeFilter::filter().

bool Isis::Angle::operator!= ( const Angle angle2) const
inlineinherited

Test if another angle is not equal to this angle.

Takes the negated result of the '==' operator.

Parameters
angle2The comparison angle (on right-hand-side of != operator)
Returns
true if the angle does not equal the comparision angle

Definition at line 199 of file Angle.h.

Angle Isis::Angle::operator* ( double  value) const
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.

Parameters
valueThe value to multiply to this angle
Returns
Multiplied angle

Definition at line 169 of file Angle.cpp.

References Isis::Angle::Angle(), Isis::Angle::isValid(), Isis::Angle::Radians, and Isis::Angle::radians().

Angle Isis::Angle::operator* ( int  value) const
inlineinherited

Multiply this angle by an integer and return the resulting angle.

Parameters
valueThe integer value to multiply with this angle
Returns
Product of the angles

Definition at line 139 of file Angle.h.

void Isis::Angle::operator*= ( double  value)
inlineinherited

Multiply this angle by a double and set this instance to the resulting angle.

Parameters
valueThe double value to multiply with this angle

Definition at line 150 of file Angle.h.

Angle Isis::Angle::operator+ ( const Angle angle2) const
inherited

Add angle value to another.

If either of these are invalid angles, then the result will be an invalid angle.

Parameters
angle2The angle to add to this angle
Returns
sum angle

Definition at line 133 of file Angle.cpp.

References Isis::Angle::Angle(), Isis::Angle::isValid(), Isis::Angle::Radians, and Isis::Angle::radians().

void Isis::Angle::operator+= ( const Angle angle2)
inlineinherited

Add angle value to another as double and replace original.

Parameters
angle2The angle to add to this angle
Returns
sum angle, replaces original

Definition at line 117 of file Angle.h.

Angle Isis::Angle::operator- ( const Angle angle2) const
inherited

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.

Parameters
angle2The angle to subtract from this angle
Returns
difference angle

Definition at line 151 of file Angle.cpp.

References Isis::Angle::Angle(), Isis::Angle::isValid(), Isis::Angle::Radians, and Isis::Angle::radians().

void Isis::Angle::operator-= ( const Angle angle2)
inlineinherited

Subtract angle value from another and set this instance to the resulting angle.

Parameters
angle2The angle to subtract from this angle

Definition at line 128 of file Angle.h.

Angle Isis::Angle::operator/ ( double  value) const
inherited

Divide this angle by a double.

Parameters
valueThe double value to use as the divisor
Returns
Quotient of the angles

Definition at line 196 of file Angle.cpp.

References Isis::Angle::Angle(), Isis::Angle::isValid(), Isis::Angle::Radians, and Isis::Angle::radians().

double Isis::Angle::operator/ ( Angle  value) const
inherited

Divide this angle by another angle and return the ratio.

Parameters
valueThe ratio, Null if invalid
Returns
Quotient of the angles

Definition at line 209 of file Angle.cpp.

References Isis::Angle::isValid(), Isis::Null, and Isis::Angle::radians().

Angle Isis::Angle::operator/ ( int  value) const
inlineinherited

Divide this angle by an integer and return the resulting angle.

Parameters
valueThe double value to use as the divisor
Returns
Quotient of the angles

Definition at line 161 of file Angle.h.

void Isis::Angle::operator/= ( double  value)
inlineinherited

Divide this angle by a double and return the resulting angle.

Parameters
valueThe double value to use as the divisor

Definition at line 171 of file Angle.h.

bool Isis::Angle::operator< ( const Angle angle2) const
inherited

Test if the other angle is less than the current angle.

If either is invalid, then an exception will be thrown.

Parameters
angle2The comparison angle (on right-hand-side of < operator)
Returns
True if the angle is less than the comparision angle

Definition at line 223 of file Angle.cpp.

References _FILEINFO_, Isis::Angle::angle(), Isis::Angle::isValid(), Isis::IException::Programmer, and Isis::Angle::Radians.

bool Isis::Angle::operator<= ( const Angle angle2) const
inlineinherited

Test if the other angle is less than or equal to the current angle.

Parameters
angle2The comparison angle (on right-hand-side of < operator)
Returns
true if the angle is less than or equal to the comparision angle

Definition at line 210 of file Angle.h.

Latitude & Isis::Latitude::operator= ( const Latitude latitudeToCopy)

This assigns another latitude to this one - making this latitude an exact duplicate of the other.

Parameters
latitudeToCopyThe latitude we are assigning from
Returns
The result, a reference to this

Definition at line 399 of file Latitude.cpp.

References m_equatorialRadius, m_errors, m_polarRadius, planetocentric(), and setPlanetocentric().

bool Isis::Angle::operator== ( const Angle angle2) const
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.

Parameters
angle2The comparison angle (on right-hand-side of == operator)
Returns
true if the angle equals the comparision angle

Definition at line 187 of file Angle.h.

References Isis::Angle::angle(), and Isis::Angle::Radians.

bool Isis::Angle::operator> ( const Angle angle2) const
inherited

Test if the other angle is greater than the current angle.

If either is invalid, then an exception will be thrown.

Parameters
angle2The comparison angle (on right-hand-side of > operator)
Returns
True if the angle is greater than the comparision angle

Definition at line 240 of file Angle.cpp.

References _FILEINFO_, Isis::Angle::angle(), Isis::Angle::isValid(), Isis::IException::Programmer, and Isis::Angle::Radians.

bool Isis::Angle::operator>= ( const Angle angle2) const
inlineinherited

Test if the other angle is greater than or equal to the current angle.

Parameters
angle2The comparison angle (on right-hand-side of < operator)
Returns
true if the angle is greater than or equal to the comparision angle

Definition at line 222 of file Angle.h.

double Isis::Latitude::planetocentric ( Angle::Units  units = Angle::Radians) const

Get the latitude in the planetocentric (universal) coordinate system.

See Also
CoordinateType
Parameters
unitsThe angular units to get the latitude in
Returns
The Planetocentric latitude value

Definition at line 264 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.

See Also
CoordinateType
Parameters
unitsThe angular units to get the latitude in
Returns
The Planetographic latitude value

Definition at line 289 of file Latitude.cpp.

References _FILEINFO_, Isis::Angle::Angle(), Isis::Angle::Degrees, Isis::Angle::degrees(), Isis::Angle::isValid(), Latitude(), m_equatorialRadius, m_polarRadius, Isis::IException::Programmer, Isis::Angle::Radians, and Isis::Angle::radians().

Referenced by add(), Isis::MosaicGridTool::autoGrid(), and Isis::MosaicGridToolConfigDialog::readSettings().

double Isis::Angle::radians ( ) const
inlineinherited
void Isis::Latitude::setAngle ( double  angle,
const Angle::Units units 
)
protectedvirtual

Same as planetocentric.

We're overriding this method in order to do -90/90 degree checking.

See Also
planetocentric

operator double() const { return planetocentric(); }

Parameters
angleThe numeric value of the angle
unitsThe units angle is in (radians or degrees typically)

Definition at line 499 of file Latitude.cpp.

References _FILEINFO_, AllowPastPole, Isis::Angle::Angle(), Isis::Angle::Degrees, Isis::Angle::degrees(), Isis::IsSpecial(), m_errors, Isis::IException::Programmer, and Isis::Angle::setAngle().

Referenced by setPlanetocentric(), and setPlanetographic().

void Isis::Angle::setAngle ( const double &  angle,
const Units unit 
)
protectedvirtualinherited
void Isis::Angle::setDegrees ( double  degrees)
inlineinherited

Set the angle in units of Degrees.

Parameters
degreesThe new angle value, Null for invalid angle

Definition at line 259 of file Angle.h.

References Isis::Angle::Degrees, and Isis::Angle::setAngle().

void Isis::Latitude::setPlanetocentric ( double  latitude,
Angle::Units  units = Angle::Radians 
)

Set the latitude given a value in the Planetocentric coordinate system.

Parameters
latitudeThe planetographic latitude to set ourselves to
unitsThe angular units latitude is in

Definition at line 275 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.

Parameters
latitudeThe planetographic latitude to set ourselves to
unitsThe angular units latitude is in

Definition at line 326 of file Latitude.cpp.

References _FILEINFO_, Isis::Angle::Angle(), Isis::Angle::Degrees, Isis::IsSpecial(), m_equatorialRadius, m_polarRadius, Isis::IException::Programmer, Isis::Angle::Radians, Isis::Angle::radians(), and setAngle().

Referenced by Latitude().

void Isis::Angle::setRadians ( double  radians)
inlineinherited

Set the angle in units of Radians.

Parameters
radiansThe new angle value, Null for invalid angle

Definition at line 252 of file Angle.h.

References Isis::Angle::Radians, and Isis::Angle::setAngle().

QString Isis::Angle::toString ( bool  includeUnits = true) const
virtualinherited

Get the angle in human-readable form.

Parameters
includeUnitsInclude the angle's units in the text.
Returns
A user-displayable angle string.

Definition at line 256 of file Angle.cpp.

References Isis::Angle::degrees(), Isis::Angle::isValid(), and Isis::toString().

Referenced by Isis::operator<<(), and Isis::Hillshade::shadedValue().

double Isis::Angle::unitWrapValue ( const Units unit) const
protectedinherited

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.

Parameters
unitDesired units of the Angle wrap constant (see Angle::Units)
Returns
Wrap value in specified units

Definition at line 279 of file Angle.cpp.

References _FILEINFO_, Isis::Angle::Degrees, Isis::PI(), Isis::IException::Programmer, and Isis::Angle::Radians.

Referenced by Isis::Longitude::positiveWest(), and Isis::Longitude::setPositiveWest().

Member Data Documentation

Distance* Isis::Latitude::m_equatorialRadius
private

Used for converting to Planetographic, this is the radius of the target on the equatorial plane.

Definition at line 162 of file Latitude.h.

Referenced by Latitude(), operator=(), planetographic(), setPlanetographic(), and ~Latitude().

ErrorChecking Isis::Latitude::m_errors
private

This contains which exceptions should not be thrown.

Definition at line 170 of file Latitude.h.

Referenced by add(), Latitude(), operator=(), and setAngle().

Distance* Isis::Latitude::m_polarRadius
private

Used for converting to Planetographic, this is the radius of the target perpendicular to the equatorial plane.

Definition at line 167 of file Latitude.h.

Referenced by Latitude(), operator=(), planetographic(), setPlanetographic(), and ~Latitude().


The documentation for this class was generated from the following files: