GPS integration

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
User avatar
jevermeister
Posts: 708
Joined: Wed Jul 20, 2011 8:56 am
Contact:

Re: GPS integration

Post by jevermeister »

howardhb wrote:I must say that my GPS is working far better after flashing the firmware with:
FMP04_Camled_010327_A1.5E_20110118_10Hz_115200.bin
( see previous post from from @Scotth72 )
Just follow the instructions 100%.
You have to load Flashing firmware for the Flashtool program, AND GPS firmware.....

After flashing, I used the latest version of Mini GPS Tool V1.7.1 ( http://www.gtop-tech.com/jsf/download.jsf )
Set COM port to 38400, then press Connect. NB: Then press Ctrl + Alt + S to show the setup menu.
I was then able to set the GPS to output ONLY GGA, GSA and GSV sentences at 115200baud and 10Hz, and SAVE these settings.

So, after doing this, the MTK3329 (DiyDrones) and code from EOSBandi (both serial and I2C) can be used with confidence, at 115kb and 10Hz.

I had a chance, this morning, to test the new GPS Position Hold.
Position Hold definitely works very well. Hovered for 8 minutes in an area of about 1m radius, hands off!
Conditions were calm, almost no wind, but some small gusts, enough to see copter correcting!
Need to play some more with RTH PID's - overshoots a bit +- 10m, getting progressively worse.
I think lowering NavR P and PosR P will be the place to start.

H.

hey,

Is this neccesary to run the GPS with the nu code what is thhe difference?what is neded to flash the fmp?

thank ya
nils

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

Re: GPS integration

Post by EOSBandi »

Guys, I found a serious issue with the PID settings, pushed an update please use it.
(I turned out that teh PIDITEMS define is not used in the definitions of the PID arrays :( )

The updated gps firmware adds defuault 10Hz and 115200bps settings, plus allows you to save your desired settings into the flash on the gps module. Which removes the burden of setting the gps module on the fly (which is a kind a tricky and unpredictable especially with navigatron :( )

LuFa
Posts: 160
Joined: Fri Jan 27, 2012 7:56 pm

Re: GPS integration

Post by LuFa »

only at the i2c gps code ?? or also at Serial GPS Code ?

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

Re: GPS integration

Post by EOSBandi »

howardhb wrote:
I had a chance, this morning, to test the new GPS Position Hold.
Position Hold definitely works very well. Hovered for 8 minutes in an area of about 1m radius, hands off!
Conditions were calm, almost no wind, but some small gusts, enough to see copter correcting!
Need to play some more with RTH PID's - overshoots a bit +- 10m, getting progressively worse.
I think lowering NavR P and PosR P will be the place to start.

H.


Hi. try to increase the D terms... i flew with these last time... and got a quite OK RTH...

#define POSHOLD_P .11
#define POSHOLD_I 0.0
#define POSHOLD_RATE_P 1.4
#define POSHOLD_RATE_I 0.2
#define POSHOLD_RATE_D 0.018
#define NAV_P 1.4
#define NAV_I 0.22
#define NAV_D 0.008

You also can lower the navigational speed max (at the moment it's not wired out to gui, so you have to change it in the i2c_gps_nav config.h NAV_SPEED_MAX to 300...)

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

Re: GPS integration

Post by EOSBandi »

LuFa wrote:only at the i2c gps code ?? or also at Serial GPS Code ?

Multiwii base code.. :(

User avatar
jevermeister
Posts: 708
Joined: Wed Jul 20, 2011 8:56 am
Contact:

Re: GPS integration

Post by jevermeister »

Argh I so want to test your code mate, but I broke my hand and can not use my tx :-(

Are u in contact with alex, will it be in the trunk?

nils

LuFa
Posts: 160
Joined: Fri Jan 27, 2012 7:56 pm

Re: GPS integration

Post by LuFa »

EOSBandi wrote:
LuFa wrote:only at the i2c gps code ?? or also at Serial GPS Code ?

Multiwii base code.. :(


ok

because i have only see a update from the i2c code :?

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: GPS integration

Post by howardhb »

#define POSHOLD_P .11
#define POSHOLD_I 0.0
#define POSHOLD_RATE_P 1.4
#define POSHOLD_RATE_I 0.2
#define POSHOLD_RATE_D 0.018
#define NAV_P 1.4
#define NAV_I 0.22
#define NAV_D 0.008

Thanks! Will fly again this afternoon. (un-characteristically perfect, windless conditions here! :mrgreen: )

If you wouldn't mind, please push my updated LCD / OLED ... (attached zip)
Attachments
LCD.zip
Added GPS PID's to LCD_CONF
(16.63 KiB) Downloaded 235 times

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

Re: GPS integration

Post by EOSBandi »

LuFa wrote:
EOSBandi wrote:
LuFa wrote:only at the i2c gps code ?? or also at Serial GPS Code ?

Multiwii base code.. :(


ok

because i have only see a update from the i2c code :?

http://code.google.com/p/i2c-gps-nav/source/detail?r=22
Log message
A serious issue with PID settings identified and corrected.
(PID array definition did not used PIDITEMS define... )
Without this fix r20 and r21 is unflyable!!!!!

Modify /trunk/I2C_GPS_NAV/I2C_GPS_NAV-MultiwiiDev-NAV/MultiWii/MultiWii.ino
Modify /trunk/I2C_GPS_NAV/I2C_GPS_NAV-MultiwiiDev-NAV/MultiWii/Serial.ino
Modify /trunk/I2C_GPS_NAV/I2C_GPS_NAV-MultiwiiDev-NAV/MultiWiiConf/MultiWiiConf.pde

LuFa
Posts: 160
Joined: Fri Jan 27, 2012 7:56 pm

Re: GPS integration

Post by LuFa »

ah ok , you have also the Serial GPS code move to the i2c gps project page :)
because the latest version wich i have use is r10 . Have r10 the same proplem ?

if i understand it right , r22 is for i2c and Serial GPS ?

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: GPS integration

Post by Katch »

r22 error while compiling... line 435 multiwii.ino

debug3=get_free_memory();

compiler message

MultiWii.cpp: In function 'void annexCode()':
MultiWii:434: error: 'get_free_memory' was not declared in this scope


Edit - ok something seriously wrong with r22

using FreeIMU 0.4.3

removed the debug line above and it will compile and upload

Once done the copter no longer has any pitch or roll control - the channels change in the GUI but do not change the motor speed.

Something very broken - do not try to fly this r22 without verifying you definitely have pitch and roll control - I don't

back to 21 and everything works again.

EDIT 2 - seems to be strangely linked to level mode being active. need to do more tests.


IMPORTANT EDIT

Seems to be linked to the way my i2c gps is attached to my Paris v4 - I have moved to my MWC with FreeIMU 0.3.5ms and its behaving again.

dr.tom
Posts: 141
Joined: Fri Mar 30, 2012 4:46 pm
Location: Croatia
Contact:

Re: GPS integration

Post by dr.tom »

Katch wrote:Once done the copter no longer has any pitch or roll control - the channels change in the GUI but do not change the motor speed.

Something very broken - do not try to fly this r22 without verifying you definitely have pitch and roll control - I don't


how is your rate setting set?
is it left @ 0 ?

in gui, it seems to work OK,
stick input(pitch/roll) is shown in motor action when armed. in gyro and level mode, both.
Attachments
rate.JPG
(13.1 KiB) Not downloaded yet

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: GPS integration

Post by Katch »

Ok - just flown 2 pack on my MWC 0.3.5ms with I2C GPS

Still a little windy so not getting great results - but getting results nonetheless.

10mph winds

Return to home very definitely brought it back a couple of times and stopped nicely overhead.

Pos Hold - seems to either wander off or circle larger and larger circles until I have to take control.

Still not sure why my Paris v4 board was playing up but I do have my IMU on the LV side of the LLC and the GPS on the HV side. Something is messing with the i2c data along the line somewhere as it is only when the GPS board is attached that I have this lack of control.

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

Re: GPS integration

Post by EOSBandi »

Katch wrote:Ok - just flown 2 pack on my MWC 0.3.5ms with I2C GPS

Still a little windy so not getting great results - but getting results nonetheless.

10mph winds

Return to home very definitely brought it back a couple of times and stopped nicely overhead.

Pos Hold - seems to either wander off or circle larger and larger circles until I have to take control.


So it's time to start with the settings. Try increase POSHOLD_RATE_D, or decrease POSHOLD_P and POSHOLD_RATE_P. If in RTH it comes back and stops then it means your settings are not far from OK.

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: GPS integration

Post by Katch »

waiting for my packs to charge - will go out after dinner and hopefully less wind.

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

Re: GPS integration

Post by EOSBandi »

I pushed meanwhile r24. No changes exept I removed the erronous line and added Howard's lcd.ino modifications. (Thanks Howard !) and compiled the MultiWiiConf for Mac too.

User avatar
Gaijin
Posts: 82
Joined: Sat Jan 14, 2012 8:00 am

Re: GPS integration

Post by Gaijin »

EosBandi,

2 items of feedback:

1) With this release my pitch and roll inputs to the FC no longer have any effect even though the board will arm and hover just fine , the TX inputs appear correct in the GUI, input provided by CPPM on a futaba mapping, worked okay on your release from earlier this week.

2) The GUI will not connect to Com 15 via bluetooth serial, it just doesn't list it, again the last iteration was fine is this regard, the side effect is I can't cal the mag with the motors spinning and I can't check the GPS info whilst it is powered by battery.

I2C errors whilst powered by USB however are down to 0 from 6 on Quadrino Zoom /Flytron Navigatron setup

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: GPS integration

Post by Katch »

That is the same set of observations I found with my Paris v4 and GY_86 IMU

The problems did not persist when I switched to my MWC board - FreeIMU 0.3.5ms all running of 5v and HV i2c lines

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: GPS integration

Post by Katch »

Increased PosR from 1.4 to 1.7

hold seems to be a smaller circle now.

There still seems to be some level of randomness in whether RTH or POS Hold work well or not. I can fly to a similar location 4 or 5 times and engage POS Hold and get different results ranging from a good hold to heading off in some random direction.

I've also notice a pronounced kick of the motors when POS Hold is engaged which tends to throw the quad off its hold point and starts the pendulum effect circles.

RTH always brings it back and always slows as it approaches - after that its the same as POS Hold - sometimes good sometimes bad.

I also noticed that altitude hold is not great in either case - the quad often gains or looses altitude beyond what is acceptable. I've had it climb 30 or more meters and in another instance loose altitude from 20m to the ground.
Last edited by Katch on Wed May 16, 2012 7:17 pm, edited 1 time in total.

dr.tom
Posts: 141
Joined: Fri Mar 30, 2012 4:46 pm
Location: Croatia
Contact:

Re: GPS integration

Post by dr.tom »

happy for you that can try it 8-)
I get tons of I2C errors, gps is green in GUI, but no gps data is shown, all zeros. :(

Crius SE + Navigatron
all flashed ok, with Katch's blink code first, it blinks ON/OFF
then with latest EosBandi's code+Katch's patch for navigatron@10Hz,
Navigatron blinks 3times per sec after 10sec from powerup = 3D fix, so that works ok i guess.
(without patch it blinks 1sec ON/OFF long= 'no nmea', because of low baud rate i guess)


is there some conflict with BMA180? 0x40 address is same for gps and bma,
i'm no expert, just found that by search function when looking what addresses are used for what... maybe I'm wrong

stock navigatron firmware works ok on previous MWC releases (dev20120504), flight tested with gps RTH OK,
so hardware part + connections are ok.

Image

thanks for help :)
Last edited by dr.tom on Wed May 16, 2012 8:28 pm, edited 2 times in total.

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

Re: GPS integration

Post by EOSBandi »

It's definitely not an address issue.
i2cgps address is 0x40 BMA180 is 0x80, and i flown today with a Crius board (not an SE).
Did you guys disabled LCD_CONF and VBATT Code in config.h ?
I'm afraid that even with the short i2cgps code we are running out of ram memory.
The ONLY change between r21 and r24 is that the Pid array has a correct size now, so I'm baffled.
Could you send to me your config file ?
EOSBandi

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

Re: GPS integration

Post by copterrichie »

wilco1967 wrote:
What I did observe was it might not always come home exactly to the right spot, but perhaps 10..20 meters from it downwind.I guess the wind is to blame for that.

Anyway, not perfect, but still good enough to bring it back to me if I loose orrientation.... and it is way cool to leave it hanging there without touching the controls.

Thanks you very much for the hard work, EOSBandi

Now lets see if I can get 'approval' from the wife for a 10 Hz GPS ;)

Wilco


I use an old 4800 baud Microsoft GPS unit with my ODS and it does Drift but it is reliable. I hope to purchase a new GPS with all of the great features but for testing and development, this one that I have does just great. What I found to be true with this unit is, allow it to lock onto as many satellites as possible before fixing the home position.

Image

User avatar
Gaijin
Posts: 82
Joined: Sat Jan 14, 2012 8:00 am

Re: GPS integration

Post by Gaijin »

EOSBandi wrote:It's definitely not an address issue.
i2cgps address is 0x40 BMA180 is 0x80, and i flown today with a Crius board (not an SE).
Did you guys disabled LCD_CONF and VBATT Code in config.h ?
I'm afraid that even with the short i2cgps code we are running out of ram memory.
The ONLY change between r21 and r24 is that the Pid array has a correct size now, so I'm baffled.
Could you send to me your config file ?
EOSBandi



Sure, here it is for the Mwii portion, the I2C config is stock, no changes made

http://www.filedropper.com/config_7

Is the PID array shared for the input routines perhaps?

ApoC
Posts: 31
Joined: Fri Feb 10, 2012 2:16 pm

Re: GPS integration

Post by ApoC »

Where i have the "Arduino-twi-lib-patch" to put in? Found nothing where it have to copy.

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: GPS integration

Post by Katch »

ApoC wrote:Where i have the "Arduino-twi-lib-patch" to put in? Found nothing where it have to copy.


in the wire lib

arduino-1.0\libraries\Wire\utility

ApoC
Posts: 31
Joined: Fri Feb 10, 2012 2:16 pm

Re: GPS integration

Post by ApoC »

Damn, now where i see my own text - i see it...sorry guys....

Another Question: Wich Modes i have to mix?

I read, that i have to switch in the MAG with the GPS Hold, that it works. Maybe the Baro? Or would the height from the GPS used?

Wich Modes have switchd togheter?

User avatar
djrm
Posts: 40
Joined: Wed Feb 15, 2012 11:32 pm
Location: North Yorkshire, UK

Re: GPS integration

Post by djrm »

I have been following this most interesting development, thank you eosbandi.

I have installed the latest (r24) software onto my 8MHz pro mini 328 satnav board. it appears to be working well although I cannot attempt to fly it just yet.

I found a small problem with the led blinking, it would always blink slowly as if there was no 3d lock. I found there is a problem on my system in the way the status is checked for the blinking function. I have modified it like this and it now appears to work correctley:

Code: Select all

    if(_statusled_blinks==0) {
      if(i2c_dataset.status.gps3dfix /*== 1*/)
        _statusled_blinks=3;
      else if(i2c_dataset.status.gps2dfix /*== 1*/)
        _statusled_blinks=2;
      else
        _statusled_blinks=1;     
    }

There are other places in the software where the gpsNfix is checked == 1, I expect they too do not always evaluate as expected. I think the test would be better written as gps3dfix != 0 rather than gps3dfix ==1.

In the archive for the r24 software there is both the old and new versions of the i2c gps nav sketch, the one in the root of the archive looks like it is the correct one, a little confusing.

Keep up the good work, David.

UPDATE ...
The problem still sometimes exists with my modification, I now think the cause must be the $GPGSA frames are not being properley decoded in my arduino. If I reset the board it starts to flash 3 short but then reverts to 1 after a while. Oh well, I'll keep looking.

SOLUTION
It appears that if there are less than 5 satellites used for the lock then the slow flash mode is invoked, I only have 4 in view from my desk.

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

Re: GPS integration

Post by EOSBandi »

Morning,
It was a long night, finally I think I found the issue. When changed the PID array size I did not increased the EEPROM version number. So if somebody uploaded a sketch over r22 it messed up the config values, especially calibration and trim values for Acc. It worked on boards which did not had r22 or earlier nav version.
(current multiwii dev trunk has EEPROM version 154, nav code had 155 (now 156)
I pushed r26 to the repo, but a simple reset from the gui will fix it too.

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

Re: GPS integration

Post by EOSBandi »

Hi !

In the archive for the r24 software there is both the old and new versions of the i2c gps nav sketch, the one in the root of the archive looks like it is the correct one, a little confusing.

Agree, i fixed this in r26, i2c_gps_nav sketch now lives in it's own folder. I also separated the defines for easier reading.


SOLUTION
It appears that if there are less than 5 satellites used for the lock then the slow flash mode is invoked, I only have 4 in view from my desk.


It was intentional since 5sats are the bare minimum to fly with.

ApoC
Posts: 31
Joined: Fri Feb 10, 2012 2:16 pm

Re: GPS integration

Post by ApoC »

After flashing your last Versions, i can see, that the LED is not blinking, when i have satfix. So what i have to do, to get it working?

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: GPS integration

Post by Katch »

no testing today - wind and rain

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

Re: GPS integration

Post by EOSBandi »

ApoC wrote:After flashing your last Versions, i can see, that the LED is not blinking, when i have satfix. So what i have to do, to get it working?

Check that your gps is set to 115200 baud, I commented the gps speed settings from the i2cgpsnav code. If you have a PA6B module then update it's firmware (it was in this thread some days ago). Best is the gps module default is 115200 baud and 10Hz.

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: GPS integration

Post by Katch »

So quite a few problems are arising from people being unsure what baud their GPS device is communicating on or what it has been changed to in previous versions.

I was thinking would it not be better to include a bit of code the opens a serial communication on 9600 and 38400 sends an mtk to switch them to 115200 and then proceeds with the rest of the setup.

It will then ensure that whatever baud your gps happens to be on it will be switched to 115200 before any further setup is done. Those communications on 9600 and 38400 would just be ignored by a device already sitting on 115200.

something like this;

Code: Select all

// Changing 9600 bps to 115200
   Serial.begin(9600);
   delay(1000);
   Serial.print("$PMTK251,115200*1F\r\n");
   Serial.end();
   delay(1000);

// Changing 38400 bps to 115200
   Serial.begin(38400);
   delay(1000);
   Serial.print("$PMTK251,115200*1F\r\n");
   Serial.end();
   delay(1000);

// Setting up 10hz etc - we can add various mtk commands needed for different boards here
   Serial.begin(115200);
   Serial.print("$PMTK220,100*2F\r\n");
   delay(1000);
   Serial.println("$PMTK314,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29");  //seems to be needed for Navigtron
   delay(1000);
   Serial.println("$PMTK300,100,0,0,0,0*2C"); //seems to be needed for Navigtron


In that third section we can add a set of mtk commands that will configure all of the popular boards to 10hz as it shouldn't matter if the GPS receives an mtk command it doesn't recognise (it should just ignore it and carry on).

thoughts?

Y.Mita
Posts: 46
Joined: Thu Sep 15, 2011 11:25 pm

Re: GPS integration

Post by Y.Mita »

Please somebody help me! :?:

I fly my Hexa with MultiwiiV2.0 normally last weekend, and download R10 this week monday.
It's seems work perfectly on MultiWiiConf, move my Hexa by hand changes acc & gyro & mag & baro. From monday, I can't really flight because of day job.

Next, I download and install R24 and R26, but now acc & gyro seems go crazy on MultiWiiConf which comes with R24 or R26.
Model indicator of ROLL is upside-down, PITCH goes straight down. Only mag seems work well.
And also CALIB_MAG & CALIB_ACC buttons seems not work. At R10, both buttons work well.

I check my config.h many times, but can't find wrong setting. Also check the sensor code at def.h, but R10 and R26 looks like same.

For hardware check, I install R10 again, but no ploblem at all. Install R26, sensors goes wrong again.

Also, I try to compare source code of R10 and R26 by WinMerge, but too many changes between two revisions and I can't finish it!

My Hexa using FlyduinoMega with FreeIMU v0.3.5_MS and serial connection MKT GPS. Arduino 1.0. MultiWiiConf is application.windows32 on MS-Windows7.
RC reciever is connected by serial-sum-PPM, FUTABA.

Please give me some advise!

dr.tom
Posts: 141
Joined: Fri Mar 30, 2012 4:46 pm
Location: Croatia
Contact:

Re: GPS integration

Post by dr.tom »

Thnx EosBandi & Katch :)

With your latest rev. and katch's commands for navigatron,
it works (@ desk) 8-)

Image

going to try it outside ASAP

....by the way,
how come that some patches that fix some issues, are not implemented in new MWii revisions? :(
like this hexa patch, http://code.google.com/p/multiwii/source/detail?r=760
to get it working, i have to replace every new rev's Output.pde with this one :?:

It's not big problem as long as it works that way :)
but one day old output file won't compile with some new rev. :(

And for the Navigatron sensor... i could NOT get it to uplaod new firmware without 'out of sync' problem...
because somehow the gps output pin is connected to one of ftdi pin, (and it works ok with stock firmware, not broken)
then to shut down the gps and access only atmel, i disconnected vcc pins from gps(and pushed some paper in between the pcb and gps).
It then flashed OK. then I connected vcc back, and it works OK, transmits 10Hz 115200baud.
The rest of you managed to flash it without this mod? :shock:

Image


2 Y.Mita:
Did you import all the library folders to arduino-1.0\libraries folder? (and wire files to arduino-1.0\libraries\Wire )
I read somewhere on this forum that it is good to erase eeprom before flashing with new version...
(you have it in arduino program under File-examples-eeprom-erase, flash with it)
Hope it helps
Last edited by dr.tom on Thu May 17, 2012 6:08 pm, edited 1 time in total.

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: GPS integration

Post by Katch »

Y.Mita wrote:Please somebody help me! :?:

I fly my Hexa with MultiwiiV2.0 normally last weekend, and download R10 this week monday.
It's seems work perfectly on MultiWiiConf, move my Hexa by hand changes acc & gyro & mag & baro. From monday, I can't really flight because of day job.

Next, I download and install R24 and R26, but now acc & gyro seems go crazy on MultiWiiConf which comes with R24 or R26.
Model indicator of ROLL is upside-down, PITCH goes straight down. Only mag seems work well.
And also CALIB_MAG & CALIB_ACC buttons seems not work. At R10, both buttons work well.

I check my config.h many times, but can't find wrong setting. Also check the sensor code at def.h, but R10 and R26 looks like same.

For hardware check, I install R10 again, but no ploblem at all. Install R26, sensors goes wrong again.

Also, I try to compare source code of R10 and R26 by WinMerge, but too many changes between two revisions and I can't finish it!

My Hexa using FlyduinoMega with FreeIMU v0.3.5_MS and serial connection MKT GPS. Arduino 1.0. MultiWiiConf is application.windows32 on MS-Windows7.
RC reciever is connected by serial-sum-PPM, FUTABA.

Please give me some advise!



Sounds like your eeprom is getting messed up;

You can try a reset then write from the R26 gui - if that doesn't work try uploading an eeprom clear sketch then upload r26 again.

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: GPS integration

Post by Katch »

dr.tom wrote:Thnx EosBandi & Katch :)

With your latest rev. and katch's commands for navigatron,
it works (@ desk) 8-)

Image

going to try it outside ASAP



Glad you're getting results - weird about that paper mod - sounds like the Navigtron board may not be resetting properly when asked. Could be an engineering defect. Worth asking Melih.

dr.tom wrote:
....by the way,
how come that some patches that fix some issues, are not implemented in new MWii revisions? :(
like this hexa patch, http://code.google.com/p/multiwii/source/detail?r=760
to get it working, i have to replace every new rev's Output.pde with this one :?:



We must be working off an much older base version as there are tons of little changes and fixes not included - like hamburgers re-write of config.h and my Chinese IMU defines.

Y.Mita
Posts: 46
Joined: Thu Sep 15, 2011 11:25 pm

Re: GPS integration

Post by Y.Mita »

dr.tom wrote:2 Y.Mita:
Did you import all the library folders to arduino-1.0\libraries folder? (and wire files to arduino-1.0\libraries\Wire )
I read somewhere on this forum that it is good to erase eeprom before flashing with new version...
(you have it in arduino program under File-examples-eeprom-erase, flash with it)
Hope it helps


Katch wrote:Sounds like your eeprom is getting messed up;

You can try a reset then write from the R26 gui - if that doesn't work try uploading an eeprom clear sketch then upload r26 again.


First try import all library folders to arduino\libraries again with wire files too.
Not correct problem.

Next, run "File\Examples\EEPROM\eeprom_clear" sketch, and upload R26 again.

Correct!!! :D

But MultiWiiConf two buttons still not work, I'll try adjust from RC sticks.

Thank you very much, Mr.dr.tom and Mr.Katch!
Now, I can try new GPS algorithm this weekend! Thank you all!

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: GPS integration

Post by Katch »

Those GUI buttons have always been buggy - you just have to keep trying them - click move to see if it took if not click move again.

dr.tom
Posts: 141
Joined: Fri Mar 30, 2012 4:46 pm
Location: Croatia
Contact:

Re: GPS integration

Post by dr.tom »

dark got me so only 1 batt tested, works like it should, :)
needs PID tuning obviously, but good for first flight with new code. It didn't freeze mid-air :D

It's awesome to see Hexa turn around by itself and slowly crawl back to home position, and stops there, sick! :o

(changed max speed to 200cm/s, and min speed to 50cm/s, 400cm/s seemed to much to me for first test flight)

ApoC
Posts: 31
Joined: Fri Feb 10, 2012 2:16 pm

Re: GPS integration

Post by ApoC »

Katch wrote:Those GUI buttons have always been buggy - you just have to keep trying them - click move to see if it took if not click move again.


Jep - i HATE this. Thats why i use the WinGUI, when its ported to the new Version. ;)

The old GUI is outdated. Its frustating me every Time i use it.....plz rewrite, make it better plz. The damn Bottons (AUX) are not staying, if i clicked them. I have to hoover to check, if there on or off.....

What i hate too is, when i have some nice Code (Hexa Patch, Blink Codes and so on) and a new Version, like the new GPS Code, i have not this nice features anymore, because there are not in this Code.

Is it possible to merge the new GPS Code in my existing Code, that i fly atm? Im not a Coder, so i dont know, how it works.

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

Re: GPS integration

Post by EOSBandi »

Guys,
I just would like to reminder everyone who tries this code... it's a development version, not synced with the current multiwii dev tree. I just took the 20120504 dev release and put the gps code there... once it proven to work i transfer it to alex to merge it into the actual dev trunk (Or I'll do if necessary). Till that, a programming knowledge and familiarity with MultiWii internal workings are recommended for testing.
Bandi

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

Re: GPS integration

Post by EOSBandi »

dr.tom wrote:dark got me so only 1 batt tested, works like it should, :)
needs PID tuning obviously, but good for first flight with new code. It didn't freeze mid-air :D

It's awesome to see Hexa turn around by itself and slowly crawl back to home position, and stops there, sick! :o

(changed max speed to 200cm/s, and min speed to 50cm/s, 400cm/s seemed to much to me for first test flight)


Good to hear that :D
I just find an excelent PID tuning simulator, which can help to understand the role of the POSHOLD and POSHOLD_RATE PID's. It's made by Jason Short from DiyDrones who is the genius behind arducopter loiter code. The simulator based on the latest arducopter code, which I ported to multiwii, so you can apply what you find in the simulator to real life...
http://diydrones.com/profiles/blogs/ac2 ... -tuner-sim

ApoC
Posts: 31
Joined: Fri Feb 10, 2012 2:16 pm

Re: GPS integration

Post by ApoC »

dr.tom wrote:(changed max speed to 200cm/s, and min speed to 50cm/s, 400cm/s seemed to much to me for first test flight)


Can u explain, where do u changed that?

Im not a Coder, but with my Testflights i hope i can help.

GrAl
Posts: 1
Joined: Fri May 18, 2012 9:29 am

Re: GPS integration

Post by GrAl »

Guy
please help me choose parts.
I have MWC MultiWii SE Standard Edition 4-axis Flight Control Board QUADX w/ FTDI Basic Breakout on plane, and want use GPS for RTH.
What me need buy additional?

wolle
Posts: 13
Joined: Fri Apr 27, 2012 10:21 am
Location: Germany
Contact:

Re: GPS integration

Post by wolle »

Hello,
where you need to copy the PID libs go?
I get an error message when you compile the scetch.

Greetings Wolfgang

wolle
Posts: 13
Joined: Fri Apr 27, 2012 10:21 am
Location: Germany
Contact:

Re: GPS integration

Post by wolle »

Ok, I got it back.

It works now! I'll test it later times.

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: GPS integration

Post by howardhb »

You should create 2 new folders inside the "libraries" folder (find where Arduino-1.0 is installed, typically C:\Program Files\arduino-1.0)

(1) C:\Program Files (x86)\arduino-1.0\libraries\AC_PID
Inside this folder, put: AC_PID.cpp and AC_PID.h

(2) C:\Program Files\arduino-1.0\libraries\APM_PI
Inside this folder, put: APM_PI.cpp and APM_PI.h

Then, in C:\Program Files\arduino-1.0\libraries\Wire:
replace Wire.cpp and Wire.h

H.

wolle
Posts: 13
Joined: Fri Apr 27, 2012 10:21 am
Location: Germany
Contact:

Re: GPS integration

Post by wolle »

Thank you! I then understood it :) man would sometimes turn on the head.

Is it normal that the gps module without which I move, the speed jumps back and forth?

wolle
Posts: 13
Joined: Fri Apr 27, 2012 10:21 am
Location: Germany
Contact:

Re: GPS integration

Post by wolle »

for those who need a FW for the PA6B to "115200 baud 10Hz" or "115200 baud 5 Hz", you can download it here:

http://www.wii-copter.de/forum/downloads.php?cat=8

I have let me create it from the manufacturer.

Post Reply