lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250724162227.065d20a0@jic23-huawei>
Date: Thu, 24 Jul 2025 16:22:27 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: Gustavo Silva <gustavograzs@...il.com>, Alex Lanzano
 <lanzano.alex@...il.com>, David Lechner <dlechner@...libre.com>, Nuno
 Sá <nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>,
 linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org, Lothar Rubusch
 <l.rubusch@...il.com>
Subject: Re: [PATCH v4 3/3] iio: imu: bmi270: add support for motion events

On Wed, 16 Jul 2025 12:53:55 +0300
Andy Shevchenko <andriy.shevchenko@...el.com> wrote:

> On Tue, Jul 15, 2025 at 08:55:35PM -0300, Gustavo Silva wrote:
> > On Tue, Jul 15, 2025 at 10:49:25AM +0300, Andy Shevchenko wrote:  
> > > On Tue, Jul 15, 2025 at 10:37:22AM +0300, Andy Shevchenko wrote:  
> > > > On Fri, Jul 11, 2025 at 08:36:03PM -0300, Gustavo Silva wrote:  
> 
> ...
> 
> > > > > +/* 9.81 * 1000000 m/s^2 */
> > > > > +#define BMI270_G_MEGA_M_S_2				9810000  
> > > > 
> > > > I thought this is MICRO...  
> > > 
> > > Btw, what if we use the device on poles and on equator (or even on orbital
> > > station)? I'm wondering if this constant should be defined in units.h or
> > > even in uAPI that user space may add a correction if needed.
> > >   
> > I certainly hadn't thought about these scenarios.
> > FWIW, the accelerometer scale values also assume g = 9.81 m/s^2.
> > For example, 0.000598 = 2 * 9.81 / 32768  
> 
> Right, but this should be supplied to user space somehow. OTOH the measure error
> may be high enough (what is the precision of the measurements by the way?) that
> it will neglect the differences in the 'g' constant.
> 
> All the details are given in [1].
> 
> [1]: https://en.wikipedia.org/wiki/Gravity_of_Earth#:~:text=The%20precise%20strength%20of%20Earth's,/s2)%20by%20definition.
> 

These sensors don't measure relative to g.
That's annoying marketing which is why I held firm for m/s^2 for IIO :)
So what they measure for a given acceleration does not change depending
on where we are on earth. You should use a 'fixed' standard value for
conversion from marketing values in g to m/s^2..

Or maybe I'm missing something!

Jonathan
  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ