getCurrentSpeed method

double getCurrentSpeed(
  1. Position position
)

Estimates current speed from a position

Implementation

double getCurrentSpeed(geo.Position position) {
  return position.speedAccuracy > 0
    ? position.speed * 3.6 // Convert m/s to km/h
    : 0.0;
}