Multiwii 2.3 Dev - GPS Hold...

This forum is dedicated to all issues and questions related to your individual setups and configurations
Post Reply
User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Multiwii 2.3 Dev - GPS Hold...

Post by Leo »

Everyone,

yesterday I flipped the switch to have the quad go into GPS-Hold for the first time ever. It worked right off the bat! The quad was literally frozen in the sky :)

So I had to try it again today. Same procedure... flipped the switch and for some reason the quad immediately drifted to the left.
I tried it once more with the same result.

Now here is what I don't get....

For the sake of understanding lets use North South East and West for reference.
On the first 2 tries the quad was pointing north and drifted off to the left.
I then started the quad pointing to the east and when I turned on GPS-Hold it drifted left again.
I figured the only other thing I could try out was to duplicate what I had done yesterday.
So I had the quad point to the south (same as yesterday) and viola, GPS-Hold worked like a charm!

Is this constellation normal or have I missed something with my configuration?

Here are the settings I'm using when GPS-Hold is activated:
Image

MultiWii Firmware: MultiWii_dev_2014_01_14__r1648

Thanks,

Leo
Last edited by Leo on Wed Oct 08, 2014 7:20 pm, edited 2 times in total.

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: GPS Hold...

Post by e_lm_70 »

GPS hold require a good tuned GPS and properly MAG calibration .. plus you must have set your declination.

Stock PID for Position Hold are fine on MultiWii ... just be sure your GPS provide good coordinate without much noise

Often you may want to isolate GPS from the rest of the electronic .. putting a RF shield under the GPS

PS: I'm using Angle vs Horizon .. but it does not change much

User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Re: GPS Hold...

Post by Leo »

Thanks for your answers.

e_lm_70 wrote:GPS hold require a good tuned GPS and properly MAG calibration .. plus you must have set your declination.


12 Satellites should be sufficient. MAG calibration was preformed. My declination was set.

e_lm_70 wrote:Stock PID for Position Hold are fine on MultiWii ... just be sure your GPS provide good coordinate without much noise


I really don't think I have a GPS problem. BTW I'm running 5Hz @ 57600 baud.

e_lm_70 wrote:Often you may want to isolate GPS from the rest of the electronic .. putting a RF shield under the GPS


GPS is furthest away from the base:
Image

How could one see/measure GPS noise?

e_lm_70 wrote:PS: I'm using Angle vs Horizon .. but it does not change much


Is my setup correct?
Does MAG need to be set when using GPS Hold?

I'll do more testing and report back.

Leo

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: GPS Hold...

Post by e_lm_70 »

You configuration is correct .. MAG must be set for every GPS function, so you got it right .. BARO is optional .. but clearly it always make sense to have BARO in GPS mode too.

About GPS configuration ... Mr.Fiero in the Harakiri thread did show some working configuration for the NEO GPS

Anyhow ... don't expect miracles from MultiWii on GPS PH ... it is quite normal that is moving around a bit .. +/- 3 or 5 meters ... so when you test ... give it some time to see if it stay more or less in the same place.

MAG calibration is very tricky ... double check that it recognize north and south ... and if you rotate the copter on roll and pitch but not on yaw ... it should still point to the same heading ... I have often to repeat the MAG calibration ... the MultiWii calibration process for MAG is not the best ...

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: GPS Hold...

Post by copterrichie »

This may or may not be related but one thing that I have observed with all of my copters is, as soon as the copter become airborne, they will YAW to the Left about 10-20 degrees. I have learned to compensate by giving them some right-yaw on take-off but it has always puzzled me why they do this and this is with or without a compass enabled.

User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Re: GPS Hold...

Post by Leo »

e_lm_70 wrote:You configuration is correct .. MAG must be set for every GPS function, so you got it right .. BARO is optional .. but clearly it always make sense to have BARO in GPS mode too.

About GPS configuration ... Mr.Fiero in the Harakiri thread did show some working configuration for the NEO GPS

Anyhow ... don't expect miracles from MultiWii on GPS PH ... it is quite normal that is moving around a bit .. +/- 3 or 5 meters ... so when you test ... give it some time to see if it stay more or less in the same place.

MAG calibration is very tricky ... double check that it recognize north and south ... and if you rotate the copter on roll and pitch but not on yaw ... it should still point to the same heading ... I have often to repeat the MAG calibration ... the MultiWii calibration process for MAG is not the best ...


Thanks!

I did record most of the flights so I quickly put a video together showing how well IMHO my GPS hold works right off the bat. But again it would only work when pointing "south".

- At 14 sec I had my first attempt. Slight winds..... I was so thrilled I walked under the quad up to the camera to wave (signaling I was in GPS-hold mod and saying Hi) :)
- On the next day (also slight winds) I did the exact same thing except the quad was pointing "north". GPS-hold never worked correctly. In the video you can see on 6 October all attempts when pointing "south" were successful. However at 3:30 min I had it pointing east and it didn't work. I didn't include any further failed attempts pointing "north" in the video.
- By the way. At the end of the video I tried RTH and it seemed to work but I then chickened out. However next time I'll fly the quad further away for exclusive tests (and open an extra thread on the topic).

I general what do you think of GPS-hold in the my video? Anything you see where I can tweak out some improvements?



I'll do further more extensive tests with GPS-hold starting the quad from all different directions just to verify this isn't all a one-off.

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: GPS Hold...

Post by e_lm_70 »

Hard to say how good is GPS PH from onboard video , unless this is pointing vertically down.

MultiWii has not velocity, and acc fusion with the GPS data, so .. you can't expect extreme precision like DJI , or APM or Harakiri ... so ... what you get is not much less then what GPS can offer ... I'm on stock PID on this GPS PH

I like to combine PH with climb and rotating on the top

Like on this video



Accuracy is not perfect ... but good enough for my usage

This GPS is a MTK not a NEO ... that possibly for me did work better the my NEOs GPS

Here is another video with GPS PH: ... in this one I must have the MAG not well calibrated .. at some orientation it get a bit crazy

Same code, same PID ... but with a more lucky MAG calibration:

PS: Ignore the fact that is KK2 ... all my KK2 board do run MultiWii 2.3 now.

User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Re: GPS Hold...

Post by Leo »

Thanks for the videos. Very nice.

I'm surprised that ACC is not fused with any of the hold functions in MW 2.3. However with a bit more tweaking I should have good hold stability. I'm quiet happy with the results already :)

Leo

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: GPS Hold...

Post by e_lm_70 »

Leo wrote:Thanks for the videos. Very nice.

I'm surprised that ACC is not fused with any of the hold functions in MW 2.3. However with a bit more tweaking I should have good hold stability. I'm quiet happy with the results already :)

Leo


This ACC fusion limitation is not a big issue for me as well.

It does not impact at all RTH ... for PH for me as long it is +/- 4 meters it is fine ... as you have seen mainly I like to use this for automatic climbing and descending

I don't see any real usage of PH ... unless somebody want to take a video of an event from the air .. using a fix position.

MultiWii is good for simple board ... APM-Harakiri-DJI are using more power CPU ... even if the delta from APM atmega2560 and atmgea328 is not so big ... but 256k vs 32k ... and 4 serial vs 1 serial ... considering that APM is on the edge of the capability .. if not even a bit outside the edge for acro fly ...

The simple MultiWii GPS handling, once the MAG is properly configured ... it is quite reliable ... possible safer then APM and DJI.

User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Re: GPS Hold...

Post by Leo »

I'm sticking with my old atmgea328 board and learning MulitWii with it.

I need alt hold mostly to film model rocket launches at different heights.

I like your "Action mode" and will look in to that when all the standard functions on my quad run the way I want them to :)

Leo

User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Re: Multiwii 2.3 Dev - GPS Hold...

Post by Leo »

Exciting progress to report :)

After doing nothing else but trying to find the cause of my Quad GPS-HOLD and GPS-RTH problems luck finally came my way :D

I knew I had to concentrate on the MAG because that is all that made sense to me. I tried numerous things e.g. turning the flight controller 90° (sensor "+X" pointing forward).
I had to make changes to the code. After rechecking the DIP's I got the Quad to fly like it had before the changes. But GPS-Hold would still not work at all except in one direction.

After searching the the web for hours I decided only two things are left that I could try.
Firstly I positioned the flight controller further away from the base plate by swapping it with the receiver. I also mounted the FC back to the direction as I had it before.

Image

Secondly, I used a different method to calibrate the MAG:
http://www.multiwii.com/forum/viewtopic.php?f=8&t=1387&p=10658

After I got all that done it was time again to check the PID's and verify that the Quad was in a stable flying mode.

Today I jumped into the car with Quad and all to try my luck once more.....

Well, I am delighted that FINALLY on the first try GPS-Hold and GPS-RTH worked right off the bat! :)
I was thrilled!!

I flew two lipo charges and did all the tests I felt were necessary to be certain all was working as it was suppose to and it did, even with the winds that made me a bit nervous.

Here is one example with GPS-Hold and GPS-RTH:

(Please excuse the quality as it was recorded with a keychain cam)

Now I can work on tuning the Quadcopter in more detail. :)

Leo

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Multiwii 2.3 Dev - GPS Hold...

Post by e_lm_70 »

Thanks for your update about the MAG calibration issue.

You mention you follow a new way to calibrate the MAG ... I did follow the link but it is not really 100% clear

Also to me the description tell something, but the picture is different.

Did you modify the code ... or can you describe better your MAG calibration ?

User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Re: Multiwii 2.3 Dev - GPS Hold...

Post by Leo »

e_lm_70 wrote:Thanks for your update about the MAG calibration issue.

You mention you follow a new way to calibrate the MAG ... I did follow the link but it is not really 100% clear

Also to me the description tell something, but the picture is different.

Did you modify the code ... or can you describe better your MAG calibration ?


Well, let me try to explain how I did it.
Firstly I positioned myself looking to the North holding the Quad in my hands. I also had the Quad pointing 45° downward (motors 3 and 10 lower and motors 11 and 3 higher). I then rotated myself 360°.
Next I rotated the Quad 90° (Motors 3 and 11 pointing UP and motors 10 and 9 pointing DOWN). The Quad itself is still being pointed 45° to the ground. I then rotated myself 360°.
Lastly I rotated the Quad 90° forward (Motors 11 and 9 pointing UP and motors 3 and 10 pointing DOWN). Again the Quad is pointing 45° to the ground. I then rotated myself 360°.
That was it. It seems to have worked.

I believe in my case the real culprit was the interference caused by the main power cables. Moving the board away from the cables solved the problem.

Yesterday I did further tests for verification. This time I used a better camera:

User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Re: Multiwii 2.3 Dev - GPS Hold...

Post by Leo »

To be on the very safe side I decided to add a megnetic shield to the lowest plate on my QuadCopter.

Image

The film is supposedly better than MuMetal.

I think I have my bases covered now :)

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Multiwii 2.3 Dev - GPS Hold...

Post by e_lm_70 »

Leo wrote:
e_lm_70 wrote:Thanks for your update about the MAG calibration issue.

You mention you follow a new way to calibrate the MAG ... I did follow the link but it is not really 100% clear

Also to me the description tell something, but the picture is different.

Did you modify the code ... or can you describe better your MAG calibration ?


Well, let me try to explain how I did it.
Firstly I positioned myself looking to the North holding the Quad in my hands. I also had the Quad pointing 45° downward (motors 3 and 10 lower and motors 11 and 3 higher). I then rotated myself 360°.
Next I rotated the Quad 90° (Motors 3 and 11 pointing UP and motors 10 and 9 pointing DOWN). The Quad itself is still being pointed 45° to the ground. I then rotated myself 360°.
Lastly I rotated the Quad 90° forward (Motors 11 and 9 pointing UP and motors 3 and 10 pointing DOWN). Again the Quad is pointing 45° to the ground. I then rotated myself 360°.
That was it. It seems to have worked.



Thanks

Above is very very clear, and it sound very practical

I will try to use it ... and then if works fine as it sounds ... I will advocate this practice :geek:

User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Re: Multiwii 2.3 Dev - GPS Hold...

Post by Leo »

Let me know how it turns out.

Leo

Post Reply