Go Down

Topic: [SOLVED] Obtaining Magnetic Declination (Read 3 times) previous topic - next topic

MarkT

Magnetic variation or declination is the difference between magnetic and true north at a particular place and time.  Magnetic deviation is the difference between the magnetic field in a particular situation compared to the background field, caused by magnetic objects near to the observer including man-made magnetic materials and magnetic rocks in the crust.
[ I won't respond to messages, use the forum please ]

robtillaart

Did you consider the option to use external storage for data like the cof file. (e.g. I2C EEPROM or SD CARD)

Advantage of the SD CARD is that you could log some readings too...
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Bob101


I suspect you mean magnetic deviation (difference between true and magnetic North)
declination is the angle the local magnetic field makes with the horizontal
(I theenk!)


Magnetic declination is the angle between magnetic north and true north. Magnetic deviation is the error introduced in a compass by local magnetic fields (eg... by nearby iron or electromagnets). I was, as I originally stated, interested in declination.


If the GPS can be oriented in line with the vehicle's axis and a magnetometer/compass (is there a vehicle?) then heading bearings can be used to calibrate the declination.  Assuming the compass has compensation for nearby iron masses...


The unit will be used on a vehicle although only when the vehicle is stationary. I suppose that the unit could detect when the vehicle is moving quickly in a straight line (using the GPS) then attempt to calibrate the compass. I hadn't really considered that. Quite a neat idea.

I have thought a bit more about this and I am starting to get cold feet. The project I am interested in is a vehicle mounted solar tracker that will be used in Europe and northern Africa to keep our leisure batteries topped up. Looking at the magnetic declination currently I see that from Agadir (western Morocco) to Istanbul (eastern Europe) and from Oslo (northern Europe) down to Nairobi (central Africa) the magnetic declination only varies from -8 deg to +4 deg. If we didn't correct for it at all our panel would be 8 degrees out in its positioning which would still provide very nearly cos(8 deg) = 0.990... of the energy falling on it.

On the other hand... it would be cool to just have an Arduino compatible magnetic declination library (especially something like a port of the NOAA library). In North America you have it a lot worse with declinations ranging from -14 deg to +18 deg, cos(18 deg) = 0.951... still not terrible actually but it would visually look like it was facing the wrong direction at nearly 20 degrees out!

Thanks so much for all these ideas and it does certainly look like creating such a library would be possible. I'm just not sure if I REALLY need it  :~.

Nantonos

I believe magnetic declination is indeed the correct term.

this article on the HMC5843 three axis magnetometer may be helpful, as it mentions adjusting for magnetic declination.

The Ardupilot community deal with this stuff, so I suggest looking at their (extensive) libraries. Indeed they have an AP_Declination library on their github.

Bob101

Nantonos, you gem.

The article you link to is a bit general and essentially tells you how to find out a single declination for where you are currently so that is not so helpful.

HOWEVER, the library you link to is based on this post (says so in the comments of the code). This guy has tried to do exactly what I was going to attempt. This didn't work so well so he wrote his own software that he can update using the NOAA tables. It looks like he has updated it since the last table was released so I should be good for the next 3 years. I am going to give this library a go.

Thank you so much!

Go Up