Re: Regarding Pressure sensors for atmospheric, station, and barometric pressures.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/2/2021 11:41, Guenter Roeck wrote:
Hi Bruce,

On Wed, Jun 2, 2021 at 11:14 AM Bruce Mitchell
<bruce.mitchell@xxxxxxxxxxxxxxxxxx> wrote:

Hello Guenter,

I've been asked to expand the To list to include you and hwmon.

In reference to:
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-iio

There is this section:

What:           /sys/bus/iio/devices/iio:deviceX/in_pressureY_raw
What:           /sys/bus/iio/devices/iio:deviceX/in_pressure_raw
KernelVersion:  3.8
Contact:        linux-iio@xxxxxxxxxxxxxxx
Description:
                 Raw pressure measurement from channel Y. Units after
                 application of scale and offset are kilopascal.

What:           /sys/bus/iio/devices/iio:deviceX/in_pressureY_input
What:           /sys/bus/iio/devices/iio:deviceX/in_pressure_input
KernelVersion:  3.8
Contact:        linux-iio@xxxxxxxxxxxxxxx
Description:
                 Scaled pressure measurement from channel Y, in kilopascal.

What:           /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_raw
KernelVersion:  3.14
Contact:        linux-iio@xxxxxxxxxxxxxxx
Description:
                 Raw humidity measurement of air. Units after application of
                 scale and offset are milli percent.

What:           /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_input
KernelVersion:  3.14
Contact:        linux-iio@xxxxxxxxxxxxxxx
Description:
                 Scaled humidity measurement in milli percent.

Nowhere do I find the unit kilopascal used in atmospheric pressure.
To stick with International System of Units and its Prefixes
https://en.wikipedia.org/wiki/International_System_of_Units#Prefixes

The standard unit for used in atmospheric pressure measurements or
readings is the hectopascal (hPa), in meteorology, for atmospheric
pressure, the modern equivalent of the traditional millibar.

What would it take to make this change to the standard for
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-iio ?


The short answer is "you don't". The ABI states that pressure is reported in
kilopascal, not in hectopascal. We can't change the ABI because existing
user space code depends on it. Changing it would be equivalent to changing
the ABI for, say, temperature from degrees C to degrees F, or Kelvin.

Quite frankly I don't see your problem. 1 kilopascal = 10 hectopascal. Take
the reported number and multiply by 10. What am I missing ?

Obviously I _am_ missing the entire discussion so far, so my response may
be  completely off track. If so, my apologies for the noise.

Thanks,
Guenter


Thank you Guenter, I don't have a problem scaling, as you suggest.
But if I don't ask I know I have a guaranteed NO. I feel it is better to ask now and know the answer and deal with it appropriately.

--
Bruce




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux