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) {