Skip to content

Commit

Permalink
Merge pull request mavlink#532 from thomasgubler/map3d_errors
Browse files Browse the repository at this point in the history
fix unused-but-set-variable warnings/errors in map3D
  • Loading branch information
LorenzMeier committed Feb 19, 2014
2 parents 05a3741 + 14dcd87 commit 2a69272
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/ui/map3D/Imagery.cc
Original file line number Diff line number Diff line change
Expand Up @@ -542,21 +542,17 @@ Imagery::UTMtoLL(double utmNorthing, double utmEasting, const QString& utmZone,
double e1 = (1.0 - sqrt(1.0 - WGS84_ECCSQ)) / (1.0 + sqrt(1.0 - WGS84_ECCSQ));
double N1, T1, C1, R1, D, M;
double LongOrigin;
double mu, phi1, phi1Rad;
double mu, phi1Rad;
double x, y;
int ZoneNumber;
char ZoneLetter;
bool NorthernHemisphere;

x = utmEasting - 500000.0; //remove 500,000 meter offset for longitude
y = utmNorthing;

std::istringstream iss(utmZone.toStdString());
iss >> ZoneNumber >> ZoneLetter;
if ((ZoneLetter - 'N') >= 0) {
NorthernHemisphere = true;//point is in northern hemisphere
} else {
NorthernHemisphere = false;//point is in southern hemisphere
if ((ZoneLetter - 'N') < 0) {
y -= 10000000.0;//remove 10,000,000 meter offset used for southern hemisphere
}

Expand All @@ -573,7 +569,6 @@ Imagery::UTMtoLL(double utmNorthing, double utmEasting, const QString& utmZone,
+ (21.0 * e1 * e1 / 16.0 - 55.0 * e1 * e1 * e1 * e1 / 32.0)
* sin(4.0 * mu)
+ (151.0 * e1 * e1 * e1 / 96.0) * sin(6.0 * mu);
phi1 = phi1Rad / M_PI * 180.0;

N1 = WGS84_A / sqrt(1.0 - WGS84_ECCSQ * sin(phi1Rad) * sin(phi1Rad));
T1 = tan(phi1Rad) * tan(phi1Rad);
Expand Down

0 comments on commit 2a69272

Please sign in to comment.