north "magnetic inclination" help
« on: October 22, 2019, 09:00:04 pm »
good afternoon everyone.
I have a little doubt, where I put
the north "magnetic inclination". thanks

Re: north "magnetic inclination" help
« Reply #1 on: October 22, 2019, 09:48:07 pm »
That is not a part of setup.

Generally an external "aux mag" is used in order to get the mag sensor as far away from magnets and high current wiring (current produces magnetic fields) as possible.  Also, twisting together high current wire pairs (also three wire motor cables) is important because it reduces electro magnetic fields.

If the mag (magnetometer) (usually built into the GPS) is mounted correctly and normally (arrow pointing forward), then everything is done for you when you "Set Home Location".  For instance, you will see it fill in the local magnetic field strength (Be) and gravity strength (Ge) when you set Home Location.

Re: north "magnetic inclination" help
« Reply #2 on: October 23, 2019, 09:57:39 am »
thanks
I was asking this because in the Flight Data Tab
I have a lot of oscillations and I've done all the calibrations this only happens in INS13 - GPS Navigation mode. i have a auxiliar gps and magnetometer.

Re: north "magnetic inclination" help
« Reply #3 on: October 25, 2019, 07:59:47 am »
INS13 attitude oscillations (visible in GCS) when the aircraft is sitting still on the ground is usually caused by either incorrect mag configuration, by a bad mag calibration, or by misaligned aux mag (GPS / aux mag mounted in the wrong direction).  Some GPS/mag units (DJI in particular) have the cable coming out of the FRONT of the GPS since they assume you will mount the GPS on the rear of the aircraft (not required).  Look for the arrow on the GPS to tell you which direction is forward.

If you have an aux mag, you should set the mag source ("Usage") to be "AuxOnly".  If you have an I2C aux mag then you MUST set Attitude->Magnetometer->AuxMagOrientation to 0,180,0 or 180,0,180 (these actually represent the same rotation).

Small magnets, like in hatch covers and in Lipo alarms are a problem, but I am guessing that is not your current problem.  You can determine how close your magnets can be by leaving the mag sensor stationary and moving the magnet in question around at various distances from the mag sensor, while watching System->DataObjects->MagSensor/AuxMagSensor (or set up a Scope on the Scope page).  If you can see the effect of the magnet in the numbers, then the magnet is probably too close.

When doing mag calibration, be aware that:
- you should use flight battery power, aux mags require it
- once calibration is started, it is always gathering data, not just when you press the button 6 times
- during calibration, you should never set it on the ground or on a car or even have it close to anything metal
- if using the OnBoard mag sensor, when doing mag calibration you really should use a telemetry connection from aircraft to GCS, not USB cable

There are new AttiEstAlgo's in "next" version that can help with some mag issues, but I haven't used them.  In particular, some of the new ones only use the mag as if it were 2D, so they only get compass heading from it.  INS13 uses the full 3D capability of the mag, so it gets some "which direction is up" information from it too, but that causes more problems if your mag is not aligned well or if there are mag fields in the area (magnets or high current (flight motor power) electrical wires).  The aux mag wiki article describes a way of trimming so that switching from INS13 to other AttiEstAlgo modes doesn't cause a change in hover drift.

Here is an aux mag wiki article that you may find helpful:
https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/18382863/Aux+Mag+Setup+and+Calibration
« Last Edit: October 25, 2019, 08:41:46 am by TheOtherCliff »

Re: north "magnetic inclination" help
« Reply #4 on: October 25, 2019, 07:08:08 pm »
thanks for the clarification.
I have DJI's aux mag and gps and have the arrow pointing to the drone nose, with AuxOnly selected and AuxMagOrientation 0.0,0
Maybe I didn't do the mag calibration well.
I will install librepilot next and do all the calibrations as you mentioned, then I leave feedback on how it went.

Re: north "magnetic inclination" help
« Reply #5 on: October 25, 2019, 08:16:13 pm »
I have DJI's aux mag and gps and have the arrow pointing to the drone nose...

As I recall, every authentic DJI GPS (white) I have seen has the cable coming out of the front of the GPS and every clone DJI GPS (black) has the cable coming out the back of the GPS.  Sometimes the arrow is a wedge or airplane or triangle...

The wiki article I linked to has a section titled "Set and verify AuxMagSettings.BoardRotation".  It is a way to look at the sensor numbers and see whether you have the GPS mounted correctly.  If you are in Europe, then your compass "magnetic declination (dip)" (not inclination, which is a different thing) is around 60 degrees down, so magnetic field north is "north and about 60 degrees down".  This direction accuracy is not critical, it is just for doing a sanity check.  :)  The article links to a map where you can look up your declination if you are not in Europe or USA mainland which both are around 60 degrees down.

- If you look at System->DataObjects->AuxMagSensor and point the nose of your aircraft "north and about 60 degrees down", you should find that X is the largest positive number of x,y,z (say about +400).
- Point the tail there and X is the most negative number (say about -400).
- Point the right side there and Y is the most positive.
- Point the left side there and Y is the most negative.
- Point the bottom side there and Z is the most positive.
- Point the top side there and Z is the most negative.

Oh yea, by default, the aux mag sensor numbers only update every 10 seconds so you will need to hold it there for 10 seconds or read the wiki article for changing the update time to say 1 second.
« Last Edit: October 25, 2019, 08:38:04 pm by TheOtherCliff »