From eef0469c4993dce599306f60ce73eae200acee9f Mon Sep 17 00:00:00 2001
From: Oleg Alexandrov <oleg.alexandrov@gmail.com>
Date: Thu, 18 Aug 2022 10:53:14 -0700
Subject: [PATCH] Apply transform to reference point in PushFrameSensor and
 spellcheck

---
 src/UsgsAstroPushFrameSensorModel.cpp | 5 +++++
 src/Utilities.cpp                     | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/UsgsAstroPushFrameSensorModel.cpp b/src/UsgsAstroPushFrameSensorModel.cpp
index 034fb51..1054200 100644
--- a/src/UsgsAstroPushFrameSensorModel.cpp
+++ b/src/UsgsAstroPushFrameSensorModel.cpp
@@ -518,6 +518,11 @@ void UsgsAstroPushFrameSensorModel::applyTransformToState(ale::Rotation const& r
   applyRotationTranslationToXyzVec(r, zero_t, velocities);
   j["m_velocities"] = velocities;
 
+  // Apply the transform to the reference point
+  std::vector<double> refPt = j["m_referencePointXyz"];
+  applyRotationTranslationToXyzVec(r, t, refPt);
+  j["m_referencePointXyz"] = refPt;
+
   // We do not change the Sun position or velocity. The idea is that
   // the Sun is so far, that minor camera adjustments won't affect
   // where the Sun is.
diff --git a/src/Utilities.cpp b/src/Utilities.cpp
index 337e1e3..fcf20e6 100644
--- a/src/Utilities.cpp
+++ b/src/Utilities.cpp
@@ -34,7 +34,7 @@ void calculateRotationMatrixFromEuler(double euler[], double rotationMatrix[]) {
   rotationMatrix[8] = cos_a * cos_b;
 }
 
-// uses a quaternion to calclate a rotation matrix.
+// uses a quaternion to calculate a rotation matrix.
 // in - q[4]
 // out - rotationMatrix[9]
 void calculateRotationMatrixFromQuaternions(double q[4],
-- 
GitLab