use std::memcpy
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Marquardt 2023-01-12 17:19:35 +01:00
parent 2f0eace822
commit ce3841a23d

View File

@ -275,44 +275,32 @@ void AcsController::performControlOperation() {
case SUBMODE_IDLE:
guidance.sunQuatPtg(&sensorValues, &mekfData, &susDataProcessed, &gpsDataProcessed, now,
targetQuat, refSatRate);
for ( uint8_t i = 0; i < 4; i++ ) {
quatRef[i] = acsParameters.targetModeControllerParameters.quatRef[i];
}
std::memcpy(quatRef, acsParameters.targetModeControllerParameters.quatRef, 4 * sizeof(double));
enableAntiStiction = acsParameters.targetModeControllerParameters.enableAntiStiction;
break;
case SUBMODE_PTG_TARGET:
guidance.targetQuatPtgThreeAxes(&sensorValues, &gpsDataProcessed, &mekfData, now,
targetQuat, refSatRate);
for ( uint8_t i = 0; i < 4; i++ ) {
quatRef[i] = acsParameters.targetModeControllerParameters.quatRef[i];
}
std::memcpy(quatRef, acsParameters.targetModeControllerParameters.quatRef, 4 * sizeof(double));
enableAntiStiction = acsParameters.targetModeControllerParameters.enableAntiStiction;
break;
case SUBMODE_PTG_TARGET_GS:
guidance.targetQuatPtgGs(&sensorValues, &mekfData, &susDataProcessed, &gpsDataProcessed,
now, targetQuat, refSatRate);
for ( uint8_t i = 0; i < 4; i++ ) {
quatRef[i] = acsParameters.targetModeControllerParameters.quatRef[i];
}
std::memcpy(quatRef, acsParameters.targetModeControllerParameters.quatRef, 4 * sizeof(double));
enableAntiStiction = acsParameters.targetModeControllerParameters.enableAntiStiction;
break;
case SUBMODE_PTG_NADIR:
guidance.quatNadirPtgThreeAxes(&sensorValues, &gpsDataProcessed, &mekfData, now, targetQuat,
refSatRate);
for ( uint8_t i = 0; i < 4; i++ ) {
quatRef[i] = acsParameters.nadirModeControllerParameters.quatRef[i];
}
std::memcpy(quatRef, acsParameters.nadirModeControllerParameters.quatRef, 4 * sizeof(double));
enableAntiStiction = acsParameters.nadirModeControllerParameters.enableAntiStiction;
break;
case SUBMODE_PTG_INERTIAL:
guidance.inertialQuatPtg(targetQuat, refSatRate);
for ( uint8_t i = 0; i < 4; i++ ) {
quatRef[i] = acsParameters.inertialModeControllerParameters.quatRef[i];
}
std::memcpy(quatRef, acsParameters.inertialModeControllerParameters.quatRef, 4 * sizeof(double));
enableAntiStiction = acsParameters.inertialModeControllerParameters.enableAntiStiction;
break;
}