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
little nellie
Posts: 33
Joined: Mon Jun 11, 2012 6:44 pm

Re: GPS integration

Post by little nellie »

Sympster wrote:Check out the documentation file here: http://code.google.com/p/i2c-gps-nav/downloads/list

From that file: "If you use i2c-gps, you can watch the status led on the i2c-board. (this is the blue led on Navigatron).
* 3 short flash at startup * blinks once per second if GPS is sending data but no position lock yet * blinks twice fast, then off for a second if GPS 2D position is available * blinks 3 times fast, then off for a second if GPS 3D position is available * or goes on for a second, off for a second, (long pulse) if not getting any NEMA sentences for over 5 seconds"


For UBlox GPS setup: http://diydrones.com/profiles/blogs/tutorial-programming-your?xg_source=activity
and this: http://fpvcentral.net/2012/07/crius-all-in-one-gps-and-installation-howto-multiwii-part-1/


Yes, I had read all these docs, There is no blue LED in the i2c board, only yellow LED. The yellow LED blink once every second.

As for the GPS module, using the ublox s/w as listed in fpvcentral.. The GPS is sending data out of it's serial port and locking on 3D/DGPS. So, at least for that part, I am able to confirm that is working. I have no means to verify what the i2c board is doing. I already flash the board with the code many times and with different define to see if it make any changes..

BTW, should the protocol set to NEMA or UBLOX?

Any idea how to verify what the i2c board is doing?

thanks for your time.

Board being used are CRIUS SE v0.2, CRIUS GPS serial, CRIUS i2C NAV board

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

Re: GPS integration

Post by dr.tom »

I've flew my last model with flytron i2c gps, it worked great,
now it is out of stock for over a month and I need new sensor for some other model.

is this compatible? looks like it should work
http://www.flytron.com/osd-headtrackers ... odule.html
+
http://www.rctimer.com/index.php?gOo=go ... oductname=

Thanks :)

little nellie
Posts: 33
Joined: Mon Jun 11, 2012 6:44 pm

Re: GPS integration

Post by little nellie »

@ dr.tom, The flytron looks like a serial GPS?? no??

Did you connect that to the rctimer i2C board? if yes, what code are you using on the i2c?

thanks for your time.

Board currently being used are CRIUS SE v0.2, CRIUS GPS serial, CRIUS i2C NAV board

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

Re: GPS integration

Post by dr.tom »

2 little nellie:
yes, the one linked is serial GPS, but I don't have it yet, considering to order it if it turns out compatible...
the gps module on rctimer page has some flaws that EOSBandi described in his guide some pages before.
most of all it needs eeprom chip to be usefull (to not forget it's settings after 10mins)

I've flown only i2c version of navigatron, it worked great. eos bandi code r26, latest at that time.
http://www.youtube.com/watch?v=F1z1Fq6r ... ture=g-upl

i believe this combo 2 posts up should work same,
because atmel is only dislocated on a cable, not diretcly on navigatron, else looks same.

maybe it will even be better,
because on i2c version I had to desolder some pins to get it programmed successfuly.
Image

viewtopic.php?f=8&t=649&p=16244&hilit=paper#p16244
dunno if that's the reason why they are out of stock for so long? product improvement? :?:

little nellie
Posts: 33
Joined: Mon Jun 11, 2012 6:44 pm

Re: GPS integration

Post by little nellie »

2 dr.tom,
Thanks for the info, what MultiWii board are you using?

According to RCTimer's picture of their i2c interface at their website, it is pluged into the CRIUS SE board's UART port. Can someone confirm if this is correct?

Thanks for your time.

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

Re: GPS integration

Post by jevermeister »

Copying PID values won't help you.Every copter has his own characteristics, based on motors , props, esc and frame characteristics.PID working for my copter mwy not work for yours at all.

nils

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

Re: GPS integration

Post by dr.tom »

little nellie wrote:2 dr.tom,
Thanks for the info, what MultiWii board are you using?

According to RCTimer's picture of their i2c interface at their website, it is pluged into the CRIUS SE board's UART port. Can someone confirm if this is correct?

Thanks for your time.



I had navigatron i2c soldered to Crius SE board, (via wires offcourse, not directly).
because crius SE doesn't have i2c pins, so it can't be just plugged in

you have to take care which voltage option are you choosing, low or high side of LLC,
also make changes on navigatron, because of battery charging.
I opted for 5V so added a LED on navigatron, and soldered it on crius this way. it worked :)

Image

for 3.3V I believe this is the way
Image

on crius LE pins are already there, and on newest (smaller crius SE, i believe they call it 1.0 ) and offcourse on
most recent and best Crius AIO PRO with mega onboard.

there is an option of using serial gps on crius(328atmel) over serial connection, but you cannot use gui at the same time.
Last edited by dr.tom on Sun Jul 22, 2012 10:20 am, edited 1 time in total.

Tazzy
Posts: 75
Joined: Sun Jun 19, 2011 4:45 pm
Location: Sweden

Re: GPS integration

Post by Tazzy »

jevermeister wrote:Copying PID values won't help you.Every copter has his own characteristics, based on motors , props, esc and frame characteristics.PID working for my copter mwy not work for yours at all.

nils


I know Nils BUT you can compare the relationship between role and pitch on your copter and the other copter and get a hint which way you should go with the other values.

// Tazzy

ReM
Posts: 14
Joined: Sun Jul 08, 2012 12:02 pm
Location: Lithuania

Re: GPS integration

Post by ReM »

EOSBandi wrote:
ReM wrote:I rewrote MTK firmware (AXN1.51_2722_3329_384.1151100.5) and tried to use MTK binary protocol. But in flight I saw big position overshots. GPS effect was too big. Deviations has been increasing...
Before this I used the same GPS module, NMEA protocol, 5Hz. PH and RTH was working very well. PID was the same in both situations.
I tried to decrease PH P to 1, but overshots also were.


Use 5Hz, it seems that MTK is NOT capable of 10Hz with a Binary protocol...
Also try to switch off GPS_FILTERING


I tried 5Hz - no difference.
I tried return to NMEA 5Hz and very surprised. If I turn on PH, quad drifts about 3 meters in wind direction and very fast and strong tilt in right direction. Flight about 5-6 meters and strong tilt back.
In both ways - GPS filtering off.
I connect bluetooth and tried walking 30-40 meters around computer - I see correct coordinates in map (WinGUI).

ronang
Posts: 1
Joined: Tue Jan 17, 2012 3:38 pm

Re: GPS integration

Post by ronang »

Hi Guys,
I have a Crius 1.0 board with RCTimer I2C board with RCTimer GPS. I am having problems getting the GPS configurations to stick to my board. It looses the configurations even though I saved the configurations in U Center.

Do you think that there is a problem with the EEPROM? I can get the Crius board to work on MW 2.1 if I quickly transfer the GPS module after configuration with U Center. But as soon as it looses power for a few minutes the settings go back to the original ones that it came with.

JirkaA
Posts: 11
Joined: Mon Jul 16, 2012 5:41 pm
Location: near Brno, Czech Republic
Contact:

Re: GPS integration

Post by JirkaA »

ronang wrote:Hi Guys,
I have a Crius 1.0 board with RCTimer I2C board with RCTimer GPS. I am having problems getting the GPS configurations to stick to my board. It looses the configurations even though I saved the configurations in U Center.

Do you think that there is a problem with the EEPROM? I can get the Crius board to work on MW 2.1 if I quickly transfer the GPS module after configuration with U Center. But as soon as it looses power for a few minutes the settings go back to the original ones that it came with.


this question was discussed here several times during last few days. What about read topic little bit before asking?
There is no config EEPROM in Crius GPS module, that's all. Some solutions are discussed here.

JirkaA
Posts: 11
Joined: Mon Jul 16, 2012 5:41 pm
Location: near Brno, Czech Republic
Contact:

Re: GPS integration

Post by JirkaA »

I have new observation about Crius GPS module issue - no start after power-up.
When you connect power first time, module send some initial info like this:

Code: Select all

??:??:??  $GPTXT,01,01,02,u-blox ag - www.u-blox.com*50
??:??:??  $GPTXT,01,01,02,HW  UBX-G60xx  00040007 FF7FFFFFp*53
??:??:??  $GPTXT,01,01,02,ROM CORE 7.03 (45969) Mar 17 2011 16:18:34*59

and freeze. After power cycle for short time, module continue in normal work. I take a look to module datasheet and there is information about Boot-time configuration, there are 4 modes selected by two configuration pins. Default is first one, when both config pins are open. The second mode have note about USB power "self powered" instead of "bus powered" in other modes. So i was try select second mode by grounding pin 14 CFG_COM0 (it is so easy, because neighbor pin 13 is GND, so little drop of solder between those two pins is enough). Default COM speed is now 38400 Bd, but BINGO!!! Module works immediately after first power-on without any issue. I guess that it is first step to make Crius GPS usable :)

Which pins you have to short? Look at bottom side of module, connector on left side, text on u-blox module in correct position (not upside down), pins 13 and 14 are located on top right corner of module. Please use good soldering station or ask experienced colleague in case if you have not soldering skills ;)

krystal
Posts: 12
Joined: Fri Mar 30, 2012 2:06 am

Re: GPS integration

Post by krystal »

JirkaA wrote:I have new observation about Crius GPS module issue - no start after power-up.
When you connect power first time, module send some initial info like this:

Code: Select all

??:??:??  $GPTXT,01,01,02,u-blox ag - www.u-blox.com*50
??:??:??  $GPTXT,01,01,02,HW  UBX-G60xx  00040007 FF7FFFFFp*53
??:??:??  $GPTXT,01,01,02,ROM CORE 7.03 (45969) Mar 17 2011 16:18:34*59

and freeze. After power cycle for short time, module continue in normal work. I take a look to module datasheet and there is information about Boot-time configuration, there are 4 modes selected by two configuration pins. Default is first one, when both config pins are open. The second mode have note about USB power "self powered" instead of "bus powered" in other modes. So i was try select second mode by grounding pin 14 CFG_COM0 (it is so easy, because neighbor pin 13 is GND, so little drop of solder between those two pins is enough). Default COM speed is now 38400 Bd, but BINGO!!! Module works immediately after first power-on without any issue. I guess that it is first step to make Crius GPS usable :)

Which pins you have to short? Look at bottom side of module, connector on left side, text on u-blox module in correct position (not upside down), pins 13 and 14 are located on top right corner of module. Please use good soldering station or ask experienced colleague in case if you have not soldering skills ;)


Thank you. Good solution.
JirkaA Is there any difirence between Bd 38400 and 115000?
We have to change Bd in I2C converter and in FC i2c speed to 38400 too?
I think you mean top LEFT corner not right?
Image

toxik31
Posts: 3
Joined: Mon Jul 23, 2012 2:18 pm

Re: GPS integration

Post by toxik31 »

Hello everybody,

I use the following GPS (http://www.drotek.fr/shop/en/90-pa6c-gps-llc.html) in NEMA mode.
It is based on the MT3339 from MediaTek.
Automatic configuration for MTK Binary protocol (must use the AXN1.51_2722_3329_384.1151100.5 firmware which can be found in the updated FirmWare tools package)


mt3329 can be used with binary Protocol if we flash a new compliant firmware.
Can I use the binary protocol with the MT3339?
Has anyone a compliant firmware for the MT3339?

Thank you

Fred

little nellie
Posts: 33
Joined: Mon Jun 11, 2012 6:44 pm

Re: GPS integration

Post by little nellie »

dr.tom wrote:I had navigatron i2c soldered to Crius SE board, (via wires offcourse, not directly).
because crius SE doesn't have i2c pins, so it can't be just plugged in

you have to take care which voltage option are you choosing, low or high side of LLC,
also make changes on navigatron, because of battery charging.
I opted for 5V so added a LED on navigatron, and soldered it on crius this way. it worked :)

Image

for 3.3V I believe this is the way
Image

on crius LE pins are already there, and on newest (smaller crius SE, i believe they call it 1.0 ) and offcourse on
most recent and best Crius AIO PRO with mega onboard.

there is an option of using serial gps on crius(328atmel) over serial connection, but you cannot use gui at the same time.


2 dr.tom, thanks for the tip, I wired a plug to these taps and MultiWii now reports the GPS data. The document of the CRIUS v0.2 board I can find online doesn't make sense with what RCTimer photo show the i2c plug into the uart. Yours makes a lot more sense and best of all, it works. thanks again for removing my headaches.
Last edited by little nellie on Mon Jul 23, 2012 6:14 pm, edited 1 time in total.

little nellie
Posts: 33
Joined: Mon Jun 11, 2012 6:44 pm

Re: GPS integration

Post by little nellie »

ronang wrote:Hi Guys,
I have a Crius 1.0 board with RCTimer I2C board with RCTimer GPS. I am having problems getting the GPS configurations to stick to my board. It looses the configurations even though I saved the configurations in U Center.

Do you think that there is a problem with the EEPROM? I can get the Crius board to work on MW 2.1 if I quickly transfer the GPS module after configuration with U Center. But as soon as it looses power for a few minutes the settings go back to the original ones that it came with.


Mine does the same of loosing config after power down. Went right back to 9600 baud. Here is what I noticed and how I got past this issues. There is a small battery on the RCTimer GPS board, most likley it was not charged before they shipped the board. I left the GPS powered up all night.. the next morning, after power down and restart, using the U Center s/w, it still holds the config. Hope this solves your problem.

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

Re: GPS integration

Post by dr.tom »

glad to hear that,
it would be great if you could test if battery would hold from weekend to another(6-7 days),
that's about as long as we put our models unpowered,

if it can only hold a day or two... it's too short. EOSBandi EEPROM hack is 'a must' then.
thanks

User avatar
brettwal
Posts: 93
Joined: Mon Jun 18, 2012 4:51 pm
Location: Louisiana

Re: GPS integration

Post by brettwal »

I may have missed it but, I didn't specifically see this.

Anyone know how to put a UBlox NEO-6M running FW 7.03 into binary mode? EOSBandi's file is apparently for an older version of FW.

little nellie
Posts: 33
Joined: Mon Jun 11, 2012 6:44 pm

Re: GPS integration

Post by little nellie »

dr.tom wrote:glad to hear that,
it would be great if you could test if battery would hold from weekend to another(6-7 days),
that's about as long as we put our models unpowered,

if it can only hold a day or two... it's too short. EOSBandi EEPROM hack is 'a must' then.
thanks


or replace the ML614S with a ML2016..

I recall reading someone writing some code to reblast the ublox with the i2c interface, have not been able to locate. Anyone seen that?

User avatar
TermicOne
Posts: 15
Joined: Wed Jul 04, 2012 9:13 pm
Location: Italy - Milan

Re: GPS integration

Post by TermicOne »

Today RTH tests. I've done a dozen RTH tests driving the quad more and more distant, switching to Pos Hold and then to RTH. From RTH point I've NEVER used the TX sticks and the quad always came back to home position, rotating head to initial position...really impressive!

This is a video of the first tests. The last one using FPV to drive the quad pretty far before switching RTH.

http://www.youtube.com/watch?v=fi8amsVH1IM

Thanks again to all developers of this great software!!!

Luciano

User avatar
brettwal
Posts: 93
Joined: Mon Jun 18, 2012 4:51 pm
Location: Louisiana

Re: GPS integration

Post by brettwal »

I have Crius AIO Pro and the RCTimer i2c m 6Module flashed with the latest code and have UBLOX selected in config.h I have a UBlox Neo 6 attached to it. I do not get any GPS data. I can connect to the GPS with UBlox and get a 3D Fix and see the binary data. Any idea why I'm not passing data from the GPS-i2C-Crius-Gui ????


Nevermind: Code was corrupt on i2c module. Have it up and running now.
Last edited by brettwal on Tue Jul 24, 2012 4:35 pm, edited 2 times in total.

flyrobot
Posts: 73
Joined: Thu Apr 05, 2012 3:59 pm

Re: GPS integration

Post by flyrobot »

Hi Luciano,

Can you share what GPS do you use?

Thanks,

John

User avatar
TermicOne
Posts: 15
Joined: Wed Jul 04, 2012 9:13 pm
Location: Italy - Milan

GPS integration

Post by TermicOne »

flyrobot wrote:Can you share what GPS do you use?


Hi John! I'm using this GPS

http://www.rctimer.com/index.php?gOo=go ... oductname=

but I'm not very happy with it as it looses very often configuration data and to make it working you have always to switch it on/off a couple of time.

Luciano

JirkaA
Posts: 11
Joined: Mon Jul 16, 2012 5:41 pm
Location: near Brno, Czech Republic
Contact:

Re: GPS integration

Post by JirkaA »

TermicOne wrote: I'm using this GPS

http://www.rctimer.com/index.php?gOo=go ... oductname=

but I'm not very happy with it as it looses very often configuration data and to make it working you have always to switch it on/off a couple of time.

Luciano


I describe my solution here> viewtopic.php?f=8&t=2124&p=19570#p19570

flyrobot
Posts: 73
Joined: Thu Apr 05, 2012 3:59 pm

Re: GPS integration

Post by flyrobot »

TermicOne wrote:
flyrobot wrote:Can you share what GPS do you use?


Hi John! I'm using this GPS

http://www.rctimer.com/index.php?gOo=go ... oductname=

but I'm not very happy with it as it looses very often configuration data and to make it working you have always to switch it on/off a couple of time.

Luciano


I saw its quite good position hold with this cheap GPS. I think it would be more precise with this GPS http://www.rctimer.com/index.php?gOo=go ... oductname=

But i hate the price, its make me think buy another MKGPS 2.1 with GPS shield. Those using ublox LEA 6. I have MKGPS but no have time to try with MWC yet. I like your copter fly with pos hold and RTH, if it change to LEA 6 with GPS shield and bigger antenna like 32x32 probably its on par with NAZA.

User avatar
brettwal
Posts: 93
Joined: Mon Jun 18, 2012 4:51 pm
Location: Louisiana

Re: GPS integration

Post by brettwal »

I have the GPS below working via i2c.

http://www.ebay.com/itm/130723245783?ss ... 1497.l2649

User avatar
TermicOne
Posts: 15
Joined: Wed Jul 04, 2012 9:13 pm
Location: Italy - Milan

Re: GPS integration

Post by TermicOne »

JirkaA wrote:I describe my solution here> viewtopic.php?f=8&t=2124&p=19570#p19570


Thanks JirkaA...I do have seen your solution...but I understand it is only for GPS connected thru I2C.
My GPS is not I2C but it is connected thru serial port #2 (only ground and tx connected to ground-rx on the board).

Am I correct?

User avatar
TermicOne
Posts: 15
Joined: Wed Jul 04, 2012 9:13 pm
Location: Italy - Milan

Re: GPS integration

Post by TermicOne »

flyrobot wrote:I saw its quite good position hold with this cheap GPS. I think it would be more precise with this GPS http://www.rctimer.com/index.php?gOo=go ... oductname=

But i hate the price, its make me think buy another MKGPS 2.1 with GPS shield. Those using ublox LEA 6. I have MKGPS but no have time to try with MWC yet. I like your copter fly with pos hold and RTH, if it change to LEA 6 with GPS shield and bigger antenna like 32x32 probably its on par with NAZA.


IMHO the goal of RTH is to bring my quad back if I loose FPV video signal or if I am in some kind of emergency and I can't drive it. In this situation I do not really need the quad exactly on home position ...even if it comes some meters from home it's great and I save the model!!!

Luciano

User avatar
TermicOne
Posts: 15
Joined: Wed Jul 04, 2012 9:13 pm
Location: Italy - Milan

Re: GPS integration

Post by TermicOne »

After some RTH tests using FPV I feel that, as in FPV the quad is pretty far, would be really nice to speed up RTH speed in order to come back before batteries go off.

After reading the great EOSbandi wiki I was looking for #define NAV_SPEED_MAX but I'm not able to find it in the source 2.1 I'm using.

Does anybody know if there is any other way to have more speed during RTH?

Luciano

mr.rc-cam
Posts: 457
Joined: Wed Jul 27, 2011 11:36 pm

Re: GPS integration

Post by mr.rc-cam »

After reading the great EOSbandi wiki I was looking for #define NAV_SPEED_MAX but I'm not able to find it in the source 2.1 I'm using.

In the V2.1 that I have the NAV_SPEED_MAX is found in GPS.ino

- Thomas

p25o1
Posts: 33
Joined: Thu Mar 29, 2012 3:19 pm

Re: GPS integration

Post by p25o1 »

brettwal wrote:I have the GPS below working via i2c.

http://www.ebay.com/itm/130723245783?ss ... 1497.l2649


i just visited the site, i don't see the i2c pins on the board,,

can you elaborate on how you got it to work on i2c plz

i'm looking for a working i2c gps module , since my wmc has only 1 i2c port free , and i'm using the serial for gui :?

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: GPS integration

Post by crashlander »

Hello,
in accordance to http://www.universalair.co.uk/sites/def ... asheet.pdf page 10. If we ground CFG_COM1 and CFG_COM0 (pins 14 and 15) we already get 57600 baud and UBLOX binary data at startup so we only need to change refresh rate to 5Hz (page 6 states that as maximum) (as in viewtopic.php?f=8&t=2124#p19570) and we don't need external EEPROM!?
Comments please!

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

Re: GPS integration

Post by EOSBandi »

crashlander wrote:Hello,
in accordance to http://www.universalair.co.uk/sites/def ... asheet.pdf page 10. If we ground CFG_COM1 and CFG_COM0 (pins 14 and 15) we already get 57600 baud and UBLOX binary data at startup so we only need to change refresh rate to 5Hz (page 6 states that as maximum) (as in viewtopic.php?f=8&t=2124#p19570) and we don't need external EEPROM!?
Comments please!


What about the SBAS settings ?

User avatar
TermicOne
Posts: 15
Joined: Wed Jul 04, 2012 9:13 pm
Location: Italy - Milan

Re: GPS integration

Post by TermicOne »

mr.rc-cam wrote:
After reading the great EOSbandi wiki I was looking for #define NAV_SPEED_MAX but I'm not able to find it in the source 2.1 I'm using.

In the V2.1 that I have the NAV_SPEED_MAX is found in GPS.ino

- Thomas


Thank you Thomas!
Next days I am going to try to raise the value NAV_SPEED_MAX from 300 to 400 or even more in order to have more speed during RTH.

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: GPS integration

Post by crashlander »

EOSBandi wrote:
What about the SBAS settings ?


I'm not a "power" user of that module so I was just asking if it is possible to go into that direction.
So I confess that I don't understand your question. :oops:

I'f this is not an option would ATMEL's EEPROM (http://www.ic-elect.si/pub/files/produc ... 320201.pdf) work as external memory for NEO 6?

User avatar
brettwal
Posts: 93
Joined: Mon Jun 18, 2012 4:51 pm
Location: Louisiana

Re: GPS integration

Post by brettwal »

p25o1 wrote:
brettwal wrote:I have the GPS below working via i2c.

http://www.ebay.com/itm/130723245783?ss ... 1497.l2649


i just visited the site, i don't see the i2c pins on the board,,

can you elaborate on how you got it to work on i2c plz

i'm looking for a working i2c gps module , since my wmc has only 1 i2c port free , and i'm using the serial for gui :?




There are no pins on the board, you have to add them. The board is also not i2c, it is serial. I connected it to the i2c module from RCTimer and then connected the i2c module to my Crius AIO Pro.

User avatar
captaingeek
Posts: 228
Joined: Fri Jan 28, 2011 6:42 pm

Re: GPS integration

Post by captaingeek »

i just so happen to have a spare pro mini and a gps antenna. hmmm.

Mis
Posts: 203
Joined: Fri Apr 01, 2011 12:23 am

Re: GPS integration

Post by Mis »

Why do you want to connect GPS via I2C to AIO Pro controller :?: This board have FOUR serial ports (UART's), and we can connect directly an GPS module to serial 2 port on AIO board.

User avatar
brettwal
Posts: 93
Joined: Mon Jun 18, 2012 4:51 pm
Location: Louisiana

Re: GPS integration

Post by brettwal »

Mis wrote:Why do you want to connect GPS via I2C to AIO Pro controller :?: This board have FOUR serial ports (UART's), and we can connect directly an GPS module to serial 2 port on AIO board.


1. To offload the calculations from the FC processor
2. I do not yet know how to configure a UBLOX Neo-6 for the right Update rate and baudrate and binary mode with it being connected to a serial port. Ideally, this is how I would like it connected, I just haven't figured it out yet.

Mac9
Posts: 45
Joined: Thu Oct 20, 2011 2:47 pm
Contact:

Re: GPS integration

Post by Mac9 »

Hi All,
Problem with I2C_GPS_NAV-v2.1rc when I uncomment "#define NEMA" in the config.h file the sketch fails to compile giving an "expected "}" at end of input" error message in the IC2_CPS_NAV module. The cursor indicating the error being placed after the last curly brace in the file. If I comment out that NEMA define in the config.h file, then the sketch compiles OK. Am I missing the point ? should the NEMA sentence be defined or is their some error deep in the syntax that my untrained eye can not detect ?

Hope some one can help as at last I seem to be getting some positive results for all my hours of fun :roll:

Regards

John

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

Re: GPS integration

Post by EOSBandi »

Mac9 wrote:Hi All,
Problem with I2C_GPS_NAV-v2.1rc when I uncomment "#define NEMA" in the config.h file the sketch fails to compile giving an "expected "}" at end of input" error message in the IC2_CPS_NAV module. The cursor indicating the error being placed after the last curly brace in the file. If I comment out that NEMA define in the config.h file, then the sketch compiles OK. Am I missing the point ? should the NEMA sentence be defined or is their some error deep in the syntax that my untrained eye can not detect ?

Hope some one can help as at last I seem to be getting some positive results for all my hours of fun :roll:

Regards

John

You are doing something wrong. Try getting the code again. I compiles just fine with #define NMEA on Arduino 1.0.1

Mac9
Posts: 45
Joined: Thu Oct 20, 2011 2:47 pm
Contact:

Re: GPS integration

Post by Mac9 »

Hi EOSBandi,

"You are doing something wrong. Try getting the code again. I compiles just fine with #define NMEA on Arduino 1.0.1"

Thanks for your rapid reply. I have down loaded I2C_GPS_NAV-v2.1rc again on two different computers, laptop and desktop, both running Win 7. I also downloaded Arduinio 1.0.1 again on to the laptop. Still the same problem after 4 tries. With #define NEMA commented all is well, with it un commented same error. So i decided to "have a go" at the syntax, probable stupid of me as: a. I am no programmer and b. I known very little about C++. I now find that if I delete the curly brace at the of line 1250 "if (GPS_NMEA_newFrame(Serial.read()))" then the sketch compiles and down loads without a problem. I am, however afraid that I may have changed the logic of the program and hence stopped it from working as designed.I have as yet not had time to fly the Navigatron with soft ware down loaded but unless you tell me this would be unwise I will do so On Sunday. Thanks again for your responce so far I am looking forward to hearing your thoughts.

Regards

John

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

Re: GPS integration

Post by mOuchadino »

:D :lol: multiwii good jOb...

UblOx change setting use 3.3v life :D

http://www.youtube.com/watch?v=pJDfFmeB-Ec

carlonb
Posts: 210
Joined: Sun Apr 03, 2011 6:29 pm

Re: GPS integration

Post by carlonb »

Hi guys,
As my Serial GPS from flytron has default 9600 bps and NMEA strings CGA,GSA,GSV,RMC,VTG and update rate 1Hz how can I change these settings with 38400 bps, NMEA strings CGA, RMC only and update rate at 5Hz ?
I used it successfully with DIY OSD made by Dennis Frie and he used this code in setup:

// Used to set the GPS update-rate to 5 hz, and GPGGA and GPRMC gps-strings (Only for MKT-GPS).
Serial.print("$PMTK300,200,0,0,0,0*2F");
Serial.write(13);
Serial.write(10);

Serial.print("$PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28");
Serial.write(13);
Serial.write(10);
/////////////////////////////////////
How can I send this strings with MWii 2.1 new serial routines ?
Of course, I know that now MWii 2.1 code/HW use only RX line, but I can add also the TX line in order to trasmit the setup strings to GPS unit.

Hope someone C guru may help me
Thanks, Carlo

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

Re: GPS integration

Post by EOSBandi »

Mac9 wrote:Hi EOSBandi,

"You are doing something wrong. Try getting the code again. I compiles just fine with #define NMEA on Arduino 1.0.1"

Thanks for your rapid reply. I have down loaded I2C_GPS_NAV-v2.1rc again on two different computers, laptop and desktop, both running Win 7. I also downloaded Arduinio 1.0.1 again on to the laptop. Still the same problem after 4 tries. With #define NEMA commented all is well, with it un commented same error. So i decided to "have a go" at the syntax, probable stupid of me as: a. I am no programmer and b. I known very little about C++. I now find that if I delete the curly brace at the of line 1250 "if (GPS_NMEA_newFrame(Serial.read()))" then the sketch compiles and down loads without a problem. I am, however afraid that I may have changed the logic of the program and hence stopped it from working as designed.I have as yet not had time to fly the Navigatron with soft ware down loaded but unless you tell me this would be unwise I will do so On Sunday. Thanks again for your responce so far I am looking forward to hearing your thoughts.

Regards
John


Code: Select all

/* GPS protocol 
 * NMEA  - Standard NMEA protocol GGA, GSA and RMC  sentences are needed
 * UBLOX - U-Blox binary protocol, use the ublox config file (u-blox-config.ublox.txt) from the source tree
 * MTK   - MTK binary protocol with auto setup, load (AXN1.51_2722_3329_384.1151100.5.bin) firmware to the GPS module (MTK3329 chips only)
 * With MTK and UBLOX you don't have to use GPS_FILTERING in multiwii code !!!
 *
 */

//#define NMEA
//#define UBLOX
//#define MTK


Are you sure that you uncommented ONLY one protocol ?

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

Re: GPS integration

Post by mOuchadino »

:D :D
Crius SE upgrade v2.1 + I2c GPs with modif sda/scl pin

http://www.youtube.com/watch?feature=pl ... gJv5VW4yJc

thx multiwii forum.....

Olympian
Posts: 12
Joined: Wed Jan 11, 2012 4:07 pm

Re: GPS integration

Post by Olympian »

I have just loaded a Crius SE board with Multiwii ver. 2.1 and have connected a Navigatron I2C gps board.

Multiwii config is showing strange GPS values that don't agree with the NMEA sentences that the Navigration has.

At present the Navigatron is giving my proper NMEA Lat & Lon on its serial output.. at 1 Hz.

3438.4498,N,08632.8157,W,1

but Config reads

alt = 0
lat = 13565952
Lon = 192212992
speed =0
sat =7
and doesn't show any I2C errors.

What am I doing wrong????

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

Re: GPS integration

Post by EOSBandi »

Olympian wrote:I have just loaded a Crius SE board with Multiwii ver. 2.1 and have connected a Navigatron I2C gps board.

Multiwii config is showing strange GPS values that don't agree with the NMEA sentences that the Navigration has.

At present the Navigatron is giving my proper NMEA Lat & Lon on its serial output.. at 1 Hz.

3438.4498,N,08632.8157,W,1

but Config reads

alt = 0
lat = 13565952
Lon = 192212992
speed =0
sat =7
and doesn't show any I2C errors.

What am I doing wrong????


You forgot to update the sw on the navigatron... use 2.1rc I2C_GPS_NAV from the download site...

User avatar
dramida
Posts: 473
Joined: Mon Feb 28, 2011 12:58 pm
Location: Bucharest
Contact:

Re: GPS integration

Post by dramida »

Hi Eos Bandi, i need some help here.
How to configure at startup the ublox neo 6M GPS for 38400 baud, NEMEA, 5Hz refresh for atmega256 serial 2 port.
I put the following code by user svalent in multiWii.ino inside void setup() {} function but i have compile errors. How do i configure the ublox GPS at startup?

Code: Select all

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Setup
//
void setup() {
  uint8_t i;
  Serial.begin(9600);
  delay(500);
  Serial.print("$PUBX,41,1,0003,0003,19200,0*21\r\n"); // turn on UBX + NMEA, 19200 baud
  delay(200);
  Serial.begin(19200);
  delay(200);
  char myCMD[] = { 0xB5, 0x62, 0x06, 0x08, 0x06, 0x00, 0xC8, 0x00, 0x01, 0x00, 0x01, 0x00, 0xDE, 0x6A,0}; //set 5Hz
  Serial.print(myCMD[0]);
  Serial.print(myCMD[1]);
  Serial.print(myCMD[2]);
  Serial.print(myCMD[3]);
  Serial.print(myCMD[4]);
  Serial.print(myCMD[5]);
  Serial.print(myCMD[6]);
  Serial.print(myCMD[7]);
  Serial.print(myCMD[8]);
  Serial.print(myCMD[9]);
  Serial.print(myCMD[10]);
  Serial.print(myCMD[11]);
  Serial.print(myCMD[12]);
  Serial.print(myCMD[13]);
  Serial.print(myCMD[14]);
  delay(50);

User avatar
TermicOne
Posts: 15
Joined: Wed Jul 04, 2012 9:13 pm
Location: Italy - Milan

Re: GPS integration

Post by TermicOne »

During first FPV tests RTH resulted too slow: about 3m/s - More than 3 minutes to return home from 600m...batteries could go off before coming home.
Following EOSbandi wiki I changed in GPS.ino (thank you Thomas (mr.rc-cam) for the info!) NAV_SPEED_MAX from 300 to 500 and now quad is returning home pretty faster at 5m/s. About 2 minutes to return home from 600m...even against some wind!
Thank you again to the developers of this great sw!

This is the vid of the test - From GPS Hold position no hands on the sticks - quad is flying home alone... even with some gusts!

http://www.youtube.com/watch?v=FpoMjCTDSFg

Luciano

Post Reply