Re: [core] [Last-Call] Last Call: <draft-ietf-core-senml-more-units-02.txt> (Additional Units for SenML) to Proposed Standard

Hytonen Harri <harri.hytonen@vaisala.com> Thu, 31 October 2019 11:53 UTC

Return-Path: <harri.hytonen@vaisala.com>
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 B8EA8120125 for <core@ietfa.amsl.com>; Thu, 31 Oct 2019 04:53:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=vaisala.com
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 F1v9YWtoxCJY for <core@ietfa.amsl.com>; Thu, 31 Oct 2019 04:53:11 -0700 (PDT)
Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70088.outbound.protection.outlook.com [40.107.7.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 43A9D12001E for <core@ietf.org>; Thu, 31 Oct 2019 04:53:10 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iINzTMIgYGcNnefkn4hnWdYTwGw4oezSVpZ7Chc4/bfWtN/M8b+sV7JSkyk3c8CEjiMRFkb3s2q3+y6irh1ty/EY3jmBW7xOkN+omr8x6DFPWhs5mu66mRC6Fqf+nbwcAEtIwFmimgRPUE+KM4GuedRt0HsGMFG71u1dvMwCUl1P1cRzNlEjBvLswvr4Qb61Z9c+jlNF2nSx0kBkPfj0ub/opMTq+/jrbuQUxfCU/F3vsvKMo+Ut+9OZQM4t6ulStOl7965xmfh0eKp9UPK1Zi7j8g4UwkZALwR6f9DnxRf0CSAgKyvQtMPm1VmKCLSD26ViwKJnMZl5pWvsKV7Tkw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yM5s8SDB8wajrJEUw0Nc2021QfVcBsO2F+SeCh5ZRwg=; b=SXZ91T82GN7ZGhNKdM/JICYYIZ9RU3dN7MFxbPahnxQzlJVD3iZFOMmSDpeFEhDZH36h9uTGx3SRvWccAyNaPivDC/wRL+u460tsCviWalsSeLuB43F6QtQgxzXbmx8n1YdK/PQLTrlQpDZ5Z4dwFR+4qqsx+p4TmVgIV2ebmsbciGD6cJlCiwtmzxeiu1T6ERKu0R7aD72N5GW2M1XjVCKygoDK8W1xGoXWaOPLOwW3OIxy5p21N0x9Tl2mCT8jgW8Cm3gQPwaxvtWn1oylNHIQH7sdkooCPyRltS87BG80b870nhX+KfEnnosf4D/VJcjapcKywaQUUFMATWVKPA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vaisala.com; dmarc=pass action=none header.from=vaisala.com; dkim=pass header.d=vaisala.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vaisala.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yM5s8SDB8wajrJEUw0Nc2021QfVcBsO2F+SeCh5ZRwg=; b=HKYcpGpzH1C3D4EiyEb/C9byi5Jd+wJljinooT906AXcJ+rNUmlZIbgzgp40cWspV0l9z09Psj189Xh2LhtDBSMr8FyefzS7AVx3DeQ2lfjf5p02dbov0MP9W0/fyGHzBj7FVfR6s+FYfFVkjX+3VwRcx5QoJ4/juGp1Mrvwqfc=
Received: from AM6PR0602MB3368.eurprd06.prod.outlook.com (52.133.21.32) by AM6PR0602MB3397.eurprd06.prod.outlook.com (52.133.21.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.23; Thu, 31 Oct 2019 11:53:08 +0000
Received: from AM6PR0602MB3368.eurprd06.prod.outlook.com ([fe80::444d:89d:bcc3:5b43]) by AM6PR0602MB3368.eurprd06.prod.outlook.com ([fe80::444d:89d:bcc3:5b43%5]) with mapi id 15.20.2387.027; Thu, 31 Oct 2019 11:53:08 +0000
From: Hytonen Harri <harri.hytonen@vaisala.com>
To: Carsten Bormann <cabo@tzi.org>
CC: core <core@ietf.org>
Thread-Topic: [Last-Call] [core] Last Call: <draft-ietf-core-senml-more-units-02.txt> (Additional Units for SenML) to Proposed Standard
Thread-Index: AQHViOHXkVdlTYBBz02/tc3V+yb/N6dmutYAgACA54CACQfegIAANvyAgAAC9QCAAUDdgIAAXyIAgAE79gCAAQgX4IAAGTuAgAAZ3lA=
Date: Thu, 31 Oct 2019 11:53:07 +0000
Message-ID: <AM6PR0602MB3368A63F23DEE1CD0E03305BF5630@AM6PR0602MB3368.eurprd06.prod.outlook.com>
References: <41C0F8EE-6A11-4B07-BA18-7DE106F03183@episteme.net> <CEE49F5A-E7FE-4933-BF68-E1A2EA8CEC62@ericsson.com> <DF78FB17-0DDA-471E-A28A-15AC0718F653@iii.ca> <AM6PR0602MB3368610C8BAD09D5E938C2BEF5630@AM6PR0602MB3368.eurprd06.prod.outlook.com> <99D083F4-ED5F-4822-A517-142EC10A5349@tzi.org>
In-Reply-To: <99D083F4-ED5F-4822-A517-142EC10A5349@tzi.org>
Accept-Language: fi-FI, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_d5842b46-9b7a-431a-b662-8cc44ff92a4e_Enabled=True; MSIP_Label_d5842b46-9b7a-431a-b662-8cc44ff92a4e_SiteId=6d7393e0-41f5-4c2e-9b12-4c2be5da5c57; MSIP_Label_d5842b46-9b7a-431a-b662-8cc44ff92a4e_Owner=harri.hytonen@vaisala.com; MSIP_Label_d5842b46-9b7a-431a-b662-8cc44ff92a4e_SetDate=2019-10-31T11:53:06.4447624Z; MSIP_Label_d5842b46-9b7a-431a-b662-8cc44ff92a4e_Name=Restricted; MSIP_Label_d5842b46-9b7a-431a-b662-8cc44ff92a4e_Application=Microsoft Azure Information Protection; MSIP_Label_d5842b46-9b7a-431a-b662-8cc44ff92a4e_ActionId=0b9414d0-ec7e-475f-8b6c-88b938d7d8c3; MSIP_Label_d5842b46-9b7a-431a-b662-8cc44ff92a4e_Extended_MSFT_Method=Automatic; MSIP_Label_7246d30e-a6af-4059-9b44-a42233242e28_Enabled=True; MSIP_Label_7246d30e-a6af-4059-9b44-a42233242e28_SiteId=6d7393e0-41f5-4c2e-9b12-4c2be5da5c57; MSIP_Label_7246d30e-a6af-4059-9b44-a42233242e28_Owner=harri.hytonen@vaisala.com; MSIP_Label_7246d30e-a6af-4059-9b44-a42233242e28_SetDate=2019-10-31T11:53:06.4447624Z; MSIP_Label_7246d30e-a6af-4059-9b44-a42233242e28_Name=No Label; MSIP_Label_7246d30e-a6af-4059-9b44-a42233242e28_Application=Microsoft Azure Information Protection; MSIP_Label_7246d30e-a6af-4059-9b44-a42233242e28_ActionId=0b9414d0-ec7e-475f-8b6c-88b938d7d8c3; MSIP_Label_7246d30e-a6af-4059-9b44-a42233242e28_Parent=d5842b46-9b7a-431a-b662-8cc44ff92a4e; MSIP_Label_7246d30e-a6af-4059-9b44-a42233242e28_Extended_MSFT_Method=Automatic
authentication-results: spf=none (sender IP is ) smtp.mailfrom=harri.hytonen@vaisala.com;
x-originating-ip: [193.143.230.131]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 24c7bd8a-501f-49cc-2381-08d75df8e5ac
x-ms-traffictypediagnostic: AM6PR0602MB3397:
x-ms-exchange-purlcount: 1
x-microsoft-antispam-prvs: <AM6PR0602MB339735182C99CB883A78A003F5630@AM6PR0602MB3397.eurprd06.prod.outlook.com>
x-tenant-id: 6d7393e0-41f5-4c2e-9b12-4c2be5da5c57
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 02070414A1
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(396003)(366004)(136003)(346002)(39850400004)(13464003)(199004)(189003)(9686003)(7736002)(25786009)(76116006)(99286004)(478600001)(66446008)(66946007)(486006)(64756008)(66476007)(66556008)(55016002)(316002)(26005)(8936002)(81156014)(33656002)(86362001)(81166006)(6306002)(7696005)(6436002)(102836004)(8676002)(53546011)(6506007)(76176011)(71190400001)(71200400001)(186003)(4326008)(2906002)(5660300002)(446003)(11346002)(3846002)(74316002)(6916009)(229853002)(6246003)(52536014)(14454004)(476003)(305945005)(966005)(14444005)(256004)(66066001)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR0602MB3397; H:AM6PR0602MB3368.eurprd06.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: vaisala.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 0ccnsRaCYsJlUCGDlRFI+9w3nJoM4wAg0HZTaV05UG/Uie588sS/j6k2JVEUioonF1iV0mev4QtL8la0I52O2A7BoOw4QepyCK23264hPxbujaNVck1mEr41SA6+O0vVmsg4UWM6OfLKIGurCYM0mYGw1+2wijBV+dBw+2h0RJQIUhahXFwv2ZoGkvEBENIMFpLBT79xuCFYuG0ewpmKYYqKNn1C5Dyigc7QU19N5A5igjp79X6dAd83u0CK1JPOEgRiYt2OQbjUJI+dPR+Q7PPIUztUy2CrS8/EFpCd5VhZaFgD83iIfqbbY5Ngs72W6Ii2sCEXlSWdTqLoo/uAc+eZEpl+sa4mZGr0q/zq90YKQJlLJLFBJSYH6D4Vk7T4NUnyHq9E9mLv0YE1KF5xtrUD62/jRrQTY/7octmRPwneqXm6SZl/DxGukvE/Ib+CcXDqvxsiZpNPLKfb09YhIrP0Qq5lNWZK9mQCnWRI6y8=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: vaisala.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 24c7bd8a-501f-49cc-2381-08d75df8e5ac
X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Oct 2019 11:53:08.0921 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 6d7393e0-41f5-4c2e-9b12-4c2be5da5c57
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: r03Qfo4xj89xLbpHWsiQxfwpXZJ7Q6J1gulgwYGVr2i/1B75DIoxEF5Uaw9JGXNCk6frNPGJ/o3NXH11CAdiPSK4IddQnLL8V+eSPrzbdnM=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0602MB3397
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/i146kiO7pV2P3L80hzbjx5OrxOc>
Subject: Re: [core] [Last-Call] Last Call: <draft-ietf-core-senml-more-units-02.txt> (Additional Units for SenML) to Proposed Standard
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: Thu, 31 Oct 2019 11:53:15 -0000

Hi Carsten,

Integer value measurements using unit "something per hour" needs to be converted into floating point and scaled to "something per second". The receiver of the measurement then receives a floating point, scales it back to "something per hour" and presents it as a floating point value since it has no information that the original value was an integer, unless that information was passed in meta data. Also, if the transmission bandwidth is constrained, integer would be less costly.

BR,
Harri     
 

-----Original Message-----
From: Carsten Bormann <cabo@tzi.org> 
Sent: Thursday, 31 October, 2019 10:37
To: Hytonen Harri <harri.hytonen@vaisala.com>
Cc: core <core@ietf.org>
Subject: Re: [Last-Call] [core] Last Call: <draft-ietf-core-senml-more-units-02.txt> (Additional Units for SenML) to Proposed Standard

(Limiting CC list to CoRE WG:)

> On Oct 31, 2019, at 08:17, Hytonen Harri <harri.hytonen@vaisala.com> wrote:
> 
> As explained before, it's not matter of saving floating point calculations, but preserving the original precision of the measurement. 

I think this is an interesting statement.
This certainly was not the reason why we were going for the secondary units (as Ari said, these are about support for legacy data models).
But I’m still curious how, say, expressing precipitation in mm/h is preserving the precision better than expressing it in m/s after scaling it by 3.6e6.  Sure, that floating point calculation has a rounding error, but that will usually be on the order of 1/2**24 (or 1/2**53 if your sensor has double precision floating point), while the instrument resolution is likely on the order of 1/2**10 or 1/2**12 (as you can see, I know nothing about precipitation sensors).

Note that formats such as CBOR or JSON cannot *indicate* precision or accuracy (or uncertainty in general) within a single number; there is no way to say what conventionally is written down as 8.0 vs. 8.000 (even in JSON, where both forms can be written, these have exactly the same semantics).  So that would be a separate issue (easily addressed by putting information about the uncertainty into separate numbers, often in the metadata as it often doesn’t change between measurements).

Note also that the terminology here often requires clarification or explicit referencing; e.g., IEEE 754 uses “precision” essentially for “resolution”, not for “precision” as used in metrology(*) (which is essentially “repeatability” and “reproducibility” in the VIM [1]).

Grüße, Carsten

[1]: https://www.bipm.org/utils/common/documents/jcgm/JCGM_200_2008.pdf
“International vocabulary of metrology — Basic and general concepts and associated terms (VIM)”

(*) applying metrology to meteorology sensors :-)