From 29a64ea38a4bb1a420c132cf3eb6ee371a4b7275 Mon Sep 17 00:00:00 2001 From: Oleg Alexandrov Date: Tue, 14 May 2024 10:06:36 -0700 Subject: [PATCH] Use image center when computing flying height --- src/UsgsAstroLsSensorModel.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/UsgsAstroLsSensorModel.cpp b/src/UsgsAstroLsSensorModel.cpp index 8d1d9857a..4a88aca7b 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;