Class AntPlusFitnessEquipmentPcc.CalculatedTrainerSpeedReceiver

java.lang.Object
com.dsi.ant.plugins.antplus.pcc.AntPlusFitnessEquipmentPcc.CalculatedTrainerSpeedReceiver
Enclosing class:
AntPlusFitnessEquipmentPcc

public abstract static class AntPlusFitnessEquipmentPcc.CalculatedTrainerSpeedReceiver extends Object
Receiver for the CalculatedTrainerSpeed event, which is: The average speed between two received messages calculated from the best available data from the trainer. Recommended method. This data can only be sent by torque trainers.
Since:
2.1.8
  • Constructor Details

    • CalculatedTrainerSpeedReceiver

      public CalculatedTrainerSpeedReceiver(BigDecimal wheelCircumference)
      Constructor to set the wheel circumference used to calculate the speed
      Parameters:
      wheelCircumference - The wheel circumference in meters, used to calculate the speed
  • Method Details

    • onNewCalculatedTrainerSpeed

      public abstract void onNewCalculatedTrainerSpeed(long estTimestamp, EnumSet<EventFlag> eventFlags, AntPlusFitnessEquipmentPcc.TrainerDataSource dataSource, BigDecimal calculatedSpeed)
      Receives the data from a CalculatedWheelSpeed event.
      Parameters:
      estTimestamp - The estimated timestamp of when this event was triggered. Useful for correlating multiple events and determining when data was sent for more accurate data records.
      eventFlags - Informational flags about the event.
      dataSource - The AntPlusFitnessEquipmentPcc.TrainerDataSource indicating which type of data was used for calculation or if this is a new starting average value. A new starting value could be indicated when starting the plugin, or if reception is lost for too long to guarantee accurate data. If using a new starting value to record data, please use this event as a new starting point in time.
      calculatedSpeed - The average speed calculated from sensor data. Units: km/h.