Isis 3 Programmer Reference
Latitude.h
1 #ifndef Latitude_h
2 #define Latitude_h
3 
9 /* SPDX-License-Identifier: CC0-1.0 */
10 
11 #include "Angle.h"
12 
13 namespace Isis {
14  class Distance;
15  class PvlGroup;
16 
51  class Latitude : public Angle {
52  public:
76  };
77 
104  };
105 
106  Latitude();
107  Latitude(double latitude,
108  Angle::Units latitudeUnits,
109  ErrorChecking errors = AllowPastPole);
110 
111  Latitude(Angle latitude, ErrorChecking errors = AllowPastPole);
112 
113  Latitude(Angle latitude,
114  PvlGroup mapping,
115  ErrorChecking errors = ThrowAllErrors);
116 
117  Latitude(double latitude,
118  PvlGroup mapping,
119  Angle::Units latitudeUnits,
120  ErrorChecking errors = ThrowAllErrors);
121 
122  Latitude(double latitude, Distance equatorialRadius, Distance polarRadius,
123  CoordinateType latType = Planetocentric,
124  Angle::Units latitudeUnits = Angle::Radians,
125  ErrorChecking errors = ThrowAllErrors);
126 
127  Latitude(const Latitude &latitudeToCopy);
128 
129  ~Latitude();
130 
131  double planetocentric(Angle::Units units = Angle::Radians) const;
132  void setPlanetocentric(double latitude,
133  Angle::Units units = Angle::Radians);
134 
135  double planetographic(Angle::Units units = Angle::Radians) const;
136  void setPlanetographic(double latitude,
137  Angle::Units units = Angle::Radians);
138 
140  void setErrorChecking(ErrorChecking errors);
141 
142  bool inRange(Latitude min, Latitude max) const;
143 
144  Latitude& operator=(const Latitude & latitudeToCopy);
145  Latitude add(Angle angleToAdd, PvlGroup mapping);
146  Latitude add(Angle angleToAdd, Distance equatorialRadius, Distance polarRadius,
147  CoordinateType latType);
148 
158  protected:
159  virtual void setAngle(const double &angle, const Angle::Units &units);
160 
161  private:
172 
175  };
176 }
177 
178 #endif
Isis::Latitude
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:51
Isis::Latitude::add
Latitude add(Angle angleToAdd, PvlGroup mapping)
Adds an angle to this latitude.
Definition: Latitude.cpp:503
Isis::Latitude::m_polarRadius
Distance * m_polarRadius
Used for converting to Planetographic, this is the radius of the target perpendicular to the equatori...
Definition: Latitude.h:171
Isis::Latitude::planetographic
double planetographic(Angle::Units units=Angle::Radians) const
Get the latitude in the planetographic coordinate system.
Definition: Latitude.cpp:315
Isis::Latitude::~Latitude
~Latitude()
This cleans up the Latitude class.
Definition: Latitude.cpp:260
Isis::Latitude::Planetographic
@ Planetographic
This is a secondary coordinate system for latitudes.
Definition: Latitude.h:103
Isis::Distance
Distance measurement, usually in meters.
Definition: Distance.h:34
Isis::Latitude::ErrorChecking
ErrorChecking
Some user-configurable error checking parameters.
Definition: Latitude.h:71
Isis::Latitude::setErrorChecking
void setErrorChecking(ErrorChecking errors)
Set the error checking status.
Definition: Latitude.cpp:420
Isis::Latitude::setPlanetographic
void setPlanetographic(double latitude, Angle::Units units=Angle::Radians)
Set the latitude given a value in the Planetographic coordinate system.
Definition: Latitude.cpp:360
Isis::Latitude::setPlanetocentric
void setPlanetocentric(double latitude, Angle::Units units=Angle::Radians)
Set the latitude given a value in the Planetocentric coordinate system.
Definition: Latitude.cpp:293
Isis::Latitude::setAngle
virtual void setAngle(const double &angle, const Angle::Units &units)
Same as planetocentric.
Definition: Latitude.cpp:583
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Isis::Latitude::Planetocentric
@ Planetocentric
This is the universal (and default) latitude coordinate system.
Definition: Latitude.h:91
Isis::Latitude::m_equatorialRadius
Distance * m_equatorialRadius
Used for converting to Planetographic, this is the radius of the target on the equatorial plane.
Definition: Latitude.h:166
Isis::Latitude::operator=
Latitude & operator=(const Latitude &latitudeToCopy)
This assigns another latitude to this one - making this latitude an exact duplicate of the other.
Definition: Latitude.cpp:467
Isis::Latitude::ThrowAllErrors
@ ThrowAllErrors
Throw an exception if any problems are found.
Definition: Latitude.h:73
Isis::Angle::Units
Units
The set of usable angle measurement units.
Definition: Angle.h:49
Isis::Angle
Defines an angle and provides unit conversions.
Definition: Angle.h:45
Isis::Latitude::Latitude
Latitude()
Create a blank Latitude object without Planetographic support.
Definition: Latitude.cpp:25
Isis::Latitude::m_errors
ErrorChecking m_errors
This contains which exceptions should not be thrown.
Definition: Latitude.h:174
Isis::Latitude::AllowPastPole
@ AllowPastPole
Don't throw an exception if a latitude beyond -90/90 is found.
Definition: Latitude.h:75
Isis::Latitude::planetocentric
double planetocentric(Angle::Units units=Angle::Radians) const
Get the latitude in the planetocentric (universal) coordinate system.
Definition: Latitude.cpp:282
Isis::Latitude::inRange
bool inRange(Latitude min, Latitude max) const
Checks if this latitude value is within the given range.
Definition: Latitude.cpp:439
Isis::Latitude::errorChecking
ErrorChecking errorChecking() const
Get the error checking status.
Definition: Latitude.cpp:407
Isis::Latitude::CoordinateType
CoordinateType
These are the latitude coordinate systems.
Definition: Latitude.h:85
Isis::Angle::angle
virtual double angle(const Units &unit) const
Return angle value in desired units.
Definition: Angle.cpp:289
Isis::Angle::Radians
@ Radians
Radians are generally used in mathematical equations, 0-2*PI is one circle, however these are more di...
Definition: Angle.h:63
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16