[Interest] Something funny. QAccelerometer

Thiago Macieira thiago.macieira at intel.com
Wed Dec 18 01:13:50 CET 2013


On terça-feira, 17 de dezembro de 2013 23:29:12, Guido Seifert wrote:
> Great idea. I knew someone in this list would have the perfect solution for
> my problem. :-D But seriously and out of pure curiosity, how is the
> availability of sensors detected by Qt? I am 90% sure that my desktop has
> neither an accelerometer nor an ambient light sensor.
> 
> By the way, the y and z reading of the accelerometer give me a value of 9.8.
> Does this mean me and my computer are in free fall?

Both of them?

At any point at rest, sqrt(x*x + y*y + z*z) should be 9.8 or 1.0000, depending 
on whether the sensor returns m/s^2 or gees. That means it's at rest.

If it that square root returns zero, the computer is in free fall.

It's counter-intuitive, but it's grounded on real physics.

A good analogy is to think of the accelerometer as a weight mass hooked up to 
an ideal spring. The amplitude of the accelerometer measurement is 
proportional to the spring length (remember your Physics class and Hooke's 
Law[1]). If you're at rest somewhere on Earth, you're in its gravitational 
field, so spring is oriented downwards and extended enough to balance the force 
of gravity. That's why the measurement is 9.8 m/s².

If you were on free fall, the ideal spring would have extension length 0. 
That's what it would read if you were in the International Space Station.

That means most accelerometer applications needs to compensate for the Earth's 
gravity. That also means they don't work in outer space or on other planets.

See: http://en.wikipedia.org/wiki/Einstein_equivalence_principle
[1] https://en.wikipedia.org/wiki/Hooke's_law

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20131217/4714d3c5/attachment.sig>


More information about the Interest mailing list