GPS integration
Re: GPS integration
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
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
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: GPS integration
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.
Re: GPS integration
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?
Re: GPS integration
Where i have the "Arduino-twi-lib-patch" to put in? Found nothing where it have to copy.
Re: GPS integration
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
Re: GPS integration
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?
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?
Re: GPS integration
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:
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.
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.
Re: GPS integration
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.
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.
Re: GPS integration
Hi !
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.
It was intentional since 5sats are the bare minimum to fly with.
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.
Re: GPS integration
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?
Re: GPS integration
no testing today - wind and rain
Re: GPS integration
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.
Re: GPS integration
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;
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?
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?
Re: GPS integration
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!

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!
Re: GPS integration
Thnx EosBandi & Katch
With your latest rev. and katch's commands for navigatron,
it works (@ desk)

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?

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

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


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?


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.
Re: GPS integration
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.
Re: GPS integration
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.
Re: GPS integration
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!!!

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!
Re: GPS integration
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.
Re: GPS integration
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
It's awesome to see Hexa turn around by itself and slowly crawl back to home position, and stops there, sick!
(changed max speed to 200cm/s, and min speed to 50cm/s, 400cm/s seemed to much to me for first test flight)

needs PID tuning obviously, but good for first flight with new code. It didn't freeze mid-air

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

(changed max speed to 200cm/s, and min speed to 50cm/s, 400cm/s seemed to much to me for first test flight)
Re: GPS integration
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.
Re: GPS integration
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
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
Re: GPS integration
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![]()
It's awesome to see Hexa turn around by itself and slowly crawl back to home position, and stops there, sick!
(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

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
Re: GPS integration
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.
Re: GPS integration
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?
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?
Re: GPS integration
Hello,
where you need to copy the PID libs go?
I get an error message when you compile the scetch.
Greetings Wolfgang
where you need to copy the PID libs go?
I get an error message when you compile the scetch.
Greetings Wolfgang
Re: GPS integration
Ok, I got it back.
It works now! I'll test it later times.
It works now! I'll test it later times.
Re: GPS integration
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.
(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.
Re: GPS integration
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?

Is it normal that the gps module without which I move, the speed jumps back and forth?
Re: GPS integration
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.
http://www.wii-copter.de/forum/downloads.php?cat=8
I have let me create it from the manufacturer.
Re: GPS integration
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.
Thank you, Katch. But my problem is not AUX1,AUX2,AUX3,AUX4 setting. The button of "CALIB_MAG" and "CALIB_ACC" seems clicked, but not activate MAG calibration and ACC caribration.
I tried caribration from RC sticks, but ACC caribration not start, MAG caribration starts.
EOSBandi wrote: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.
Yes! of course I know! Thanks your development version, we can try and test it.
Re: GPS integration
getting good results today.
Back on my Paris v4 GY_86 (FreeIMU 0.4.3 clone) after sorting out the messed up eeprom issue.
Still need to play with the PID settings to get it locked in. It's hard doing it out in the field as I can't use my Android phone like I usually do (GPS settings currently unsupported)
Hold and RTH definitely working now just need to decrease the loiter area some.
I am still noticing the Quad make some pretty jerky movements when in position hold. I'm sure it would reduce the pendulum effect and the loiter area if we could smooth those correction out a little.
Back on my Paris v4 GY_86 (FreeIMU 0.4.3 clone) after sorting out the messed up eeprom issue.
Still need to play with the PID settings to get it locked in. It's hard doing it out in the field as I can't use my Android phone like I usually do (GPS settings currently unsupported)
Hold and RTH definitely working now just need to decrease the loiter area some.
I am still noticing the Quad make some pretty jerky movements when in position hold. I'm sure it would reduce the pendulum effect and the loiter area if we could smooth those correction out a little.
Re: GPS integration
Can you supply some more info. Please!GY_86 (FreeIMU 0.4.3 clone)
Re: GPS integration
@Katch, you can now edit GPS settings at the field. All GPS parameters are editable using LCD_CONFIG.
Re: GPS integration
yup don't have one.
go read the Chinese IMUs thread in development for info on that GY_86.
eBay search mpu6050 10 dof
go read the Chinese IMUs thread in development for info on that GY_86.
eBay search mpu6050 10 dof
Re: GPS integration
Hi Guys,
Just flown three packs in a light breeze. Solid poshold and realible RTH. For poshold take a note about the entering speed, the larger the speed when you inter into poshold, the bigger the pendulum will be, but it slows down after two/three swings.
Since I crashed my quad with i2c gps (it wasn't the code, rather the 30mhp wind
), i switched back to the tri with serial gps. I also implemented Jason's latest changes to the PID algorithms. Will upload it to the repo this evening.
I'll rebuild my quad and continue testing of the i2c part.But Unless there are some serious bug, it should work the same as the serial code.
EOSBandi
Just flown three packs in a light breeze. Solid poshold and realible RTH. For poshold take a note about the entering speed, the larger the speed when you inter into poshold, the bigger the pendulum will be, but it slows down after two/three swings.
Since I crashed my quad with i2c gps (it wasn't the code, rather the 30mhp wind

I'll rebuild my quad and continue testing of the i2c part.But Unless there are some serious bug, it should work the same as the serial code.
EOSBandi
Re: GPS integration
@ Katch, see this thread: viewtopic.php?f=7&t=1096
You don't need a specific MultiWii app. for your phone.
You can simply download an Android VT00 Terminal emulator for your phone.
http://www.androidzoom.com/android_appl ... boaja.html
In Config: #define #define LCD_CONF and #define LCD_VT100.
Voila!
You don't need a specific MultiWii app. for your phone.
You can simply download an Android VT00 Terminal emulator for your phone.
http://www.androidzoom.com/android_appl ... boaja.html
In Config: #define #define LCD_CONF and #define LCD_VT100.
Voila!
Re: GPS integration
@EOSBandi, will the PID settings then be similar to the values used in the On-line Simulator?
If yes, then we will need to format the LCD / OLED values to suit the number of decimal places....
In LCD.ino, replace:
with this:
If yes, then we will need to format the LCD / OLED values to suit the number of decimal places....
In LCD.ino, replace:
Code: Select all
#if GPS
&lcd_param_text80, &P8[PIDPOS] , &__RC,
&lcd_param_text81, &I8[PIDPOS] , &__I,
&lcd_param_text82, &P8[PIDPOSR], &__P,
&lcd_param_text83, &I8[PIDPOSR], &__RC,
&lcd_param_text84, &D8[PIDPOSR], &__I,
&lcd_param_text85, &P8[PIDNAVR], &__P,
&lcd_param_text86, &I8[PIDNAVR], &__RC,
&lcd_param_text87, &D8[PIDNAVR], &__I,
#endif
with this:
Code: Select all
#if GPS
&lcd_param_text80, &P8[PIDPOS] , &__RC,
&lcd_param_text81, &I8[PIDPOS] , &__I,
&lcd_param_text82, &P8[PIDPOSR], &__P,
&lcd_param_text83, &I8[PIDPOSR], &__RC,
&lcd_param_text84, &D8[PIDPOSR], &__RC,
&lcd_param_text85, &P8[PIDNAVR], &__P,
&lcd_param_text86, &I8[PIDNAVR], &__RC,
&lcd_param_text87, &D8[PIDNAVR], &__RC,
#endif
Re: GPS integration
But it's the same 
The precision for the GPS nav parameters will be the same as they have in the GUI
POS : .01 for P and .1 for I
POSR and NAVR : .1 for P .01 for I and .001 for D

The precision for the GPS nav parameters will be the same as they have in the GUI
POS : .01 for P and .1 for I
POSR and NAVR : .1 for P .01 for I and .001 for D
Re: GPS integration
@EOSBandi
it not the same
Wolle
it not the same

Code: Select all
...
&lcd_param_text84, &D8[PIDPOSR], &__RC,
...
&lcd_param_text87, &D8[PIDNAVR], &__RC,
...
Wolle
Re: GPS integration
are those checkboxes properly defined somewhere in code?

asking because if I activate LEVEL(aux1 to 1500PWM), it turns green, but nothing really happens, like model is in gyro mode still
only if I activate the baro with it(aux1 high), the model goes into level mode?
I'm not 100% sure,
need more testing, but seems to me like there is a bug in checkboxes maybe, flown 4 packs today and noticed that.
Before( in dev0504) switching from modes worked OK.


asking because if I activate LEVEL(aux1 to 1500PWM), it turns green, but nothing really happens, like model is in gyro mode still
only if I activate the baro with it(aux1 high), the model goes into level mode?
I'm not 100% sure,
need more testing, but seems to me like there is a bug in checkboxes maybe, flown 4 packs today and noticed that.
Before( in dev0504) switching from modes worked OK.
Re: GPS integration
dr.tom wrote:are those checkboxes properly defined somewhere in code?![]()
asking because if I activate LEVEL(aux1 to 1500PWM), it turns green, but nothing really happens, like model is in gyro mode still
only if I activate the baro with it(aux1 high), the model goes into level mode?
I'm not 100% sure,
need more testing, but seems to me like there is a bug in checkboxes maybe, flown 4 packs today and noticed that.
Before( in dev0504) switching from modes worked OK.
I think this is in MultiWii.ino around line number710,
Code: Select all
for(i=0;i<CHECKBOXITEMS;i++) {
rcOptions[i] = (
((rcData[AUX1]<1300) | (1300<rcData[AUX1] && rcData[AUX1]<1700)<<1 | (rcData[AUX1]>1700)<<2
|(rcData[AUX2]<1300)<<3 | (1300<rcData[AUX2] && rcData[AUX2]<1700)<<4 | (rcData[AUX2]>1700)<<5
|(rcData[AUX3]<1300)<<6 | (1300<rcData[AUX3] && rcData[AUX3]<1700)<<7 | (rcData[AUX3]>1700)<<8
|(rcData[AUX4]<1300)<<9 | (1300<rcData[AUX4] && rcData[AUX4]<1700)<<10| (rcData[AUX4]>1700)<<11) & activate[i])>0;
}
Finally I find my mistake about activate ACC and MAG from MultiWiiConf.
I need very long time push of "CALIB_ACC" or "CALIB_MAG" to activate caribration. Thanks all!
Re: GPS integration
Well, I did not touch that part of the code at all. Did you erase your EEPROM before uploading latest dev code ?
Re: GPS integration
I have just tested the r26 code of EOSBandi in my Mini hexa with i2c GPS (Arduino nano + Locosys 10Hz GPS) and it just works awesome with even stock PIDs!
I didn't make any modifications except I reduced the loiter speed to 250 instead of 400.
After activatind the position hold, it stays in stable hoovering positions, in gusts there is only some small and slow overruns, and when activating the RTH, it starts to mode to home position immediatelly and slows down near home then calms down over start point...
Currently, during RTH, it rotates toe head of the copter to the startup direction, not to the home point. If I remember right, somewhere I read that it should turn towards to home point and when home is reached, it turns to the startup direction. EOSBandi, could this be activated via Defines???
There is only one issue!!! For me, the MAC version of the gui doesn't work, it doesn't starts (OSX Lion).
Could somebody who has a MAC help and compile working one?
BR
Adrian
PS.: This code just rocks!!!!!! really good job!!!!!!!!!! THANKS
I didn't make any modifications except I reduced the loiter speed to 250 instead of 400.
After activatind the position hold, it stays in stable hoovering positions, in gusts there is only some small and slow overruns, and when activating the RTH, it starts to mode to home position immediatelly and slows down near home then calms down over start point...
Currently, during RTH, it rotates toe head of the copter to the startup direction, not to the home point. If I remember right, somewhere I read that it should turn towards to home point and when home is reached, it turns to the startup direction. EOSBandi, could this be activated via Defines???
There is only one issue!!! For me, the MAC version of the gui doesn't work, it doesn't starts (OSX Lion).
Could somebody who has a MAC help and compile working one?
BR
Adrian
PS.: This code just rocks!!!!!! really good job!!!!!!!!!! THANKS
Re: GPS integration
nhadrian wrote:Currently, during RTH, it rotates toe head of the copter to the startup direction, not to the home point. If I remember right, somewhere I read that it should turn towards to home point and when home is reached, it turns to the startup direction. EOSBandi, could this be activated via Defines???
In the config.h file there are three defines
#define NAV_CONTROLS_HEADING true // copter points to the actual navigational bearing during RTH - this is the bearing corrected with cross track error
#define NAV_TAIL_FIRST false // true - copter comes in with tail first, false-head first
#define NAV_SET_TAKEOFF_HEADING true // true - when copter arrives to home position it rotates it's head to takeoff direction
Re: GPS integration
I've try to fly with this dev but it is quite nervous. I've checked in qui and when quad is on the table with motors disabled I have a lot of noise on gyro. When I enable MMGYRO fittering (btw. this is really good filtering for gyro!) it is ok, but I tried to find why and I think I found. I printed annex650_overrun_count in debug and this happens very often. So idea with 650us is not working is not working, I don't have Idea why it is 650us because if we want to read two samples we need to wait 1250us between two samples. i know first is read to late and maybe this is the problem....
I think we should change long i2c read for gyro, there is about 30bytes to read and it will hake about > 600us so it is too much for MWC idle - it don't like jitter for cycle time, or fix IMU calculation.
But yesterday I've tested in really windy evening and works! make huge circles but it is reeeeally windy evening.
Thanks for your job EOSBandi.
Edit.
Fly test with MMGyro not helps
Still a loot of random wooble. My setup:
#define L3G4200D
#define ADXL345
#define HMC5883
#define MS561101BA
#define MS561101BA_ADDRESS 0xEC
#define I2C_GPS //I2C GPS and Navi modul
#define MMGYRO
#define MMGYROVECTORLENGHT 10
#undef VBAT
#undef LCD_CONF
I think we should change long i2c read for gyro, there is about 30bytes to read and it will hake about > 600us so it is too much for MWC idle - it don't like jitter for cycle time, or fix IMU calculation.
But yesterday I've tested in really windy evening and works! make huge circles but it is reeeeally windy evening.
Thanks for your job EOSBandi.
Edit.
Fly test with MMGyro not helps

#define L3G4200D
#define ADXL345
#define HMC5883
#define MS561101BA
#define MS561101BA_ADDRESS 0xEC
#define I2C_GPS //I2C GPS and Navi modul
#define MMGYRO
#define MMGYROVECTORLENGHT 10
#undef VBAT
#undef LCD_CONF
Re: GPS integration
R27, MultiWiiConf application.windows32 seems broken.
The electrocardiogram says copter dead
But can use R26.
The electrocardiogram says copter dead

But can use R26.
Re: GPS integration
Y.Mita wrote:R27, MultiWiiConf application.windows32 seems broken.
The electrocardiogram says copter dead![]()
But can use R26.
Sorry r27 is compiled for 57600 baud...
Re: GPS integration
marbalon wrote:I've try to fly with this dev but it is quite nervous. I've checked in qui and when quad is on the table with motors disabled I have a lot of noise on gyro. When I enable MMGYRO fittering (btw. this is really good filtering for gyro!) it is ok, but I tried to find why and I think I found. I printed annex650_overrun_count in debug and this happens very often. So idea with 650us is not working is not working, I don't have Idea why it is 650us because if we want to read two samples we need to wait 1250us between two samples. i know first is read to late and maybe this is the problem....
I think we should change long i2c read for gyro, there is about 30bytes to read and it will hake about > 600us so it is too much for MWC idle - it don't like jitter for cycle time, or fix IMU calculation.
But yesterday I've tested in really windy evening and works! make huge circles but it is reeeeally windy evening.
Edit.
Fly test with MMGyro not helpsStill a loot of random wooble. My setup:
#define L3G4200D
#define ADXL345
#define HMC5883
#define MS561101BA
#define MS561101BA_ADDRESS 0xEC
#define I2C_GPS //I2C GPS and Navi modul
#define MMGYRO
#define MMGYROVECTORLENGHT 10
#undef VBAT
#undef LCD_CONF
Well, it's interesting theory, but the GPS code is not in the annexCode loop, but in the main loop. Yes, it increases the cycle time, but that cycle time is taken into consideration for IMU calculations automatically. Just to make it sure, did you tried the "vanilia" MultiWii20120504 release ? Is it flies without wobbles with that version?
Re: GPS integration
Btw, if you don't need GPS coordinate and home distance and orientation display, just try to comment out those reads... for navigation
the I2C_GPS_NAV_BEARING, I2C_GPS_NAV_LAT and I2C_GPS_NAV_LON registers are enough. Thats about 8 byte (including status)
the I2C_GPS_NAV_BEARING, I2C_GPS_NAV_LAT and I2C_GPS_NAV_LON registers are enough. Thats about 8 byte (including status)