Multiwii 2.2 - GPS hold

lakis21
Posts: 5
Joined: Wed Jan 02, 2013 4:26 pm

Re: Multiwii 2.2 - GPS hold

Post by lakis21 »

scrat wrote:
lakis21 wrote:Hello,
did anyone with Crius AIOP v1.1 and ublox CN-06 has success with pos hold?
the GPS_LEAD_FILTER should be enable or disable?

What else except GPS_HOLD, MAG , BARO should I have enable to have POS HOLD?

Thanks in advance to everyone. :)


I have Aio Pro v1.1. and gps from rctimer cn-06 v2. I get POS HOLD in from 50cm to 100cm radius(stock PID's for GPS). Depends of wind. I have enabled GPS PS HOLD, MAG, BARO and ANGLE.


Thanks for reply! I really appreciated!
what about GPS_LEAD_FILTER should be enable or disable?

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Multiwii 2.2 - GPS hold

Post by scrat »

I have LEAD FILTER disabled.

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Multiwii 2.2 - GPS hold

Post by felixrising »

I've been playing with Pos Hold and RTH recently too. I have a Crius AIOP V1.1 and a V2 + CN-06 Ublox Neo-6m. I find that after initially enabling PH, it tends to drift off (today was windy) before correcting and finally settling. Often it will drift downwind about 5-10m before overshooting the mark and finally settling down. This may just be a parameter tuning thing. I have Lead Filter enabled, but from memory it was a bit less prone to overshoot with it disabled which doesn't really make any sense to me.

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Multiwii 2.2 - GPS hold

Post by scrat »

AndrejLV wrote:Nice work Scrat!

I have the same configuration but result still far from perfect. I installed it on quadro and octo .. sometimes it can hold 3x3m, but mostly drift +-20-30m.
Could you please post settings? Batt 3s or 4s? other PIDs? Conf section of GPS ? Motors and ESC ?
Pictures?


Batt 3S, PID's - stock for POS HOLD. ESC's HK F30A - simonk and motors are suppo clone 1000Kv. Props 9x4.5 from flyduino.

lakis21
Posts: 5
Joined: Wed Jan 02, 2013 4:26 pm

Re: Multiwii 2.2 - GPS hold

Post by lakis21 »

scrat wrote:I have LEAD FILTER disabled.


Thank you!!!

mopedcrosser
Posts: 52
Joined: Sat Feb 23, 2013 12:35 pm

Re: Multiwii 2.2 - GPS hold

Post by mopedcrosser »

Hi all,

Scrat you were havig the same issue as all of us in your initial post, so can you help us out and describe how you fixed the issue ?

My hexa (CRIUS AIOP + UBLOXV2) is also drifting in yaw once I speed up the motors, however I´d say it´s only approximately 5 degrees....

1. How should I move away the mag sensor... it´s on the FC, the only possibility I have is to move it a little higher... Its already about 3 cm
above the centerplate.. My ESCs are sitting in between of the centerplates.. Would a metal plate below the FC probably help to screen the FC
from the electromagnetic radiation ?

2. The navigation to the desired home position works like a charm.. Does this tell me the mag can´t be too bad ? If I activate follow me, and move
it stays very precise and does not start to get off. The problem only occurs once a waypoint was reached and the copter tries to hold position. Then it
just drifts away and starts circeling around the home position.... Sometimes it´s getting really bad ( about 20 meter diameter ). I use my tablet and
enzio app to monitor the copters position. The gps always shows the copters position very precisely... So this tells me that it is not the gps beeing not
accurate enough...

3. So might it be the PID for Position Hold ? Can somebody tell me which of the PID´s is taking over once a destination was reached ( Within 2m diameter ) ?
I already read osbandis little description, but I dont get the difference between the POSHold PI and the POSRate PID ? Which one takes care of what ?

I hope we can get it fixed ;-)

Sebastian

Electro 2
Posts: 27
Joined: Tue Mar 19, 2013 4:05 am

Re: Multiwii 2.2 - GPS hold

Post by Electro 2 »

"So might it be the PID for Position Hold ?"
Yes, tis.

"Can somebody tell me which of the PID´s is taking over once a destination was reached ( Within 2m diameter ) ?"
Hold, as above.

"I dont get the difference between the POSHold PI and the POSRate PID ?"
Rate is traveling to the point, hold is "stick" once you're there.

mopedcrosser
Posts: 52
Joined: Sat Feb 23, 2013 12:35 pm

Re: Multiwii 2.2 - GPS hold

Post by mopedcrosser »

Hi Electro,

thanks for your help ! But if PosR is responsible for reaching a waypoint,
what is NavR for then ?

User avatar
EOSBandi
Posts: 802
Joined: Sun Jun 19, 2011 11:32 am
Location: Budapest, Hungary
Contact:

Multiwii 2.2 - GPS hold

Post by EOSBandi »

read this
http://i2c-gps-nav.googlecode.com/files ... tation.pdf

it is still valid in terms of pid tuning and description

Electro 2
Posts: 27
Joined: Tue Mar 19, 2013 4:05 am

Re: Multiwii 2.2 - GPS hold

Post by Electro 2 »

Mopedcrosser:
The Grand Master has spoken, zero need for me to try and second guess this. And, by the way, a tip 'o the hat to him and all the other coders that work so hard to make this stuff what it is!

teslahed
Posts: 84
Joined: Wed Jun 27, 2012 2:51 pm

Re: Multiwii 2.2 - GPS hold

Post by teslahed »

I've managed to get GPS working with Multiwii 2.2 quite well now.

What made the difference for me was raising the flight controller up by using longer nylon standoffs. I have a power distribution board mounted under the flight controller and it must have been causing the magnetometer problems. I had already added ferrite rings to all the relevant wires and routed the ESC cables as far away from everything else as possible - but it was the power distribution board that did it.

Fitting a bluetooth adapter so that i could calibrate my magnetometer outside also helped.

mopedcrosser
Posts: 52
Joined: Sat Feb 23, 2013 12:35 pm

Re: Multiwii 2.2 - GPS hold

Post by mopedcrosser »

Hi,

so it was only the power distribution ? Did you still disable the gps lead filter, or did the more space solve all problems ?
I am not sure about this in my hexa.. theres plenty of space in between power distibution and FC. I probably try to put a metal
plate underneath the FC..

Sebastian

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Multiwii 2.2 - GPS hold

Post by scrat »

mopedcrosser wrote:Hi,

so it was only the power distribution ? Did you still disable the gps lead filter, or did the more space solve all problems ?
I am not sure about this in my hexa.. theres plenty of space in between power distibution and FC. I probably try to put a metal
plate underneath the FC..

Sebastian


I have again uncommented #define GPS_LEAD_FILTER and I have played with PID's and quad flyes much better in GPS POS HOLD. So lead filter is helping in my case.

BarneyG
Posts: 39
Joined: Tue May 07, 2013 4:42 pm

Re: Multiwii 2.2 - GPS hold

Post by BarneyG »

teslahed wrote:I've managed to get GPS working with Multiwii 2.2 quite well now.

What made the difference for me was raising the flight controller up by using longer nylon standoffs. I have a power distribution board mounted under the flight controller and it must have been causing the magnetometer problems. I had already added ferrite rings to all the relevant wires and routed the ESC cables as far away from everything else as possible - but it was the power distribution board that did it.

Fitting a bluetooth adapter so that i could calibrate my magnetometer outside also helped.



How much separation do you have now ?

I've recently got my quad - (450 clone with Crius Pro v2 board and a UBlox GPS) Initially I was using MegapirateNG, hadn't tried GPS hold etc but decided to give MultiWii 2.2 a try ... I think I like the way MultiWii flies better but I also changed the props from 10 inch to 9 inch so I'm not sure if the difference is the OS or the props.

Anyway I did try GPS Hold and RTH on MultiWii and mine too was wandering off in a straight line in a random direction at about walking pace when I turned them on. I tried upping the P's but that didn't make any difference ... though I saw a Youtube clip with someone stating they were using 0.4 ... the default was 2.0 so not sure about that.

I tried seeing if my compass deviated when the motors were running and low and behold it was, I've tried putting twists in the ESC power cables and that didn't help :) so Now I need to seperate the Power distribution board and the FC some more ... not sure how that is going to be possible there isn't any more room between the top and bottom plates

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Multiwii 2.2 - GPS hold

Post by scrat »

I think I've found a solution for my GPS POS HOLD.

I'm using now three web pages for MAG Declination settings.

First: http://magnetic-declination.com/ - From this page I use LAT and LON

Second: http://www.ngdc.noaa.gov/geomag-web/ - On this page I set on teh right side my country and city and push get location. Then on the left side I paste LAT and LON info from the first page and click Calculate.

Third: http://www.satsig.net/degrees-minutes-s ... ulator.htm - on this page I calcucalte mag decli and it is better al least for me.

defkom
Posts: 9
Joined: Sun Jan 06, 2013 10:27 am

Re: Multiwii 2.2 - GPS hold

Post by defkom »

scrat wrote:
mopedcrosser wrote:Hi,
I have again uncommented #define GPS_LEAD_FILTER and I have played with PID's and quad flyes much better in GPS POS HOLD. So lead filter is helping in my case.


Hi scrat,
can you tell me, how tight your GPS hold works?

The best I get out of my setup (Y6, CRIUS AIOP V1, SimonK, u-Blox CN-06 GPS Receiver V2.0, MW2.2) is a circle with a diameter of 2-3m in calm conditions.
The dudes from the youtube video that is supplied in the MW2.2 Changelog get something like 0,5-1m
I asked the guy what he did and he stated, that "all is default", on his other frame, he had the circling as well, once he changed frame geometry, everything worked out well.

You said "I have played with PIDs", can you tell me your method, e.g. Raise PosR P until xyz happens, then raise PosI until abc happens.
I just do not get the trick behind tuning PIDs (I read EOSBandis' Instructions, seems I am to stupid for this...)

Even more questions:
.Did you fly your copter in gusty conditions as well?
.Did it hold Position in as good as in calm conditions?

Thanks in advance and Cheers

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Multiwii 2.2 - GPS hold

Post by scrat »

defkom wrote:
scrat wrote:
mopedcrosser wrote:Hi,
I have again uncommented #define GPS_LEAD_FILTER and I have played with PID's and quad flyes much better in GPS POS HOLD. So lead filter is helping in my case.


Hi scrat,
can you tell me, how tight your GPS hold works?

The best I get out of my setup (Y6, CRIUS AIOP V1, SimonK, u-Blox CN-06 GPS Receiver V2.0, MW2.2) is a circle with a diameter of 2-3m in calm conditions.
The dudes from the youtube video that is supplied in the MW2.2 Changelog get something like 0,5-1m
I asked the guy what he did and he stated, that "all is default", on his other frame, he had the circling as well, once he changed frame geometry, everything worked out well.

You said "I have played with PIDs", can you tell me your method, e.g. Raise PosR P until xyz happens, then raise PosI until abc happens.
I just do not get the trick behind tuning PIDs (I read EOSBandis' Instructions, seems I am to stupid for this...)

Even more questions:
.Did you fly your copter in gusty conditions as well?
.Did it hold Position in as good as in calm conditions?

Thanks in advance and Cheers


In cal conditions I get max 1m diameter. I didn't flew in gusty winds yet.

I have raised P for POSH from 0.11 to 0.20 and on PosR P to 2.9 and D to 55.

defkom
Posts: 9
Joined: Sun Jan 06, 2013 10:27 am

Re: Multiwii 2.2 - GPS hold

Post by defkom »

Hi scrat,
can you post a screenshotof your MWGUI Settings.
I am a little bit confused about the D Values, in my setup the defaults for these are 0,0045, it might be wrong in my setup....
cheers
defkom

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Multiwii 2.2 - GPS hold

Post by scrat »

defkom wrote:Hi scrat,
can you post a screenshotof your MWGUI Settings.
I am a little bit confused about the D Values, in my setup the defaults for these are 0,0045, it might be wrong in my setup....
cheers
defkom


Sorry...D is 0.0055

mopedcrosser
Posts: 52
Joined: Sat Feb 23, 2013 12:35 pm

Re: Multiwii 2.2 - GPS hold

Post by mopedcrosser »

Hi all,

I think the key to solve this issue is to get rid of all interference from power lines. I am trying for a while now and ended up
ordering Mu Metal foil to screen the FC from the magnetic field of the power lines. The only concern I have is that I screen
the earth mag field as well, but I´ll try to get it only in between of cables and FC. I already have about 5cm of space in between of
the power distribution and the mag is still affected pretty bad. In Idle the compass doesn´t move, but as soon as I speed up to take
of the deviation is about 10° and increases with throttle. So you all should check that using the GUI and BT. If there is a deviation
caused by the mag field, a correct (fine) positioning is almost impossible.

1. Everytime the copter drifts off (lets assume north) the copter will try to correct the pos to the opposite direction (in this case south).
But if the mag doesn´t tell the copter the exact direction it will corret in the same direction. This explains in my opinion the wandering
around the correct position. As soon as the deviation gets too large the pos can be corrected approximately using the gps. This explains
why we see circeling in a 10 - 20 m radius.

2. Setting the correct mag declination wont help in this case, since the interference from the power lines is much greater. It will always be off.

3. If there is a deviation in the compass it sounds plausible to me that uncommenting the lead filter improves the situation, since the copter wont
use predicted values (that cant be achieved due to the inaccurate mag) and uses the actual gps position which should be pretty much correct.

Tell me what you think... I´ll let you know if my theory was correct IF I can make it to ged rid of the mag deviation. My escs are all in the centerplate
and there are tons of wires..

Seb

User avatar
linuxslate
Posts: 91
Joined: Mon May 13, 2013 3:55 pm

Re: Multiwii 2.2 - GPS hold

Post by linuxslate »

I have the same problem - Throttle affects the compass.

My battery wires go right past the board. Above the board are the motor wires.

The motor wires are tied off away from the board as much as possible, but in my current configuration, there is not really much I can do about the battery wires being close to the board.

There is bound to be some magnetic effects. These are small vehicles, and high currents. GC constraints tend to force the board and the battery to be close together.

I may try sliding some grounded, braided shield over the battery wires.

mopedcrosser
Posts: 52
Joined: Sat Feb 23, 2013 12:35 pm

Re: Multiwii 2.2 - GPS hold

Post by mopedcrosser »

Hi,

I was sucessfully trying a can (needs to be made from iron) which was screenig all the radiation. Unfortunately I was not allowed ;-) to cut pieces of to put them underneath the FC, so I was putting the entire can over the FC. The magnetic fields were completely eliminated, however the earth magnetic field was screened of as well. So I am waiting for my mu metal screen.

Seb

User avatar
bulesz
Posts: 71
Joined: Mon May 06, 2013 8:03 pm
Location: Hungary EU

Re: Multiwii 2.2 - GPS hold

Post by bulesz »

Heyho,

Interesting topic, I'm still testing my GPS (NEO-6M).

After calibrated the MAG, I have noticed if I give full throttle the MAG angle changed with around 5", like with zero throttle was 194" with max throttle was 199".
Is this between the "normal" limits? or should I seek something iron in the garden/kitchen as shield?

Many thanks,
B

Peter
Posts: 82
Joined: Mon Jun 11, 2012 2:09 pm

Post by Peter »

You could try to use a separate compass sensor placed as far as possible from interference.

zwiebacksaege
Posts: 27
Joined: Thu Mar 07, 2013 10:14 am

Re: Multiwii 2.2 - GPS hold

Post by zwiebacksaege »

Hi guys... same issue for me. I'm using a MEGA board with Sensor plate right on top of the ditributor-plate (maybe 3cm space).
During the last days I had some problems with PH and wanted to check my MAG behaviour during flight. Through my minimOSD I can now observe that the MAG error is about 5-10° when giving big throttle boosts out of hoving state. I think this must be ok for PH because I calculated roughly:

For heading error of 10° the FC is doing the following mistake when trying to correct the position:
cos(10°)=0.985 = -1.5% in the direction he actually wants to correct he is doing 1.5% too less
sin(10°)=0.173 = 17.3% he is doing a unwanted sideways dift of 17% while trying to correct in the wanted direction.

So for example the copter drifts 1m north and FC wants to correct with going 1m south it will actually go 98.5cm south and 17cm east or west.

I think I can live with this as it's still far less than the GPS noise ... isn't it?

mopedcrosser
Posts: 52
Joined: Sat Feb 23, 2013 12:35 pm

Re: Multiwii 2.2 - GPS hold

Post by mopedcrosser »

Hi,

I had a ~10 degree deviation in hovering state which was causing the copter to circle in a 10-20m diameter around the original position. Navigation to waypoints or home position
worked flawless and very accurate. I got the issue solved in the meantime by ripping my entire hexacopter apart. I renewed the entire power distribution and esc wiring and tied all
+ wires to the matching - wires. That worked stunningly good. You can test your results by pushing the copter to the ground and then accelerate up to max speed. You will see if the
compass changes or not. Before I renewed my wiring I had almost 360 degrees at full throttle. I also attached a mumetall screen in to of the power distribution board which is sitting
approx. 5 cm below my Crius aiop. Good luck ;-) !

Best regards

Sebastian

zwiebacksaege
Posts: 27
Joined: Thu Mar 07, 2013 10:14 am

Re: Multiwii 2.2 - GPS hold

Post by zwiebacksaege »

so I got this 10° at full throttle boosts.. .this makes a big difference!
It's nothing special that your copter circles wide around if you're getting complete heading mess at full throttle.
meanwhile I tweaked my powerdistribution by hiding all the ESC feeding cables inside my frame-profiles.
but the idea of having a magnetic screen below the FC is also in my mind. which material do i have to take? passive magnetic or just electric conductive?

mopedcrosser
Posts: 52
Joined: Sat Feb 23, 2013 12:35 pm

Re: Multiwii 2.2 - GPS hold

Post by mopedcrosser »

Hi,

just look on ebay for mumetall or permalloy. There is one guy offering 10x10x0,1 pieces on ebay.de. Should be about 3€ and helps pretty good.
Before I renewed my wiring I was putting one piece right underneath my FC which was already solving the problem. I decided to make it perfect
afterwards and ripped the entire thing apart to solve the original problem.

Sebastian

zwiebacksaege
Posts: 27
Joined: Thu Mar 07, 2013 10:14 am

Re: Multiwii 2.2 - GPS hold

Post by zwiebacksaege »

thanks.. I will try.
but I also considered those thin metal sheets you can find at every (old) HDD for magnetic isolation. since they are for free and I got plenty of old HDDs I will give them a try too.

mopedcrosser
Posts: 52
Joined: Sat Feb 23, 2013 12:35 pm

Re: Multiwii 2.2 - GPS hold

Post by mopedcrosser »

Hi,

that should be the exact same stuff ;-). Give it a try.

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Multiwii 2.2 - GPS hold

Post by scrat »

Could you post a picture of your work please. I have old HDDs too. Thx!

mopedcrosser
Posts: 52
Joined: Sat Feb 23, 2013 12:35 pm

Re: Multiwii 2.2 - GPS hold

Post by mopedcrosser »

Which Nerd does not ;-)

zwiebacksaege
Posts: 27
Joined: Thu Mar 07, 2013 10:14 am

Re: Multiwii 2.2 - GPS hold

Post by zwiebacksaege »

i'm planing to try it this evening.. will post the result then immediately

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Multiwii 2.2 - GPS hold

Post by scrat »

mopedcrosser wrote:Which Nerd does not ;-)


8-)

zwiebacksaege
Posts: 27
Joined: Thu Mar 07, 2013 10:14 am

Re: Multiwii 2.2 - GPS hold

Post by zwiebacksaege »

sorry guys not time for testing up to now... family sucks every minute :-D
but i'm on it.. if someone else is faster... I would appreciate it :-)

trello
Posts: 19
Joined: Wed Apr 10, 2013 1:04 pm

Re: Multiwii 2.2 - GPS hold

Post by trello »

I got RTH working perfectly with AIO Pro, u-blox NEO-6M and MW 2.2. I always had drifting issues in the past, with these settings it works everytime. Here is a short manual:

-Connect the GPS module to ublox u-center with a ftdi adapter
-Change baud rate to 115200 and update rate to 5hz
-Make sure the settings are saved to eeprom! Disconnect and reconnect u-center to make sure everything is saved properly
.Use this link to get the exact value for magnetic declination: http://www.ngdc.noaa.gov/geomag-web/, convert to decimal here: http://www.satsig.net/degrees-minutes-s ... ulator.htm

config.h:
#define GPS_SERIAL 1 // Your serial port, i'm using RX1 and TX1
#define GPS_BAUD 115200

//#define GPS_LEAD_FILTER // Comment this line! The lead filter is likely the cause for drifting
#define MAG_DECLINIATION 1.66f // See above


GPS.ino:
#define NAV_SPEED_MIN 250 // cm/sec
#define NAV_SPEED_MAX 400 // cm/sec
#define NAV_SLOW_NAV true
#define NAV_BANK_MAX 2000 //30deg max banking when navigating (just for security and testing)


-Calibrate ACC and Compass from MultiWiiConf.
-Enable GPSHOME, ANGLE and MAG mode for RTH.

zwiebacksaege
Posts: 27
Joined: Thu Mar 07, 2013 10:14 am

Re: Multiwii 2.2 - GPS hold

Post by zwiebacksaege »

As I promised I wanted to report my results of shielding the mag with some paramagnetic metal from old HDDs. The result was rather poor so that I really favorite some software-correction of the mag error due to throttle changes. I can really see some nearly linear behaviour of the heading error and the throttle position in my OSD. So it should not be so hard to implement some simple correction term for the mag.

User avatar
linuxslate
Posts: 91
Joined: Mon May 13, 2013 3:55 pm

Re: Multiwii 2.2 - GPS hold

Post by linuxslate »

I just wanted to confirm that I, too have RTH working will with the same settings as trello.

EDIT: I have BARO checked also for RTH. Is this not correct?!

While watching a video from my early successful RTH flights, I noticed that it seemed to be taking a rather leisurely flight back to me. If the weather cooperates this weekend, I intend to try to increase NAV_SPEED_MAX.

zwiebacksaege
Posts: 27
Joined: Thu Mar 07, 2013 10:14 am

Re: Multiwii 2.2 - GPS hold

Post by zwiebacksaege »

up to now I got medium good results in position hold... when I change the position manually it even works holding new corrected position.. at least on a calm day...
but changing just the heading results into problems amost everytime... it behaves as if he would not be aware of new heading... and drifting away in wrong direction so that I have to recover manually very fast. Any ideas? When I change heading AND position with pitch/roll I don't get this problem.

trello
Posts: 19
Joined: Wed Apr 10, 2013 1:04 pm

Re: Multiwii 2.2 - GPS hold

Post by trello »

Some observations after more testflight with the settings posted above. I'm mainly focused on rth instead of position hold.

Safety
RTH still works 100% of the time, even with a small number of satellite locks and activated in-flight while the copter isn't necessary stabilized. This is awesome as a safety feature, for fpv, etc.

Accuracy
Depends on the location and day of flying. Sometimes it returns to about 1-2m of arming position and gps hold works pretty smooth, sometimes its off by 4-5m and starts to drift when in position hold. Drift is not a problem with the stability, wind or gyro, if its accurate in RTH then gps hold is also more stable. Of course more satellites help but i've had poor performance with 7 satellites and good results with 5. Possibly interferences at the flight site? Will have to test if some locations have a better overall performance.

Setup
I have the gps antenna mounted about 4-5cm above the power distribution separated by two layers of wood and one layer of carbon. Its placed right next to the fc but that doesn't seem to be a problem.

mopedcrosser
Posts: 52
Joined: Sat Feb 23, 2013 12:35 pm

Re: Multiwii 2.2 - GPS hold

Post by mopedcrosser »

Hi,

I just wanted to let you know that correcting the mag by setting up the wiring properly and using mumetall screens did not improve my pos hold significantly. The copter still drifts away slowly in a 15 m radius, which is definetely not a gps issue, since I can see it drifting away on the map... The mag itselves is awesome right now.. Even at full throttle the copter keeps heading perfectly. So what might be the issue?

I have 3 guesses

1. The compass north is not north because there is whyever a deviation. I tried to check that but I did not have a compass I could trust. I tried to verify the heading by looking for a street that goes exactly from north to south on the map. It looked ok so far, but i will try to verify in flight again. Btw.. Its not easy to find such a road in germany :-) . But then again.. how bad can a 1- 10 degree deviation influence the pos hold behavior?! Could probably someone with perfectly working poshold try to set a far wrong mag declination?

2. The pids are not correct and have to be tuned.

3. The gps lead filter causes the issue. I cant believe this, since the guys with a good ph are using that option...

I'll let you know what my next findings are. Please read the yaw hold - not holding post. It seems like there are many guys having similar issues in 2.2... Another possible reason, should probably be discussed in sw development.

Happy testing

Sebastian

User avatar
ezio
Posts: 827
Joined: Sun Apr 01, 2012 11:03 pm
Location: Paris
Contact:

Re: Multiwii 2.2 - GPS hold

Post by ezio »

mopedcrosser wrote:Hi,

I just wanted to let you know that correcting the mag by setting up the wiring properly and using mumetall screens did not improve my pos hold significantly. The copter still drifts away slowly in a 15 m radius, which is definetely not a gps issue, since I can see it drifting away on the map... The mag itselves is awesome right now.. Even at full throttle the copter keeps heading perfectly. So what might be the issue?

I have 3 guesses

1. The compass north is not north because there is whyever a deviation. I tried to check that but I did not have a compass I could trust. I tried to verify the heading by looking for a street that goes exactly from north to south on the map. It looked ok so far, but i will try to verify in flight again. Btw.. Its not easy to find such a road in germany :-) . But then again.. how bad can a 1- 10 degree deviation influence the pos hold behavior?! Could probably someone with perfectly working poshold try to set a far wrong mag declination?

2. The pids are not correct and have to be tuned.

3. The gps lead filter causes the issue. I cant believe this, since the guys with a good ph are using that option...

I'll let you know what my next findings are. Please read the yaw hold - not holding post. It seems like there are many guys having similar issues in 2.2... Another possible reason, should probably be discussed in sw development.

Happy testing

Sebastian

My quad holds position quite nice but when I enable the lead filter it doesn't work well. The quad is all over the place.

mopedcrosser
Posts: 52
Joined: Sat Feb 23, 2013 12:35 pm

Re: Multiwii 2.2 - GPS hold

Post by mopedcrosser »

Mhmm ok ;-). I´ll try to disable it. It always bothers me to change the code since you have to recalibrate and resetup everything. It would be nice to see Mavlink in the next release. BTW. Thanks for your great app ! This is the only thing working without trouble ;-).

Sebastian

mopedcrosser
Posts: 52
Joined: Sat Feb 23, 2013 12:35 pm

Re: Multiwii 2.2 - GPS hold

Post by mopedcrosser »

Alright ! I tested the entire thing without the gps lead filter and there is no difference at all. Which is kind of good, since it might tell me that my mag is working correct now. It has been a very calm day almost without any wind. I observed the copter to go back and forth above the desired point, but not circeling. Therefore I assume that it is the PI beeing not properly adjusted. This is the next step I will try. Can someone confirm that it is the Pos PI to tune ? I still do not get the difference between PosR and NavR if both are required to navigate to a waypoint and Pos is the PI to hold position. I will report my findings..

Seb

masterX
Posts: 1
Joined: Tue Jul 16, 2013 11:13 pm

Re: Multiwii 2.2 - GPS hold

Post by masterX »

mopedcrosser wrote:Hi all,

I think the key to solve this issue is to get rid of all interference from power lines. I am trying for a while now and ended up
ordering Mu Metal foil to screen the FC from the magnetic field of the power lines. The only concern I have is that I screen
the earth mag field as well, but I´ll try to get it only in between of cables and FC. I already have about 5cm of space in between of
the power distribution and the mag is still affected pretty bad. In Idle the compass doesn´t move, but as soon as I speed up to take
of the deviation is about 10° and increases with throttle. So you all should check that using the GUI and BT. If there is a deviation
caused by the mag field, a correct (fine) positioning is almost impossible.

1. Everytime the copter drifts off (lets assume north) the copter will try to correct the pos to the opposite direction (in this case south).
But if the mag doesn´t tell the copter the exact direction it will corret in the same direction. This explains in my opinion the wandering
around the correct position. As soon as the deviation gets too large the pos can be corrected approximately using the gps. This explains
why we see circeling in a 10 - 20 m radius.

2. Setting the correct mag declination wont help in this case, since the interference from the power lines is much greater. It will always be off.

3. If there is a deviation in the compass it sounds plausible to me that uncommenting the lead filter improves the situation, since the copter wont
use predicted values (that cant be achieved due to the inaccurate mag) and uses the actual gps position which should be pretty much correct.

Tell me what you think... I´ll let you know if my theory was correct IF I can make it to ged rid of the mag deviation. My escs are all in the centerplate
and there are tons of wires..

Seb


Hey,

did you already fixed your problem? same here.

rizky_p
Posts: 14
Joined: Thu Sep 06, 2012 3:57 pm

Re: Multiwii 2.2 - GPS hold

Post by rizky_p »

I have had GPS Modules added to multiwii about 8 months ago, never managed to make GPS Hold works since then, it just wonders off in some funny directions, searched all over the place for any clue on how to tune the PID but still could not understand it. Basically i went blind and tune each PID by first zero every PID value and start from there. By magic Holy cow i got it to work hahaha i am so happy. today i drain a single 5000mah 3S battery hands off, man that feeling of achievement is awesome.

Here you can see my short video, sorry for night shot i cant wait for tomorrow and share it with you guys :)

http://youtu.be/VYqb7TyuazE

Cheers
Rizki

User avatar
alll
Posts: 220
Joined: Fri Dec 07, 2012 9:53 am

Re: Multiwii 2.2 - GPS hold

Post by alll »

Multiwii2.2 / CriusSe (no baro protection) / I2C UBLOX GPS and a crappy 350gram ooold quad (3D) ;) in quite windy and gutsy weather.
http://youtu.be/pzKF2Wfr1E0
manu
PS: i don't give you the PID values, because it will most probably not suit YOUR copter! :!:

In-Flight
Posts: 37
Joined: Wed Jan 30, 2013 5:11 am

Re: Multiwii 2.2 - GPS hold

Post by In-Flight »

Curios if anyone is changing their #define GPS_WP_RADIUS from the default of 200 to maintain a better pinpoint hold.
I've just started attempting to tune my POS hold.
Default settings work great, i just see a little more drift than I would like before it starts to recenter its location.
I figured this was related to the 200cm radius (which is huge in my opinion).
I've dropped it to 100 and I think I'm seeing better results, but was wondering how low everyone has taken this.

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Multiwii 2.2 - GPS hold

Post by scrat »

Just for info guys. I hava Crius AIO Pro v1.1 with GPS CN-06 - MWii v2.2. Till yesterday I have had set baudrate for gps 115200 and gps was working quite ok. But then I have set gps baudrate to 57600 and now it works way better and gps locks to satelites in about 30sec. Before it was from 1 to 2 minutes.

And quad holds position almost in spot with lead filter enabled. :)

I'm very happy now.

User avatar
mOuchadino
Posts: 15
Joined: Sat Jul 07, 2012 3:51 am

Re: Multiwii 2.2 - GPS hold

Post by mOuchadino »

:roll: :roll: :roll:

I have to build multiwii 2.2 with mpu 6050 acc + I2C Gps nav beta version :mrgreen:
the video as bellow



Last edited by mOuchadino on Fri Aug 09, 2013 10:18 am, edited 1 time in total.

Post Reply