Package com.dsi.ant.plugins.antplus.pcc
Class AntPlusBikeSpeedDistancePcc.CalculatedSpeedReceiver
java.lang.Object
com.dsi.ant.plugins.antplus.pcc.AntPlusBikeSpeedDistancePcc.CalculatedSpeedReceiver
- Enclosing class:
- AntPlusBikeSpeedDistancePcc
Receiver for the CalculatedSpeed event, which is:
The speed calculated from the raw values in the sensor broadcast.
-
Constructor Summary
ConstructorsConstructorDescriptionCalculatedSpeedReceiver
(BigDecimal wheelCircumference) Constructor to set the wheel circumference used to calculate the speed -
Method Summary
Modifier and TypeMethodDescriptionabstract void
onNewCalculatedSpeed
(long estTimestamp, EnumSet<EventFlag> eventFlags, BigDecimal calculatedSpeed) Receives the data from a CalculatedSpeed event.
-
Constructor Details
-
CalculatedSpeedReceiver
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
-
onNewCalculatedSpeed
public abstract void onNewCalculatedSpeed(long estTimestamp, EnumSet<EventFlag> eventFlags, BigDecimal calculatedSpeed) Receives the data from a CalculatedSpeed 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.calculatedSpeed
- The speed calculated from the raw values in the sensor broadcast, based on this classes' set wheel circumference passed to the constructor. Units: m/s.
-