ignore rotation rates from quest and str for safe mode
This commit is contained in:
parent
77527c631c
commit
13aa6f50ff
@ -173,7 +173,7 @@ void AcsController::performAttitudeControl() {
|
||||
&susDataProcessed, &gyrDataProcessed, &gpsDataProcessed, &acsParameters);
|
||||
attitudeEstimation.quest(&susDataProcessed, &mgmDataProcessed, &attitudeEstimationData);
|
||||
fusedRotationEstimation.estimateFusedRotationRate(
|
||||
&susDataProcessed, &mgmDataProcessed, &gyrDataProcessed, &sensorValues,
|
||||
modeIsSafe, &susDataProcessed, &mgmDataProcessed, &gyrDataProcessed, &sensorValues,
|
||||
&attitudeEstimationData, timeDelta, &fusedRotRateSourcesData, &fusedRotRateData);
|
||||
result = navigation.useMekf(&sensorValues, &gyrDataProcessed, &mgmDataProcessed,
|
||||
&susDataProcessed, &attitudeEstimationData, &acsParameters);
|
||||
@ -914,6 +914,9 @@ void AcsController::modeChanged(Mode_t mode, Submode_t submode) {
|
||||
PoolReadGuard pg(&rw4SpeedSet);
|
||||
rw4SpeedSet.setRwSpeed(0, 10);
|
||||
}
|
||||
modeIsSafe = true;
|
||||
} else {
|
||||
modeIsSafe = false;
|
||||
}
|
||||
if (submode == acs::SafeSubmode::DETUMBLE) {
|
||||
detumbleState = DetumbleState::IN_DETUMBLE;
|
||||
|
@ -62,6 +62,8 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
|
||||
double timeDelta = 0.0;
|
||||
timeval oldTimeRelative;
|
||||
|
||||
bool modeIsSafe = true;
|
||||
|
||||
AcsParameters acsParameters;
|
||||
SensorProcessing sensorProcessing;
|
||||
AttitudeEstimation attitudeEstimation;
|
||||
|
@ -5,17 +5,17 @@ FusedRotationEstimation::FusedRotationEstimation(AcsParameters *acsParameters_)
|
||||
}
|
||||
|
||||
void FusedRotationEstimation::estimateFusedRotationRate(
|
||||
acsctrl::SusDataProcessed *susDataProcessed, acsctrl::MgmDataProcessed *mgmDataProcessed,
|
||||
acsctrl::GyrDataProcessed *gyrDataProcessed, ACS::SensorValues *sensorValues,
|
||||
acsctrl::AttitudeEstimationData *attitudeEstimationData, const double timeDelta,
|
||||
acsctrl::FusedRotRateSourcesData *fusedRotRateSourcesData,
|
||||
const bool modeIsSafe, acsctrl::SusDataProcessed *susDataProcessed,
|
||||
acsctrl::MgmDataProcessed *mgmDataProcessed, acsctrl::GyrDataProcessed *gyrDataProcessed,
|
||||
ACS::SensorValues *sensorValues, acsctrl::AttitudeEstimationData *attitudeEstimationData,
|
||||
const double timeDelta, acsctrl::FusedRotRateSourcesData *fusedRotRateSourcesData,
|
||||
acsctrl::FusedRotRateData *fusedRotRateData) {
|
||||
estimateFusedRotationRateStr(sensorValues, timeDelta, fusedRotRateSourcesData);
|
||||
estimateFusedRotationRateQuest(attitudeEstimationData, timeDelta, fusedRotRateSourcesData);
|
||||
estimateFusedRotationRateSusMgm(susDataProcessed, mgmDataProcessed, gyrDataProcessed,
|
||||
fusedRotRateSourcesData);
|
||||
|
||||
if (fusedRotRateSourcesData->rotRateTotalStr.isValid() and
|
||||
if (not modeIsSafe and fusedRotRateSourcesData->rotRateTotalStr.isValid() and
|
||||
acsParameters->onBoardParams.fusedRateFromStr) {
|
||||
PoolReadGuard pg(fusedRotRateData);
|
||||
if (pg.getReadResult() == returnvalue::OK) {
|
||||
@ -29,7 +29,7 @@ void FusedRotationEstimation::estimateFusedRotationRate(
|
||||
fusedRotRateData->rotRateSource.value = acs::rotrate::Source::STR;
|
||||
fusedRotRateData->rotRateSource.setValid(true);
|
||||
}
|
||||
} else if (fusedRotRateSourcesData->rotRateTotalQuest.isValid() and
|
||||
} else if (not modeIsSafe and fusedRotRateSourcesData->rotRateTotalQuest.isValid() and
|
||||
acsParameters->onBoardParams.fusedRateFromQuest) {
|
||||
PoolReadGuard pg(fusedRotRateData);
|
||||
if (pg.getReadResult() == returnvalue::OK) {
|
||||
|
@ -12,7 +12,7 @@ class FusedRotationEstimation {
|
||||
public:
|
||||
FusedRotationEstimation(AcsParameters *acsParameters_);
|
||||
|
||||
void estimateFusedRotationRate(acsctrl::SusDataProcessed *susDataProcessed,
|
||||
void estimateFusedRotationRate(const bool modeIsSafe, acsctrl::SusDataProcessed *susDataProcessed,
|
||||
acsctrl::MgmDataProcessed *mgmDataProcessed,
|
||||
acsctrl::GyrDataProcessed *gyrDataProcessed,
|
||||
ACS::SensorValues *sensorValues,
|
||||
|
Loading…
Reference in New Issue
Block a user