koenkooi / multiwii-firmware

Firmware - GitHub mirror of the official SVN multiwii project
https://github.com/multiwii/multiwii-firmware/wiki
13 stars 1 forks source link

Magnetic declination hardcoded to China #2

Closed koenkooi closed 10 years ago

koenkooi commented 10 years ago

The flexbot code sets the declination:

define MAG_DECLINATION -2.34f

According to http://magnetic-declination.com/ it should be 0.72f for where I live (Amersfoort, the Netherlands).

gromain commented 10 years ago

How do you think we should address this problem? Create several options and tell people to choose from them? Or maybe just set it at zero. What's the influence of this value?

Romain Bazile.

2014-04-18 8:28 GMT+02:00 Koen Kooi notifications@github.com:

The flexbot code sets the declination:

define MAG_DECLINATION -2.34f

According to http://magnetic-declination.com/ it should be 0.72f for where I live (Amersfoort, the Netherlands).

— Reply to this email directly or view it on GitHubhttps://github.com/koenkooi/multiwii-firmware/issues/2 .

koenkooi commented 10 years ago

It's used to correct the heading:

IMU.cpp:279:    att.heading += conf.mag_declination; // Set from GUI

Looking at the code it should be possible to set it in the GUI as well, it will be stored in the on-chip EEPROM. So I guess we should set it at zero and tell people to update it in the GUI.

gromain commented 10 years ago

Agreed with that. Would be the most universal way to do it!

Romain Bazile.

2014-04-18 16:53 GMT+02:00 Koen Kooi notifications@github.com:

It's used to correct the heading:

IMU.cpp:279: att.heading += conf.mag_declination; // Set from GUI

Looking at the code it should be possible to set it in the GUI as well, it will be stored in the on-chip EEPROM. So I guess we should set it at zero and tell people to update it in the GUI.

— Reply to this email directly or view it on GitHubhttps://github.com/koenkooi/multiwii-firmware/issues/2#issuecomment-40814432 .