Skip to content

Commit 6deadc3

Browse files
committed
Removed unnecessary, duplicate calls to retrieve X,Y, and Z point :coordinates in method BundleSolutionInfo::outputPointsCSV. Addresses DOI-USGS#5646.
1 parent 332ec10 commit 6deadc3

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

isis/src/control/objs/BundleSolutionInfo/BundleSolutionInfo.cpp

+4-7
Original file line numberDiff line numberDiff line change
@@ -1670,17 +1670,14 @@ namespace Isis {
16701670
corrections();
16711671

16721672
if (m_settings->controlPointCoordTypeBundle() == SurfacePoint::Rectangular) {
1673-
double x = bundlecontrolpoint->adjustedSurfacePoint().GetX().kilometers();
16741673
double xCor = corrections(0); // km
1675-
double y = bundlecontrolpoint->adjustedSurfacePoint().GetY().kilometers();
16761674
double yCor = corrections(1); // km
1677-
double z = bundlecontrolpoint->adjustedSurfacePoint().GetZ().kilometers();
16781675
double zCor = corrections(2); // km
16791676

1680-
if (!IsSpecial(x) && !IsSpecial(y) && !IsSpecial(z)) {
1681-
SurfacePoint rectPoint(Displacement(x - xCor, Displacement::Kilometers),
1682-
Displacement(y - yCor, Displacement::Kilometers),
1683-
Displacement(z - zCor, Displacement::Kilometers));
1677+
if (!IsSpecial(dX) && !IsSpecial(dY) && !IsSpecial(dZ)) {
1678+
SurfacePoint rectPoint(Displacement(dX - xCor, Displacement::Kilometers),
1679+
Displacement(dY - yCor, Displacement::Kilometers),
1680+
Displacement(dZ - zCor, Displacement::Kilometers));
16841681

16851682
latInit = rectPoint.GetLatitude().degrees();
16861683
lonInit = rectPoint.GetLongitude().degrees();

0 commit comments

Comments
 (0)