From 2f0eace82279d6b73166ea37aa7fc41d39554dda Mon Sep 17 00:00:00 2001 From: Robin Marquardt Date: Thu, 12 Jan 2023 17:10:40 +0100 Subject: [PATCH] use std::memcpy --- mission/controller/acs/Guidance.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mission/controller/acs/Guidance.cpp b/mission/controller/acs/Guidance.cpp index 700fd521..4ba72674 100644 --- a/mission/controller/acs/Guidance.cpp +++ b/mission/controller/acs/Guidance.cpp @@ -588,12 +588,8 @@ void Guidance::quatNadirPtgThreeAxes(ACS::SensorValues *sensorValues, } void Guidance::inertialQuatPtg(double targetQuat[4], double refSatRate[3]) { - for (int i = 0; i < 4; i++) { - targetQuat[i] = acsParameters.inertialModeControllerParameters.tgtQuat[i]; - } - for (int i = 0; i < 3; i++) { - refSatRate[i] = acsParameters.inertialModeControllerParameters.refRotRate[i]; - } + std::memcpy(targetQuat, acsParameters.inertialModeControllerParameters.tgtQuat, 4 * sizeof(double)); + std::memcpy(refSatRate, acsParameters.inertialModeControllerParameters.refRotRate, 3 * sizeof(double)); } void Guidance::comparePtg(double targetQuat[4], acsctrl::MekfData *mekfData, double quatRef[4], double refSatRate[3],