Package com.dsi.ant.plugins.antplus.pcc
Class AntPlusFitnessEquipmentPcc.CalculatedTrainerDistanceReceiver
java.lang.Object
com.dsi.ant.plugins.antplus.pcc.AntPlusFitnessEquipmentPcc.CalculatedTrainerDistanceReceiver
- Enclosing class:
- AntPlusFitnessEquipmentPcc
public abstract static class AntPlusFitnessEquipmentPcc.CalculatedTrainerDistanceReceiver
extends Object
Receiver for the CalculatedTrainerDistance event, which is:
The accumulated calculated distance traveled.
- Since:
- 2.1.8
-
Constructor Summary
ConstructorsConstructorDescriptionCalculatedTrainerDistanceReceiver
(BigDecimal wheelCircumference) Constructor to set the wheel circumference used to calculate the speed -
Method Summary
Modifier and TypeMethodDescriptionabstract void
onNewCalculatedTrainerDistance
(long estTimestamp, EnumSet<EventFlag> eventFlags, AntPlusFitnessEquipmentPcc.TrainerDataSource dataSource, BigDecimal calculatedDistance) Receives the data from a CalculatedTrainerDistance event.
-
Constructor Details
-
CalculatedTrainerDistanceReceiver
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
-
onNewCalculatedTrainerDistance
public abstract void onNewCalculatedTrainerDistance(long estTimestamp, EnumSet<EventFlag> eventFlags, AntPlusFitnessEquipmentPcc.TrainerDataSource dataSource, BigDecimal calculatedDistance) Receives the data from a CalculatedTrainerDistance 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
- TheAntPlusFitnessEquipmentPcc.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.calculatedDistance
- The accumulated distance calculated from sensor data. Units: m.
-