Re: [core] Proposed new SenML Units

Carsten Bormann <cabo@tzi.org> Mon, 09 November 2020 15:13 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 30D123A1118 for <core@ietfa.amsl.com>; Mon, 9 Nov 2020 07:13:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08CIIlHwHjxP for <core@ietfa.amsl.com>; Mon, 9 Nov 2020 07:13:00 -0800 (PST)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A02D73A1116 for <core@ietf.org>; Mon, 9 Nov 2020 07:13:00 -0800 (PST)
Received: from client-pool2-341.vpn.uni-bremen.de (client-pool2-341.vpn.uni-bremen.de [134.102.49.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4CVDyL3DWjzyV4; Mon, 9 Nov 2020 16:12:58 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <20201109144145.nzp2oqiam7bdlqed@EMB-918HFH01>
Date: Mon, 09 Nov 2020 16:12:58 +0100
Cc: CoRE WG <core@ietf.org>
X-Mao-Original-Outgoing-Id: 626627577.9350311-8b1cef00544d01342c5497f4efc248e9
Content-Transfer-Encoding: quoted-printable
Message-Id: <C164824A-C22E-4132-A240-C52D4D4B465B@tzi.org>
References: <20201109144145.nzp2oqiam7bdlqed@EMB-918HFH01>
To: Jaime Jiménez <jaime@iki.fi>
X-Mailer: Apple Mail (2.3608.120.23.2.4)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/OdcrZdRpEHwmdXoURiAM3J02mX8>
Subject: Re: [core] Proposed new SenML Units
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 09 Nov 2020 15:13:04 -0000

Hi Jaime,

> On 2020-11-09, at 15:41, Jaime Jiménez <jaime@iki.fi> wrote:
> 
> 
> Dear CoRE and SeNML experts,
> 
> the IPSO WG has some new objects being registered that contain units
> that are not currently present in the IANA SenML registry (
> https://www.iana.org/assignments/senml/senml.xhtml ) nor derived
> from it. We would like to discuss the addition of the units below:
> 
> +===========+================================+=======+
> | Symbol    | Description                    | Type  |
> +===========+================================+=======+
> | NTU       | Nephelometric Turbidity Unit   | Float |
> +-----------+--------------------------------+-------+
> | mg/l      | milligrams per liter           | Float |
> +-----------+--------------------------------+-------+


> NTU is the most common way to measure turbidity.

This one is interesting.  There are several Turbidity units, which are not in a simple linear relationship, so I would like to get some input from domain experts which ones we should have (and which are more of a historical interest).

> mg/l is used to measure
> concentration, possibly g/l should also be added as shown in the table
> below. 

We already have    
kg/m3    kilogram per cubic meter (mass density, mass concentration) float [RFC8798]

One mg/l is 1/1000 kg/m3, so that would go into table 2.


> On the secondary units table we would have the units below. 
> +=========+======================+======+==========+======+
> |Secondary| Description          |SenML |   Scale  |Offset| | Unit    |                      |Unit  |          |      |
> +=========+======================+======+==========+======+
> | ppb     | parts per billion    | /    |   1e-9   |    0 |
> +---------+----------------------+------+----------+------+
> | ppt     | parts per trillion   | /    |   1e-12  |    0 |
> +---------+----------------------+------+----------+------+
> | KB      | Kilobytes            | B    |    1000  |    0 |
> +---------+----------------------+------+----------+------+
> | VAh     | Volt Ampere x Hour   | kVAh |   1/1000 |    0 |
> +---------+----------------------+------+----------+------+
> | g/l     | grams per liter      | mg/l |     1000 |    0 |
> +---------+----------------------+------+----------+------+

VAh should be on the SI base unit, i.e.:

   VAh           volt-ampere-hour      VAs        3600   0

g/l is a synonym for kg/m3 (i.e. scale=1); that is not strictly needed but could be added if the g/l people can’t adjust to kg/m3.

> As to the KB addition, the reason is that many are still confused as to
> whether KB is 1000 or 1024 bytes.

KB = Kelvin-Byte, pretty much nonsensical.
kB is 1000 B, which is not very widely used.
KiB is 1024 B, which we already have.

> If we are taking KB as 1000 bytes,

KB is like kph, it’s not properly defined and should not be added.

> then having an entry in the table would be a good clarification to avoid
> ambiguity.
> 
> ppt could be confused with parts per thousand by some, so I would like
> to clarify in this email that "parts per thousand" would be the "/1000"
> or "permille" entry in the secondary units registry. Please confirm this
> as well. 

Yes.
So, after adding ppb and ppt, we’ll have
/  /100  /1000  ppm   ppb   ppt
1  0.01  1e-3   1e-6  1e-9  1e-12

> I believe the scale of ppb and ppt is correct, please double check just
> in case. 

Yes.

Grüße, Carsten