helium / cargo-elixir

Apache License 2.0
15 stars 6 forks source link

Change speed to km/h or m/s #36

Open jpmeijers opened 2 years ago

jpmeijers commented 2 years ago

Currently the Cargo integration requires data in a mix of SI/Metric and Imperial units. Because Helium is being used across the globe, and not only in the US, it would make more sense to use SI units.

The only field that is currently not in SI units is speed.

Changing the expected unit of the speed field would result in a lot of incorrect data being ingested. We therefore need a migration plan. I suggest something like this:

  1. Add new optional fields speed_ms, speed_kph, speed_mph, speed_knots for metre per second, kilometres per hour, miles per hour and knots (as reported in NMEA) respectively.
  2. Stop ingesting the speed field.
  3. (optional) After a couple of months re-enable speed and interpret it as km/h.