Use Revo without Compass/Mag?
« on: March 04, 2019, 04:57:08 pm »
Do I have to use Compass/Magentometer with Librepilot on a fixed Wing?

I've build a Z84 using a Revo Mini and Mini GPS (Banggood). Internal mag shows an errorlevel of 45% and above, the Mini GPS has no mag. There are high currents next to the revo, and i can't move the FC any further from the battery-cable without placing it on the wing.

Can librepilot manage waypoints/RTH (INS13) without mag? Would like to use only gps position and direction, the WingWing will never stop in one place like a copter, so there should always be a reliable GPS-direction.

Is there a hidden flag to disable both mags (internal and aux)?




Re: Use Revo without Compass/Mag?
« Reply #1 on: March 04, 2019, 05:34:07 pm »
If you twisted and moved the high current wires away from the FC, really at all, I would guess that you would not get 45% mag error with motor off, but could get that much with motor on (with prop on).  I only mention this in the small chance that you have a bad mag calibration that should be fixed before continuing.  Is that 45% mag error with the motor/prop running or off?

Next has a few more AttiEstAlgos, in particular it can be set to use just 2D compass and then is not so sensitive to electrical current mag issues.  I have not used this.  Perhaps someone who has will come along and give usage and setup advice.

Wind can cause issues if you don't use the mag for direction.  You would think that just using GPS to see where your movement is going would work, but strong wind can affect that so much that you get a fly away.  For instance imagine the wind picking up for a few minutes so that you are actually flying backwards.  The code would think you are pointing the wrong way and would turn you around.

Re: Use Revo without Compass/Mag?
« Reply #2 on: March 11, 2019, 05:42:13 pm »
Wind should not be an issue: When your plane is turning the nose in the wind to follow its path, this should be no Problem: It is still on its way home. Turning could be detected by Gyro, a general heading could be calculated. But it seems that there is no Option to use INS13 without Magnetometer, so the Code of librepilot must be based on compass data. Thats ok with external Magnetometer. I'm sorry for my Z84, but it's too small for a decent  high current wiring.



Re: Use Revo without Compass/Mag?
« Reply #3 on: March 11, 2019, 07:05:36 pm »
FC knows what direction it should be moving from waypoints, RTB, etc.

FC needs to know what direction it is actually pointing too.  If needs to be 15 degrees more to the left, then it knows to do a shallow left turn.

Copter type aircraft can fly sideways or backwards, so you can't really use aircraft motion direction when you need aircraft pointing direction.  In some cases with airplanes, you _can_ use aircraft motion direction when you need aircraft pointing direction, but that assumes that the wind speed is small when compared to airplane speed.

If wind is from the north and airplane is pointing west and wind speed is the same as airplane speed, then the airplane motion direction will be southwest but it's pointing direction will be west.

If the wind is from the north and airplane needs to go north and is pointing north but wind speed is faster than airplane speed, then the airplane motion direction will be south.  If there is no compass and it just uses GPS bread crumb trail for direction, the FC will think it needs to rotate 180 degrees, and soon it will be pointing south and flying double speed down wind when it needs to constantly point north and increase throttle or wait for the wind gust to die down.

Adding an airspeed sensor and assuming that the wind is fairly constant, there is some math the FC could do to estimate the wind speed and direction, and thus estimate the true direction the airplane is pointing.  It does not do that.  There are several different ways to estimate airspeed and wind speed / direction using only GPS data.  Even without an airspeed sensor, if you know wind speed / direction some estimates can be made.  You could even enter the wind speed / direction as a constant before the flight.

There are other uses for knowing the wind speed and direction.  Automated landing into the wind, and estimating fuel / battery needed to get back to base with a head wind (automated warning or automated RTB) come to mind.

Re: Use Revo without Compass/Mag?
« Reply #4 on: March 11, 2019, 08:41:18 pm »
Will do another try on my internal mag. Finished thermal calibration (first time with success) and set Mag errorlevel and warninglevel to max (30%/15%). Looks like GPS fixed position faster than before and arming on INS13-Navigation is now possible.

Mag-errorlevel without Battery is now about 10% (+/- 3%), with battery connected and motor off it's about 5%. Will test the rest on next weekend. Hope my mag errorlevels are save.

I wan't to use Manual /Attitude /Rate on flightmodes first and then try RTB. Today there are high winds (7 Bft++) around Cologne, hope weather gets better.

Thank you for your explanation.