|
|
@ -47,23 +47,12 @@ ActuatorEffectivenessStandardVTOL::ActuatorEffectivenessStandardVTOL() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool |
|
|
|
bool |
|
|
|
ActuatorEffectivenessStandardVTOL::update() |
|
|
|
ActuatorEffectivenessStandardVTOL::getEffectivenessMatrix(matrix::Matrix<float, NUM_AXES, NUM_ACTUATORS> &matrix) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (_updated) { |
|
|
|
if (!_updated) { |
|
|
|
_updated = false; |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
|
|
|
ActuatorEffectivenessStandardVTOL::setFlightPhase(const FlightPhase &flight_phase) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ActuatorEffectiveness::setFlightPhase(flight_phase); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_updated = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (_flight_phase) { |
|
|
|
switch (_flight_phase) { |
|
|
|
case FlightPhase::HOVER_FLIGHT: { |
|
|
|
case FlightPhase::HOVER_FLIGHT: { |
|
|
|
const float standard_vtol[NUM_AXES][NUM_ACTUATORS] = { |
|
|
|
const float standard_vtol[NUM_AXES][NUM_ACTUATORS] = { |
|
|
@ -74,7 +63,7 @@ ActuatorEffectivenessStandardVTOL::setFlightPhase(const FlightPhase &flight_phas |
|
|
|
{ 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, |
|
|
|
{ 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, |
|
|
|
{-0.25f, -0.25f, -0.25f, -0.25f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f} |
|
|
|
{-0.25f, -0.25f, -0.25f, -0.25f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f} |
|
|
|
}; |
|
|
|
}; |
|
|
|
_effectiveness = matrix::Matrix<float, NUM_AXES, NUM_ACTUATORS>(standard_vtol); |
|
|
|
matrix = matrix::Matrix<float, NUM_AXES, NUM_ACTUATORS>(standard_vtol); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -87,7 +76,7 @@ ActuatorEffectivenessStandardVTOL::setFlightPhase(const FlightPhase &flight_phas |
|
|
|
{ 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, |
|
|
|
{ 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, |
|
|
|
{ 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f} |
|
|
|
{ 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f} |
|
|
|
}; |
|
|
|
}; |
|
|
|
_effectiveness = matrix::Matrix<float, NUM_AXES, NUM_ACTUATORS>(standard_vtol); |
|
|
|
matrix = matrix::Matrix<float, NUM_AXES, NUM_ACTUATORS>(standard_vtol); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -101,8 +90,19 @@ ActuatorEffectivenessStandardVTOL::setFlightPhase(const FlightPhase &flight_phas |
|
|
|
{ 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, |
|
|
|
{ 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, |
|
|
|
{-0.25f, -0.25f, -0.25f, -0.25f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f} |
|
|
|
{-0.25f, -0.25f, -0.25f, -0.25f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f} |
|
|
|
}; |
|
|
|
}; |
|
|
|
_effectiveness = matrix::Matrix<float, NUM_AXES, NUM_ACTUATORS>(standard_vtol); |
|
|
|
matrix = matrix::Matrix<float, NUM_AXES, NUM_ACTUATORS>(standard_vtol); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_updated = false; |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
|
|
|
ActuatorEffectivenessStandardVTOL::setFlightPhase(const FlightPhase &flight_phase) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ActuatorEffectiveness::setFlightPhase(flight_phase); |
|
|
|
|
|
|
|
_updated = true; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|