7#include "LunarAzimuthalEqualArea.h"
13#include "IException.h"
14#include "TProjection.h"
41 QString message =
"Invalid label group [Mapping]";
59 if (!Projection::operator==(proj))
76 return "LunarAzimuthalEqualArea";
105 double lonRadians = lon *
Isis::PI / 180.0;
111 double latRadians = lat;
117 if (lonRadians == 0.0 && latRadians == 0.0) {
125 double E = acos(cos(latRadians) * cos(lonRadians));
126 double test = (sin(lonRadians) * cos(latRadians)) / sin(
E);
128 if (test > 1.0) test = 1.0;
129 else if (test < -1.0) test = -1.0;
131 double D =
HALFPI - asin(test);
132 if (latRadians < 0.0)
137 double RP = radius * sin(
E / PFAC);
167 double RP = sqrt((x * x) + (y * y));
170 if (y == 0.0 && x == 0.0) {
178 double D = atan2(y, x);
179 double test = RP / radius;
180 if (abs(test) > 1.0) {
184 double EPSILON = 0.0000000001;
186 double E = PFAC * asin(RP / radius);
188 lat =
HALFPI - (acos(sin(D) * sin(
E)));
190 if (abs(
HALFPI - abs(lat)) <= EPSILON) {
194 test = sin(
E) * cos(D) / sin(
HALFPI - lat);
195 if (test > 1.0) test = 1.0;
196 else if (test < -1.0) test = -1.0;
202 if (lon <= 0.0) lon = -
PI - lon;
243 double &minY,
double &maxY) {
300 bool allowDefaults) {
@ Unknown
A type of error that cannot be classified as any of the other error types.
Modified Lambert Azimuthal Equal-Area Map Projection.
bool SetCoordinate(const double x, const double y)
This method is used to set the projection x/y.
bool operator==(const TProjection &proj)
Compares two Projection objects to see if they are equal.
QString Name() const
Returns the name of the map projection, "LunarAzimuthalEqualArea".
QString Version() const
Returns the version of the map projection.
double m_maxLibration
Value of the MaximumLibration keyword from the Mapping group of the labels.
PvlGroup Mapping()
This function returns the keywords that this projection uses.
~LunarAzimuthalEqualArea()
Destroys the LunarAzimuthalEqualArea object.
bool XYRange(double &minX, double &maxX, double &minY, double &maxY)
This method is used to determine the x/y range which completely covers the area of interest specified...
LunarAzimuthalEqualArea(Pvl &label)
Constructs a LunarAzimuthalEqualArea object.
bool SetGround(const double lat, const double lon)
This method is used to set the latitude/longitude (assumed to be of the correct LatitudeType,...
double m_maximumX
See minimumX description.
bool m_good
Indicates if the contents of m_x, m_y, m_latitude, and m_longitude are valid.
double m_minimumX
The data elements m_minimumX, m_minimumY, m_maximumX, and m_maximumY are convience data elements when...
PvlGroup m_mappingGrp
Mapping group that created this projection.
double m_minimumY
See minimumX description.
void SetXY(double x, double y)
This protected method is a helper for derived classes.
double m_maximumY
See minimumX description.
void SetComputedXY(double x, double y)
This protected method is a helper for derived classes.
Contains multiple PvlContainers.
Container for cube-like labels.
@ Traverse
Search child objects.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Base class for Map TProjections.
double m_longitude
This contains the currently set longitude value.
bool IsPlanetocentric() const
This indicates if the latitude type is planetocentric (as opposed to planetographic).
double m_minimumLatitude
Contains the minimum latitude for the entire ground range.
double m_maximumLongitude
Contains the maximum longitude for the entire ground range.
double m_equatorialRadius
Polar radius of the target.
LongitudeDirection m_longitudeDirection
An enumerated type indicating the LongitudeDirection read from the labels.
double ToPlanetocentric(const double lat) const
This method converts a planetographic latitude to a planetocentric latitude.
void XYRangeCheck(const double latitude, const double longitude)
This convience function is established to assist in the development of the XYRange virtual method.
double m_minimumLongitude
Contains the minimum longitude for the entire ground range.
@ PositiveWest
Longitude values increase in the westerly direction.
double m_maximumLatitude
Contains the maximum latitude for the entire ground range.
virtual PvlGroup Mapping()
This function returns the keywords that this projection uses.
double ToPlanetographic(const double lat) const
This method converts a planetocentric latitude to a planetographic latitude.
double m_latitude
This contains the currently set latitude value.
const double E
Sets some basic constants for use in ISIS programming.
This is free and unencumbered software released into the public domain.
const double HALFPI
The mathematical constant PI/2.
const double PI
The mathematical constant PI.
Namespace for the standard library.