Isis Developer Reference
Latitude.h
Go to the documentation of this file.
1#ifndef Latitude_h
2#define Latitude_h
3
9/* SPDX-License-Identifier: CC0-1.0 */
10
11#include "Angle.h"
12
13namespace Isis {
14 class Distance;
15 class PvlGroup;
16
51 class Latitude : public Angle {
52 public:
77
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,
134
135 double planetographic(Angle::Units units = Angle::Radians) const;
136 void setPlanetographic(double latitude,
138
139 ErrorChecking errorChecking() const;
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:
166 Distance *m_equatorialRadius;
171 Distance *m_polarRadius;
172
174 ErrorChecking m_errors;
175 };
176}
177
178#endif
Defines an angle and provides unit conversions.
Definition Angle.h:45
virtual double angle(const Units &unit) const
Return angle value in desired units.
Definition Angle.cpp:289
Units
The set of usable angle measurement units.
Definition Angle.h:49
@ Radians
Radians are generally used in mathematical equations, 0-2*PI is one circle, however these are more di...
Definition Angle.h:63
Distance measurement, usually in meters.
Definition Distance.h:34
This class is designed to encapsulate the concept of a Latitude.
Definition Latitude.h:51
void setPlanetographic(double latitude, Angle::Units units=Angle::Radians)
Set the latitude given a value in the Planetographic coordinate system.
Definition Latitude.cpp:360
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
~Latitude()
This cleans up the Latitude class.
Definition Latitude.cpp:260
Latitude add(Angle angleToAdd, PvlGroup mapping)
Adds an angle to this latitude.
Definition Latitude.cpp:503
ErrorChecking
Some user-configurable error checking parameters.
Definition Latitude.h:71
@ ThrowAllErrors
Throw an exception if any problems are found.
Definition Latitude.h:73
@ AllowPastPole
Don't throw an exception if a latitude beyond -90/90 is found.
Definition Latitude.h:75
CoordinateType
These are the latitude coordinate systems.
Definition Latitude.h:85
@ Planetocentric
This is the universal (and default) latitude coordinate system.
Definition Latitude.h:91
@ Planetographic
This is a secondary coordinate system for latitudes.
Definition Latitude.h:103
bool inRange(Latitude min, Latitude max) const
Checks if this latitude value is within the given range.
Definition Latitude.cpp:439
void setErrorChecking(ErrorChecking errors)
Set the error checking status.
Definition Latitude.cpp:420
double planetographic(Angle::Units units=Angle::Radians) const
Get the latitude in the planetographic coordinate system.
Definition Latitude.cpp:315
Latitude()
Create a blank Latitude object without Planetographic support.
Definition Latitude.cpp:25
double planetocentric(Angle::Units units=Angle::Radians) const
Get the latitude in the planetocentric (universal) coordinate system.
Definition Latitude.cpp:282
void setPlanetocentric(double latitude, Angle::Units units=Angle::Radians)
Set the latitude given a value in the Planetocentric coordinate system.
Definition Latitude.cpp:293
ErrorChecking errorChecking() const
Get the error checking status.
Definition Latitude.cpp:407
virtual void setAngle(const double &angle, const Angle::Units &units)
Same as planetocentric.
Definition Latitude.cpp:583
Contains multiple PvlContainers.
Definition PvlGroup.h:41
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16