Class ShooterProjectileType
java.lang.Object
com.flarerobotics.lib.control.shooter.data.ShooterProjectileType
Holder class for a shooter projectile.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Represents various projectile shapes with moment of inertia calculations. -
Constructor Summary
ConstructorsConstructorDescriptionShooterProjectileType
(double effectiveMOI, double dragForceCoefficient, double mass, double e) Constructs a new ShooterProjectile. -
Method Summary
Modifier and TypeMethodDescriptiondouble
double
double
double
getMass()
void
setDragForceCoeff
(double val) Sets the drag force coefficient.
-
Constructor Details
-
ShooterProjectileType
public ShooterProjectileType(double effectiveMOI, double dragForceCoefficient, double mass, double e) Constructs a new ShooterProjectile.- Parameters:
effectiveMOI
- The effective moment of inertia. SeeShooterProjectileType.ProjectileShape
.mass
- The mass in kg.e
- The efficiency coefficient, to match the actual behavior of the projectile during launch.
-
-
Method Details
-
getEffectiveInertia
public double getEffectiveInertia() -
getDragForceCoeff
public double getDragForceCoeff() -
getMass
public double getMass() -
getECoeff
public double getECoeff() -
setDragForceCoeff
public void setDragForceCoeff(double val) Sets the drag force coefficient.Tip: If you compute the drag force coefficient with a known rho (air density), such as 1.225 kg/m^3, then you can multiply by
currentAirDensity/1.225
to get the updated value for the current density.- Parameters:
val
- The new value.
-