opensensorhub / osh-core

OpenSensorHub Core Modules
http://docs.opensensorhub.org
Mozilla Public License 2.0
32 stars 16 forks source link

Correctly round quantity values stored as integers when serializing #209

Closed alexrobin closed 2 years ago

alexrobin commented 2 years ago

The internal data type of a Quantity field can be set to an integer type: byte, short, int or long.

Although it is already taken into account when encoding as binary, the value should also be serialized as an integer value in JSON or CSV (i.e the value should be rounded to remove the decimal point and anything after, which should normally be .0).

alexrobin commented 2 years ago

Won't fix, we can leave the decimal point if field is a decimal quantity