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