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 
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:
166  Distance *m_equatorialRadius;
171  Distance *m_polarRadius;
172 
174  ErrorChecking m_errors;
175  };
176 }
177 
178 #endif
Isis::Target::radiiGroup
static PvlGroup radiiGroup(QString target)
Creates a Pvl Group with keywords TargetName, EquitorialRadius, and PolarRadius.
Definition: Target.cpp:403
Isis::Angle::Degrees
@ Degrees
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
Definition: Angle.h:56
Isis::Angle::toString
virtual QString toString(bool includeUnits=true) const
Get the angle in human-readable form.
Definition: Angle.cpp:243
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::planetographic
double planetographic(Angle::Units units=Angle::Radians) const
Get the latitude in the planetographic coordinate system.
Definition: Latitude.cpp:315
SpecialPixel.h
Isis::IException::Unknown
@ Unknown
A type of error that cannot be classified as any of the other error types.
Definition: IException.h:118
PvlGroup.h
Target.h
Isis::PvlContainer::hasKeyword
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Definition: PvlContainer.cpp:159
Isis::Latitude::~Latitude
~Latitude()
This cleans up the Latitude class.
Definition: Latitude.cpp:260
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::IsSpecial
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:197
IString.h
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::Distance::Meters
@ Meters
The distance is being specified in meters.
Definition: Distance.h:43
Isis::Latitude::setAngle
virtual void setAngle(const double &angle, const Angle::Units &units)
Same as planetocentric.
Definition: Latitude.cpp:583
Latitude.h
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::Latitude::Planetocentric
@ Planetocentric
This is the universal (and default) latitude coordinate system.
Definition: Latitude.h:91
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::IException
Isis exception class.
Definition: IException.h:91
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::AllowPastPole
@ AllowPastPole
Don't throw an exception if a latitude beyond -90/90 is found.
Definition: Latitude.h:75
IException.h
Isis::toDouble
double toDouble(const QString &string)
Global function to convert from a string to a double.
Definition: IString.cpp:149
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Isis::Angle::isValid
bool isValid() const
This indicates whether we have a legitimate angle stored or are in an unset, or invalid,...
Definition: Angle.cpp:95
Isis::Angle::Angle
Angle()
Constructs a blank angle object which needs a value to be set in order to do any calculations.
Definition: Angle.cpp:23
Isis::Latitude::planetocentric
double planetocentric(Angle::Units units=Angle::Radians) const
Get the latitude in the planetocentric (universal) coordinate system.
Definition: Latitude.cpp:282
Angle.h
Isis::Angle::degrees
double degrees() const
Get the angle in units of Degrees.
Definition: Angle.h:232
Isis::Angle::setAngle
virtual void setAngle(const double &angle, const Units &unit)
Set angle value in desired units.
Definition: Angle.cpp:323
Constants.h
Distance.h
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
Isis::IException::User
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition: IException.h:126
Isis::Angle::radians
double radians() const
Convert an angle to a double.
Definition: Angle.h:226