Closed alaendle closed 5 years ago
This is very redundant to be transmitted in every payload. And how to specifiy non-trivial calculations, like cartesian to polar coordinates? We couldn't agree on a fixed unit norm, so context>unit would be the custom indicator. The sender / receiver of the telegram should have an understanding of how to process this. If in doubt, they can use context>namespace as an additional clarification.
O.k. if unide assumes that sender/receiver shares a vision about the meaning of data the current draft allows a adequate representation of units. And thanks for noting the namespace - if needed this allows a reference to a semantic specification of the unit (e.g. http://data.nasa.gov/qudt/owl/unit#Centimeter) - however still sender/receiver need to agree on this (it's nothing the unide format supports natively; but I think it's also not the goal of unide to allow a complete semantic specification of its telegrams).
I really like the idea to be more specific about the measuring units and also the reference to https://tools.ietf.org/html/draft-ietf-core-senml-14#section-12.1, but I fear that to really have some a general semantic on measurements a simple string representation of units isn't enough.
For example in some context millimetres could be a a useful unit for some measurement; and it wouldn't make sense to convert to meters just for unide (also it wouldn't make sense to display the translated values in systems like Nexeed PPM). So we will face different units (mm, cm, m, inch) for the same measured without any connection.
So I believe that the protocol should expand it's unit representation at least by two optional fields.