Class ShooterProjectileType

java.lang.Object
com.flarerobotics.lib.control.shooter.data.ShooterProjectileType

public class ShooterProjectileType extends Object
Holder class for a shooter projectile.
  • Constructor Details

    • ShooterProjectileType

      public ShooterProjectileType(double effectiveMOI, double dragForceCoefficient, double mass, double e)
      Constructs a new ShooterProjectile.
      Parameters:
      effectiveMOI - The effective moment of inertia. See ShooterProjectileType.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.