ecolban / Compass

A simple compass Android application
1 stars 0 forks source link

Could you tell me why calculate azimuth using this formula? #1

Open beartung opened 10 years ago

beartung commented 10 years ago

azimuth = 0.8F * azimuth + 0.2F * azimuthPrime;

Why? Thanks a lot.

ecolban commented 10 years ago

Exponential averaging. Keeps the compass needle more stable and let's it slowly move towards the correct position. The sum of the weights should be 1. The smaller the weight of azimuthPrime, the slower the needle will drift to its new position. You can play with these weighs and see what gives the best results.

-------- Original Message -------- Subject: [Compass] Could you tell me why calculate azimuth using this formula? (#1) From: "Bear Dong" notifications@github.com Date: Thu, March 20, 2014 2:08 am To: "ecolban/Compass" Compass@noreply.github.com

azimuth = 0.8F * azimuth + 0.2F * azimuthPrime;

Why? Thanks a lot.


Reply to this email directly or view it on GitHub: https://github.com/ecolban/Compass/issues/1

beartung commented 10 years ago

Thanks. Have you ever try the Kalman Filter?