diff --git a/src/UsgsAstroLsSensorModel.cpp b/src/UsgsAstroLsSensorModel.cpp index 8d1d9857a3a78732a8a4462f92112c63a9380beb..4a88aca7bc789e2ad094750085062390e606ba78 100644 --- a/src/UsgsAstroLsSensorModel.cpp +++ b/src/UsgsAstroLsSensorModel.cpp @@ -629,8 +629,10 @@ void UsgsAstroLsSensorModel::updateState() { "based on dx {} dy {} dz {}", m_gsd, dx, dy, dz) - // Compute flying height - csm::EcefCoord sensorPos = getSensorPosition(0.0); + // Compute the flying height. Use the center of the image, as for + // m_referencePointXyz and m_gsd. + ip = csm::ImageCoord(lineCtr, sampCtr); + csm::EcefCoord sensorPos = getSensorPosition(ip); dx = sensorPos.x - m_referencePointXyz.x; dy = sensorPos.y - m_referencePointXyz.y; dz = sensorPos.z - m_referencePointXyz.z;