nmfta-repo / nmfta-opentelematics-api

API Blueprint for Open Telematics API
Apache License 2.0
14 stars 6 forks source link

Log Events and unit conversion Notes #127

Closed BenGardiner closed 5 years ago

BenGardiner commented 5 years ago

OTAPI is specified to use SI units; however, the Log Events coming from ELDs in the US will presumably have units of miles, and hence the check value that also originated from the device will be calculated based on the values in miles, not as-converted to (SI) meters.

A simple solution is to add this caveat to the notes on the need to process to the Log Events to create reports for compliance.

A more involved solution is to add a units field to Log Events so that the check value can be unaltered from the device.

jeremy-daily commented 5 years ago

SAE J1939 uses SI (meters, km/h) etc. The J1587 standard originally used US units, but transitioned to SI in the most recent version (i.e. converted the US units to SI). So, it it safe to be consistent with SI for this project as most US rendering engines make the conversions from SI already.

BenGardiner commented 5 years ago

SAE J1939 uses SI (meters, km/h) etc. The J1587 standard originally used US units, but transitioned to SI in the most recent version (i.e. converted the US units to SI). So, it it safe to be consistent with SI for this project as most US rendering engines make the conversions from SI already.

Thank you, @jeremy-daily . I think this confirms the approach and I trust that the statements in the localization section are sufficient.

https://previewotapi.docs.apiary.io/#introduction/localization and https://github.com/nmfta-repo/nmfta-opentelematics-api/blob/0948fda2bfe0fa32ca84e1dcb06e3d395a7f866c/apiary.apib#L359