52 ObliqueCylindrical::ObliqueCylindrical(
Pvl &label,
bool allowDefaults) :
65 if (m_poleLatitude < -90 || m_poleLatitude > 90) {
67 "Pole latitude must be between -90 and 90.",
73 if (m_poleLongitude < -360 || m_poleLongitude > 360) {
75 "Pole longitude must be between -360 and 360.",
81 if (m_poleRotation < -360 || m_poleRotation > 360) {
83 "Pole rotation must be between -360 and 360.",
87 bool calculateVectors =
false;
91 || mapGroup[
"XAxisVector"].size() != 3) {
92 calculateVectors =
true;
96 || mapGroup[
"YAxisVector"].size() != 3) {
97 calculateVectors =
true;
101 || mapGroup[
"ZAxisVector"].size() != 3) {
102 calculateVectors =
true;
105 if (!calculateVectors) {
128 eul2m_c(rotationAngle, latitudeAngle, longitudeAngle, 3, 2, 3, pvec);
146 for (
int i = 0; i < 3; i++) {
151 mapGroup[
"XAxisVector"] +=
toString(pvec[0][i]);
152 mapGroup[
"YAxisVector"] +=
toString(pvec[1][i]);
153 mapGroup[
"ZAxisVector"] +=
toString(pvec[2][i]);
160 QString message =
"Invalid label group [Mapping]";
178 if (!Projection::operator==(proj))
return false;
195 return "ObliqueCylindrical";
221 double normalLat, normalLon;
222 double obliqueLat, obliqueLon;
241 obliqueLat = asin(sin(poleLatitude) * sin(normalLat) +
242 cos(poleLatitude) * cos(normalLat)
243 * cos(normalLon - poleLongitude));
245 obliqueLon = atan2(cos(normalLat) * sin(normalLon - poleLongitude),
246 sin(poleLatitude) * cos(normalLat)
247 * cos(normalLon - poleLongitude) -
250 while(obliqueLon < -
PI) {
251 obliqueLon += (2.0 *
PI);
254 while(obliqueLon >=
PI) {
255 obliqueLon -= (2.0 *
PI);
303 double obliqueLat, obliqueLon;
308 obliqueLat = asin(sin(poleLatitude) * sin(
m_latitude) -
359 double &minY,
double &maxY) {
431 void ObliqueCylindrical::init() {
443 "The input center latitude is too close to a pole "
444 "which will result in a division by zero.",
463 bool allowDefaults) {