46 LunarAzimuthalEqualArea::LunarAzimuthalEqualArea(
57 QString message =
"Invalid label group [Mapping]";
75 if (!Projection::operator==(proj))
92 return "LunarAzimuthalEqualArea";
121 double lonRadians = lon *
Isis::PI / 180.0;
127 double latRadians = lat;
133 if (lonRadians == 0.0 && latRadians == 0.0) {
141 double E = acos(cos(latRadians) * cos(lonRadians));
142 double test = (sin(lonRadians) * cos(latRadians)) / sin(
E);
144 if (test > 1.0) test = 1.0;
145 else if (test < -1.0) test = -1.0;
147 double D =
HALFPI - asin(test);
148 if (latRadians < 0.0)
153 double RP = radius * sin(
E / PFAC);
183 double RP = sqrt((x * x) + (y * y));
186 if (y == 0.0 && x == 0.0) {
194 double D = atan2(y, x);
195 double test = RP / radius;
196 if (abs(test) > 1.0) {
200 double EPSILON = 0.0000000001;
202 double E = PFAC * asin(RP / radius);
204 lat =
HALFPI - (acos(sin(D) * sin(
E)));
206 if (abs(
HALFPI - abs(lat)) <= EPSILON) {
210 test = sin(
E) * cos(D) / sin(
HALFPI - lat);
211 if (test > 1.0) test = 1.0;
212 else if (test < -1.0) test = -1.0;
218 if (lon <= 0.0) lon = -
PI - lon;
259 double &minY,
double &maxY) {
316 bool allowDefaults) {
bool SetGround(const double lat, const double lon)
This method is used to set the latitude/longitude (assumed to be of the correct LatitudeType, LongitudeDirection, and LongitudeDomain.
double m_maxLibration
Value of the MaximumLibration keyword from the Mapping group of the labels.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
QString Name() const
Returns the name of the map projection, "LunarAzimuthalEqualArea".
const double PI
The mathematical constant PI.
Longitude values increase in the westerly direction.
Base class for Map TProjections.
Isis::TProjection * LunarAzimuthalEqualAreaPlugin(Isis::Pvl &lab, bool allowDefaults)
This is the function that is called in order to instantiate a LunarAzimuthalEqualArea object...
QString Version() const
Returns the version of the map projection.
const double HALFPI
The mathematical constant PI/2.
Namespace for the standard library.
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...
double m_minimumX
The data elements m_minimumX, m_minimumY, m_maximumX, and m_maximumY are convience data elements when...
void SetComputedXY(double x, double y)
This protected method is a helper for derived classes.
double m_latitude
This contains the currently set latitude value.
double m_maximumY
See minimumX description.
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_maximumLongitude
Contains the maximum longitude for the entire ground range.
double m_minimumLatitude
Contains the minimum latitude for the entire ground range.
double m_maximumLatitude
Contains the maximum latitude for the entire ground range.
double m_minimumY
See minimumX description.
double m_equatorialRadius
Polar radius of the target.
Contains multiple PvlContainers.
#define _FILEINFO_
Macro for the filename and line number.
A type of error that cannot be classified as any of the other error types.
Modified Lambert Azimuthal Equal-Area Map Projection.
bool operator==(const TProjection &proj)
Compares two Projection objects to see if they are equal.
~LunarAzimuthalEqualArea()
Destroys the LunarAzimuthalEqualArea object.
Container for cube-like labels.
double ToPlanetographic(const double lat) const
This method converts a planetocentric latitude to a planetographic latitude.
const double E
Sets some basic constants for use in ISIS programming.
virtual PvlGroup Mapping()
This function returns the keywords that this projection uses.
bool m_good
Indicates if the contents of m_x, m_y, m_latitude, and m_longitude are valid.
LongitudeDirection m_longitudeDirection
An enumerated type indicating the LongitudeDirection read from the labels.
bool SetCoordinate(const double x, const double y)
This method is used to set the projection x/y.
PvlGroup Mapping()
This function returns the keywords that this projection uses.
Namespace for ISIS/Bullet specific routines.
double ToPlanetocentric(const double lat) const
This method converts a planetographic latitude to a planetocentric latitude.
void SetXY(double x, double y)
This protected method is a helper for derived classes.
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.
double m_maximumX
See minimumX description.
PvlGroup m_mappingGrp
Mapping group that created this projection.