RW Status Check for ACS Ctrl #382
@ -161,8 +161,14 @@ void PtgCtrl::ptgNullspace(AcsParameters::PointingLawParameters *pointingLawPara
|
|||||||
VectorOperations<double>::mulScalar(rwTrqNs, -1, rwTrqNs, 4);
|
VectorOperations<double>::mulScalar(rwTrqNs, -1, rwTrqNs, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PtgCtrl::rwAntistiction(const bool *rwAvailable, const int32_t *omegaRw,
|
void PtgCtrl::rwAntistiction(ACS::SensorValues *sensorValues, double *torqueCommand) {
|
||||||
double *torqueCommand) {
|
bool rwAvailable[4] = {
|
||||||
|
(sensorValues->rw1Set.state.value && sensorValues->rw1Set.state.isValid()),
|
||||||
|
(sensorValues->rw2Set.state.value && sensorValues->rw2Set.state.isValid()),
|
||||||
|
(sensorValues->rw3Set.state.value && sensorValues->rw3Set.state.isValid()),
|
||||||
|
(sensorValues->rw4Set.state.value && sensorValues->rw4Set.state.isValid())};
|
||||||
|
int32_t omegaRw[4] = {sensorValues->rw1Set.currSpeed.value, sensorValues->rw2Set.currSpeed.value,
|
||||||
|
sensorValues->rw3Set.currSpeed.value, sensorValues->rw4Set.currSpeed.value};
|
||||||
for (uint8_t i = 0; i < 4; i++) {
|
for (uint8_t i = 0; i < 4; i++) {
|
||||||
if (rwAvailable[i]) {
|
if (rwAvailable[i]) {
|
||||||
if (torqueMemory[i] != 0) {
|
if (torqueMemory[i] != 0) {
|
||||||
|
@ -54,11 +54,10 @@ class PtgCtrl {
|
|||||||
const int32_t *speedRw3, double *rwTrqNs);
|
const int32_t *speedRw3, double *rwTrqNs);
|
||||||
|
|
||||||
/* @brief: Commands the stiction torque in case wheel speed is to low
|
/* @brief: Commands the stiction torque in case wheel speed is to low
|
||||||
* @param: rwAvailable Boolean Flag for all reaction wheels
|
* @param: sensorValues class containing all RW related values
|
||||||
* omegaRw current wheel speed of reaction wheels
|
|
||||||
* torqueCommand modified torque after antistiction
|
* torqueCommand modified torque after antistiction
|
||||||
*/
|
*/
|
||||||
void rwAntistiction(const bool *rwAvailable, const int32_t *omegaRw, double *torqueCommand);
|
void rwAntistiction(ACS::SensorValues *sensorValues, double *torqueCommand);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AcsParameters::RwHandlingParameters *rwHandlingParameters;
|
AcsParameters::RwHandlingParameters *rwHandlingParameters;
|
||||||
|
Loading…
Reference in New Issue
Block a user