12

I'm trying to find out how could I start to implement sensor fusion on the iPhone. I've started from this talk from David Sachs:

Sensor Fusion on Android Devices

Although David's talk is very illustrative, it doesn't show any code (it makes sense). I've seen both the GLGravity (to extract the gravity vector) and the AccelerometerGraph examples, but I need some help or at least guidance on how to combine the accelerometer, gyroscope and compass inputs so that the result is similar to what David shows.

Thanks

Ruben Marin
  • 1,639
  • 14
  • 24

1 Answers1

20

UPDATE: As of May 19, 2015, there is no point in implementing sensor fusion yourself on mobile devices: Both Android (SensorManager under Sensor.TYPE_ROTATION_VECTOR) and iPhone (Core Motion under CMAttitude) offers its own.



(The original answer from May 5, 2011)

I have implemented sensor fusion for Shimmer 2 devices based on this manuscript. I highly recommend it.

Sensor fusion is often achieved by Kalman Filter.

However, there is no such thing as "Kalman Filter for programmers". Kalman filter is difficult to understand. You won't be able to implement and use it correctly if you do not understand it. Just use the above manuscript.

Ali
  • 56,466
  • 29
  • 168
  • 265
  • Your last link is broken. – Michael May 19 '15 at 11:43
  • @confile Thanks for the notice. It is not broken: That question was unfortunately deleted. However, you can still read it if you have enough reputation. Anyway, thanks, I will revise my answer so that it does not contain links that are not accessible to everyone. – Ali May 19 '15 at 11:57
  • Could you please link some code where Kalman Filter was done in iOS? – Michael May 19 '15 at 12:02
  • @confile I just did, hope this helps. – Ali May 19 '15 at 12:18
  • Are these libraries suitable for sensor fusion of other kinds of data, like RSSI or audio loudness? – Petrus Theron Aug 28 '18 at 01:14
  • 1
    @PetrusTheron No, unfortunately not out of the box. You would have to then implement it yourself, sorry. – Ali Aug 28 '18 at 06:49