#include <spin_decay_model.hpp>
◆ SpinDecayModel()
Constructs a spin decay model.
- Parameters
-
| magnus_model | External Magnus force model used for torque coupling |
- Note
- Explicit to prevent unintended implicit conversions.
◆ setLinearDecay()
| void frcsim::aerodynamics::SpinDecayModel::setLinearDecay |
( |
double | k | ) |
|
|
inlinenoexcept |
Sets linear angular decay coefficient.
- Parameters
-
| k | Linear damping coefficient |
◆ setNonlinearDecay()
| void frcsim::aerodynamics::SpinDecayModel::setNonlinearDecay |
( |
double | k | ) |
|
|
inlinenoexcept |
Sets nonlinear angular decay coefficient.
- Parameters
-
| k | Nonlinear damping coefficient (scales with angular magnitude) |
◆ setRadiusVector()
| void frcsim::aerodynamics::SpinDecayModel::setRadiusVector |
( |
const Vector3 & | r | ) |
|
|
inlinenoexcept |
Sets radius (lever arm) used for Magnus torque calculation.
- Parameters
-
| r | Radius vector in body frame |
◆ setVelocityCoupling()
| void frcsim::aerodynamics::SpinDecayModel::setVelocityCoupling |
( |
double | k | ) |
|
|
inlinenoexcept |
Sets velocity-coupled damping coefficient.
- Parameters
-
| k | Coupling coefficient with linear velocity magnitude |
◆ step()
| Vector3 frcsim::aerodynamics::SpinDecayModel::step |
( |
const Vector3 & | omegaLocal, |
|
|
const Vector3 & | velocityWorld, |
|
|
const Quaternion & | orientation, |
|
|
double | dt ) const |
|
inlinenoexcept |
Advances angular velocity forward in time.
Performs:
- Frame transformation (body → world)
- Damping calculations (linear, velocity-coupled, nonlinear)
- Magnus torque computation via MagnusModel
- Time integration in world frame
- Transformation back to body frame
- Parameters
-
| omegaLocal | Angular velocity in body frame |
| velocityWorld | Linear velocity in world frame |
| orientation | Body orientation as quaternion |
| dt | Time step (seconds) |
- Returns
- Updated angular velocity in body frame
Linear damping proportional to angular velocity
Velocity-coupled damping scales with linear speed
Nonlinear damping scales with angular magnitude
Magnus force computed from external model. This avoids duplicating aerodynamic logic.
Torque generated via lever arm cross force
The documentation for this class was generated from the following file: