You can edit almost every page by Creating an account and confirming your email.

SFLOAT-Type Data Type

From EverybodyWiki Bios & Wiki




This data type is a floating point number type specified in the IEEE 11073-20601 standard and is a shortened version of the FLOAT-Type data type.[1] It is stored and interpreted differently compared to the often seen implemented floating point number according to the IEEE 754 standard. The SFLOAT-Type defined in standard IEEE 11073-20601 focuses on health informatics – personal health device communication and the category application profile – optimized exchange protocol.[2] Medical devices like glucose meters, blood pressure meters, blood oxygen saturation devices, etc. implement the optimized exchange protocol.[3] Mobile devices implement wireless communication via Bluetooth in order to secure the transport to gateways.[4]

Data Type

The Bluetooth SIG offers a public white paper which describes the SFLOAT-Type as a 16-bit value containing a 4-bit exponent to base 10, followed by a 12-bit mantissa.[1]

This graphic shows the 4-bit exponent and the 12-bit mantissa in the 16-bit SFLOAT-Type data type.

Special values

The Bluetooth SIG white paper also explains special values, which can be used for edge cases:[1]

Abbreviation Description Exponent Mantissa Hex Value Binary Value
NaN Not a Number 0 +(211-1) 0x07FF 0000 0111 1111 1111
NRes Not at this Resolution 0 -(211) 0x0800 0000 1000 0000 0000
+INFINITY 0 +(211-2) 0x07FE 0000 0111 1111 1110
-INFINITY 0 -(211-2) 0x0802 0000 1000 0000 0010
Reserved for future use 0 -(211-1) 0x0801 0000 1000 0000 0001

Examples

Imagine a blood pressure measurement of 114 mmHg (precision is 1 mmHg). The final value as SFLOAT-Type representation is 0x0072.[1]

In the binary representation below, the exponent can be seen as 0 (0x0) in the first 4 bits and the mantissa can be seen as 114 (0x072) in the following 12 bits.

This graphic shows the value of 114 as actual bit representation in the 16-bit SFLOAT-Type data type.

For another example we look at a blood glucose measurement of 0.00118 kg/l (precision is 0.00001 kg/l) which has a SFLOAT-Type representation of 0xB076. The code below shows how the value can be derived from its SFLOAT-Type representation.[5]

sfloat_value = 0xB076

mantissa = sfloat_value & 0x0FFF

if (mantissa >= 0x0800):
    mantissa = -((0x0FFF + 1) - mantissa)

exponent = sfloat_value >> 12

if (exponent >= 0x0008):
    exponent = -((0x000F + 1) - exponent)

magnitude = pow(10.0, exponent)

measurement = (mantissa * magnitude)
This graphic shows the value of 0.00118 as actual bit representation in the 16-bit SFLOAT-Type data type.

References

  1. 1.0 1.1 1.2 1.3 "Personal Health Devices Transcoding" (PDF). Medical Devices Working Group. Retrieved 14 June 2022.
  2. "IEEE Standards Association".
  3. https://www.bluetooth.com/wp-content/uploads/2019/03/HDP-Implementation_WP_V10.pdf [bare URL PDF]
  4. https://www.pchalliance.org/sites/pchalliance/files/Fundamentals_Medical-Grade_Data_Exchange_Dec2021.pdf [bare URL PDF]
  5. https://openconnectivity.org/specs/OCF_Resource_to_BLE_Mapping_Specification_v2.1.0.pdf [bare URL PDF]


This article "SFLOAT-Type Data Type" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:SFLOAT-Type Data Type. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.