Package jsim.forces
Class MagnusForce
java.lang.Object
jsim.forces.MagnusForce
- All Implemented Interfaces:
ForceGenerator
Magnus force for spinning projectiles: F_magnus = k · (ω × v).
The cross product of angular velocity with linear velocity produces a lift force
perpendicular to the spin axis, causing curved flight. The Magnus coefficient k
(kg/rad·m) is empirically determined per object (typically 0.1–2.0 for FRC game pieces).
-
Constructor Summary
ConstructorsConstructorDescriptionMagnusForce(RigidBody body, double magnusCoefficient) Create a Magnus force generator for the given body. -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(double dt) Apply forces/torques to whichever bodies this generator influences.
-
Constructor Details
-
MagnusForce
Create a Magnus force generator for the given body.- Parameters:
body- the spinning body to apply Magnus lift tomagnusCoefficient- Magnus lift coefficient k (kg)
-
-
Method Details
-
apply
public void apply(double dt) Description copied from interface:ForceGeneratorApply forces/torques to whichever bodies this generator influences.- Specified by:
applyin interfaceForceGenerator- Parameters:
dt- the fixed simulation timestep in seconds
-