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
EOSBandi
Posts: 802
Joined: Sun Jun 19, 2011 11:32 am
Location: Budapest, Hungary
Contact:

Re: GPS integration

Post by EOSBandi »

jevermeister wrote:Andras,
can you sum up the parameters for GPS`? The thread is quit long.
We should update the FAQ ASAP, I will contact Alex for this.

Nils

It covers most part... will be updatet along with 2.1 release
http://code.google.com/p/i2c-gps-nav/do ... tation.pdf

tsoumelman
Posts: 4
Joined: Sat Jun 23, 2012 9:05 pm

Re: GPS integration

Post by tsoumelman »

BrokenRotor wrote:
tsoumelman wrote:Hello
i have problems while i am trying to compile r33 code.I am not familiar with arduino coding.I've made the extra steps needed to get the code compiled in the arduino IDE. I have copied the libraries that are in the Arduino-PID-libs folder (PI and PID controllers)and pasted them into the libraries folder in arduino folder.
I'm planning to use i2c_gps(MTK3339 from Adafruit). So i copied twi.c and twi.h from the Arduino-twi-lib-patch and pasted them to the libraries\wire\utilities folder(i didn't erase the existing twi.c and twi.h files). Then i tried to compile the code, but i had many errors.What have i done wrong?
Guys i NEED YOUR HELP!!!
Thanks in advance!

I had to remove the original twi code from the wire library, renaming did not work, only removing them would allow it to compile.

Thanks a lot!
And thanks EOS too!

taka
Posts: 2
Joined: Mon Jul 09, 2012 3:19 am

Re: GPS integration

Post by taka »

I connect a Gstar (3329) serial gps unit into my mega board port 2, i do get the gps data and number of satetille fixed, however the comm baud is only 9600, any higher i changed will not get any gps data on my mega/gui.

How can i find out if my gps is 10 hz or not ? How to increase the comm baud rate?
All others functions is ok as my quad is flying well with the mega board now. Gps dont seems to work, i m on multiwii 2.1_964 currently.

Thanks

User avatar
fr3d
Posts: 97
Joined: Sun Feb 06, 2011 11:21 am
Location: Cappelle la grande near the ch'ti village
Contact:

Re: GPS integration

Post by fr3d »

is it a bug ??
arduino 2560, flyduino megaboard
fmp04 10hz,115200 flyduino gpsbob
on gui with r964 when you unplug (by accident) the gps serial wire, informations still appear on gui...
can we guess those informations will also stay in mwc during flight ?
if it does it can crash your copter no ?

I'm not sure about it but it should be also safe to 'reset' gps data when you reset home position no ?
something like this maybe...

Code: Select all

      if (rcData[YAW] < MINCHECK && rcData[PITCH] < MINCHECK && !f.ARMED) {
        if (rcDelayCommand == 20) {
          calibratingG=400;
          #if GPS
            GPS_reset_home_position(); //fr3d
              f.GPS_FIX = 0;
              GPS_numSat = 0;
              GPS_coord[LAT] = 0;
              GPS_coord[LON] = 0;
              GPS_altitude = 0;
              GPS_speed = 0;
          #endif
        }


and maybee to add a counter of good or "always same" GGA & RMC frames
like it is in the failsafe dectection procedure...

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: GPS integration

Post by shikra »

Nervously tested RTH on a big twitchy hexa yesterday. It's very overpowered and is climbing on less than 20% throttle so wasn't sure how it would work.

All default untuned. Only magdec calibrated - worked very well except a little circling at home
Engaged RTH 2m above the ground. Tracked back very well at nice speed. +/-1m on height
Windy day
It flies it better than me.....

Nice Job EOS and the AP crew

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

Re: GPS integration

Post by EOSBandi »

fr3d wrote:is it a bug ??
arduino 2560, flyduino megaboard
fmp04 10hz,115200 flyduino gpsbob
on gui with r964 when you unplug (by accident) the gps serial wire, informations still appear on gui...
can we guess those informations will also stay in mwc during flight ?
if it does it can crash your copter no ?

I'm not sure about it but it should be also safe to 'reset' gps data when you reset home position no ?
something like this maybe...

Code: Select all

      if (rcData[YAW] < MINCHECK && rcData[PITCH] < MINCHECK && !f.ARMED) {
        if (rcDelayCommand == 20) {
          calibratingG=400;
          #if GPS
            GPS_reset_home_position(); //fr3d
              f.GPS_FIX = 0;
              GPS_numSat = 0;
              GPS_coord[LAT] = 0;
              GPS_coord[LON] = 0;
              GPS_altitude = 0;
              GPS_speed = 0;
          #endif
        }


and maybee to add a counter of good or "always same" GGA & RMC frames
like it is in the failsafe dectection procedure...



Resetting gps data on home position reset is meaningless, since you have to have good gps data for setting home position...a failsame timer is a good idea, now if you disconnect the serial GPS, the last pos and fix data remained stalled.... we a simple timer could reset the f.GPS_FIX to zero... all other gps functions are based on the f.GPS fix flag......

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

Re: GPS integration

Post by jevermeister »

Isn't there a heartbeat signal present?

You could definetly include that into I2C GPS

Nils

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

Re: GPS integration

Post by EOSBandi »

jevermeister wrote:Isn't there a heartbeat signal present?

You could definetly include that into I2C GPS

Nils

I2c gps has this feature, when no GPS signal is detected for 1 sec, then it will ouput NO fix... so I just have to port this to MW serial GPS code....

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

Re: GPS integration

Post by jevermeister »

EOSBandi wrote:
jevermeister wrote:Isn't there a heartbeat signal present?

You could definetly include that into I2C GPS

Nils

I2c gps has this feature, when no GPS signal is detected for 1 sec, then it will ouput NO fix... so I just have to port this to MW serial GPS code....


OK - Nice to know you are alway prepared Andras ;-).

I had the weirdest issue today. I tested Coming home again today and hat slight wind from west.
Walking test were okay and plausible - I thought I had a mag issue.

If I switched RTH while the copter was in the west everything was okay.

If I switched it on while it has to fight the wind to rth it was twitchy as hell and flying circles and tries to run away.
I checked again in gui and noticed that, when I tilt the copter the mag goes crazy - so I rechecked the amg orientation, compared it to other boards etc. everything was set up correctly. When I reflasehd MWC2.0 everything was fine. So I thought it was an issue with 2.1pre.

After reflashing MWC2.1pre the issue was gone.


Dafuq? What does that mean?? Is there something wrong with the eeprom and the mag data?
I did some code tests the last days so flashed and reflashed 2.1pre over and over again...

Nils

ps.: Andras, do you need some Buzzercodes for GPS? I have coded a new coded buzzerpattern. Have a lock

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

Re: GPS integration

Post by crashlander »

jevermeister wrote:I had the weirdest issue today. I tested Coming home again today and hat slight wind from west.
...
f I switched it on while it has to fight the wind to rth it was twitchy as hell and flying circles and tries to run away.


Sounds very much like: viewtopic.php?f=8&t=649&start=1030#p17821
In my case also mag (by itself) works as expected only GPS functions (especialy RTH) in wind are strange.

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

Re: GPS integration

Post by LuFa »

news about i2c GPS and Ublox Parser :D ?

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

Re: GPS integration

Post by jevermeister »

The mag is the problem here, because of the wind the copter has to tilt more and the mag is causing the copter to get fuzzy.

The RTH wroks great, it tries to accelerate more against the wind - behavior is expected.

Nils

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

Re: GPS integration

Post by jevermeister »

crashlander wrote:
jevermeister wrote:I had the weirdest issue today. I tested Coming home again today and hat slight wind from west.
...
f I switched it on while it has to fight the wind to rth it was twitchy as hell and flying circles and tries to run away.


Sounds very much like: viewtopic.php?f=8&t=649&start=1030#p17821
In my case also mag (by itself) works as expected only GPS functions (especialy RTH) in wind are strange.


Okay I viewed your videos:
I have the same behavior. I had a situation where the coper simply disarmes and fell to ground. Same like your flip attempt.

I use a MEGA 2560 (Flyduino 2.1)
Andras, how can I get some data inflight? I have a bluetooth module onboard.

Nils

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

Re: GPS integration

Post by crashlander »

jevermeister wrote:
crashlander wrote:
jevermeister wrote:.....
I use a MEGA 2560 (Flyduino 2.1)
...
Nils

Since you have Mega 2560 and I have Crius SE (ATmega 328) that probably excludes OOM issues?!

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

Re: GPS integration

Post by jevermeister »

Okay,
jsut did some backyard flying moments ago, and the controller reinits if I enable mag mode or GPS (mag mode also enabled).
It is not doing this everytime but mostly...
The first occurance when I armed and gave a lot of throttle.
IF mag mode is enablesd and I yaw the captor ahrd by hand it is also shutting down.

What is going on here?
It just switches of and drops like a dead bird.

Nils

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

Re: GPS integration

Post by EOSBandi »

I use a MEGA 2560 (Flyduino 2.1)
Andras, how can I get some data inflight? I have a bluetooth module onboard.

Nils

Could you log data via WinGUI 2.1rc1 ?

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

Re: GPS integration

Post by jevermeister »

Just a short update,
I ve flown with my improved Buzzer.ino that uses chars to transfer the duration of the beeps and a switch case subroutine.
I // the define of buzzer and vbat and the problem seems gone now...

I think I created a memory leak !(?)

Nils

EDIT: will try wingui in a minute

svalent
Posts: 6
Joined: Tue May 29, 2012 9:34 pm
Location: Slovakia, BB

Re: GPS integration /u-blox/

Post by svalent »

Hello,
here is draft & non-optimized (but tested) code for "Multiwii MWC FC CN-06 GPS Receiver
" http://www.rctimer.com/index.php?gOo=goods_details.dwt&goodsid=763&productname= initial setting for I2C_GPS_NAV.ino :

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);


(of course 115200bd is better, maybe tomorrow....)

Stano

PS: I have problem :( store profile in BBR on my NEO-6M via u-center (UBX-CFG-CFG).... (backup battery is OK : 2,65V)
PS2: SOLVED - wrong contact under battery, after resolder everything is OK (I can save cfg successfully) ;)
Last edited by svalent on Thu Jul 12, 2012 2:46 pm, edited 1 time in total.

svalent
Posts: 6
Joined: Tue May 29, 2012 9:34 pm
Location: Slovakia, BB

Re: GPS integration /u-blox/

Post by svalent »

...and a bit optimized for 115200 :

Code: Select all

  Serial.begin(9600);
  delay(500); 
  PROGMEM uint8_t m00[] = {0xB5,0x62,0x06,0x08,0x06,0x00,0xC8,0x00,0x01,0x00,0x01,0x00,0xDE,0x6A};  //5Hz
  Serial.write(m00,sizeof(m00));
  PROGMEM uint8_t m01[] = {0xB5,0x62,0x06,0x00,0x14,0x00,0x01,0x00,0x00,0x00,0xD0,0x08,0x00,0x00,0x00,0xC2,0x01,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0xC4,0x96};  //115200Bd
  Serial.write(m01,sizeof(m01));
  delay(50);
  Serial.begin(115200);

marbalon
Posts: 107
Joined: Thu Aug 18, 2011 10:59 am

Re: GPS integration

Post by marbalon »

Hi,
I have a question: Does u-blox-config.ublox.zip file from EOSBandi post can be used with U-blox NEO-6M GPS module ?

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

Re: GPS integration

Post by EOSBandi »

marbalon wrote:Hi,
I have a question: Does u-blox-config.ublox.zip file from EOSBandi post can be used with U-blox NEO-6M GPS module ?

Yes, that is the one that you have to upload via u-blox if you are planning to use UBLOX binary protocol (not in _shared, but posted earlier as a test patch) I already posted u-blox-config.NMEA.zip earlier for standard configs.

User avatar
Jonit
Posts: 37
Joined: Sat May 12, 2012 10:12 pm
Location: Slovakia

Re: GPS integration

Post by Jonit »

Is there any benefit using UBLOX binary protocol on RCtimer 5Hz GPS? Or it should be used only with 10 Hz modules? Thanks.

Jonit.

fastsonic
Posts: 4
Joined: Thu Jun 07, 2012 8:25 pm

Re: GPS integration

Post by fastsonic »

.....I´am to stupit for flash and following manuals ....

I began at new. Step for Step . now it works
I think my Probelms come from Arduino 1.01 use with Buspirat.
Now i works with the 1.0 Arduino like in the Manual.
Last edited by fastsonic on Fri Jul 13, 2012 9:16 am, edited 1 time in total.

Sympster
Posts: 15
Joined: Thu May 24, 2012 1:45 am

Re: GPS integration

Post by Sympster »

For a U-blox NEO-6M RCTimer GPS Module with a RCTimer I2C interface board:

Is there a way to have the I2C code update the Baudrate to 115200 and Update rate to 5hz when you initialize the board? Config set in u-center only get saved for a couple days then defaults back to 9600 baud and 1hz update rate.

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

Re: GPS integration

Post by brettwal »

jevermeister wrote:
crashlander wrote:
jevermeister wrote:I had the weirdest issue today. I tested Coming home again today and hat slight wind from west.
...
f I switched it on while it has to fight the wind to rth it was twitchy as hell and flying circles and tries to run away.


Sounds very much like: viewtopic.php?f=8&t=649&start=1030#p17821
In my case also mag (by itself) works as expected only GPS functions (especialy RTH) in wind are strange.


Okay I viewed your videos:
I have the same behavior. I had a situation where the coper simply disarmes and fell to ground. Same like your flip attempt.

I use a MEGA 2560 (Flyduino 2.1)
Andras, how can I get some data inflight? I have a bluetooth module onboard.


I have a Crius SE v1 and had the same issue. Copter was up with POS hold, disarmed and dropped like a rock

Nils

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

I2C GPS NAV 2.1 release candidate

Post by EOSBandi »

Hi Folks,

I updated the I2C_GPS_NAV code to prepare for the release of MultiWii 2.1.
What is new :
Single consolidated code, no need to patch twi libs or copy libraries to arduino libraries folder anymore
Works with arduino 1.0.1 release
Added Lead filter for GPS position forward estimation, this eliminates GPS lag
Support for Ublox and MTK binary protocols, eliminates the need for the GPS_FILTERING in the MultiWii code.
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)

ToDo for final 2.1 release
Automatic Ublox binary configuration
Updating documentation for gps functions

You can find the code here : http://code.google.com/p/i2c-gps-nav/downloads/list

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

Re: GPS integration

Post by EOSBandi »

Jonit wrote:Is there any benefit using UBLOX binary protocol on RCtimer 5Hz GPS? Or it should be used only with 10 Hz modules? Thanks.

Jonit.


Binary protocol has a much better resolution for the position information than the NMEA plus requires less processing... You can disable GPS_FILTERING if you use binary protocol, and got much better poshold precision....

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

Re: GPS integration

Post by jevermeister »

Eosbandi,
I wanted to inform you,that my crasing issue was due to my new Buzzer code.I created a null pointer access that crashed the fc. So it was my fault. Sorry for the confusion.
I tested RTH again today in slight wind and it is astonishing how well it works. Only drawback is the missing visual feedback of how good the fix is at startup. one has to gues how long he has to wait. Maybe we can let the led blink each time for number of sat and then pause.

Again:The GPS code is a fantastic piece of coding. Kudos!!!

Thank you so much for that.
Nils

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

Re: GPS integration

Post by LuFa »

Hi Eosbandi ,

i get a lot of errors by compiling the new I2C Code

Code: Select all

Wire\Wire.cpp.o: In function `TwoWire':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:48: multiple definition of `TwoWire::TwoWire()'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:46: first defined here
c:/users/ludwig/desktop/svn/ide/arduino-1.0.1/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions
Wire\Wire.cpp.o: In function `TwoWire':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:48: multiple definition of `TwoWire::TwoWire()'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:46: first defined here
Wire\Wire.cpp.o: In function `TwoWire::beginTransmission(unsigned char)':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:111: multiple definition of `TwoWire::beginTransmission(unsigned char)'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:99: first defined here
Wire\Wire.cpp.o: In function `TwoWire':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:48: multiple definition of `TwoWire::transmitting'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:46: first defined here
Wire\Wire.cpp.o: In function `TwoWire':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:48: multiple definition of `TwoWire::txAddress'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:46: first defined here
Wire\Wire.cpp.o: In function `TwoWire':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:48: multiple definition of `TwoWire::txBufferIndex'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:46: first defined here
Wire\Wire.cpp.o: In function `TwoWire':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:48: multiple definition of `TwoWire::txBufferLength'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:46: first defined here
Wire\Wire.cpp.o: In function `TwoWire::beginTransmission(unsigned char)':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:111: multiple definition of `TwoWire::beginTransmission(int)'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:99: first defined here
Wire\Wire.cpp.o: In function `TwoWire::available()':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:203: multiple definition of `TwoWire::available()'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:170: first defined here
Wire\Wire.cpp.o: In function `TwoWire':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:48: multiple definition of `TwoWire::rxBufferLength'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:46: first defined here
Wire\Wire.cpp.o: In function `TwoWire':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:48: multiple definition of `TwoWire::rxBufferIndex'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:46: first defined here
Wire\Wire.cpp.o: In function `TwoWire::read()':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:216: multiple definition of `TwoWire::read()'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:183: first defined here
Wire\Wire.cpp.o: In function `TwoWire':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:48: multiple definition of `TwoWire::rxBuffer'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:46: first defined here
Wire\Wire.cpp.o: In function `TwoWire::peek()':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:231: multiple definition of `TwoWire::peek()'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:198: first defined here
Wire\Wire.cpp.o: In function `TwoWire::flush()':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:241: multiple definition of `TwoWire::flush()'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:208: first defined here
Wire\Wire.cpp.o: In function `TwoWire::onReceiveService(unsigned char*, int)':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:244: multiple definition of `TwoWire::onReceiveService(unsigned char*, int)'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:211: first defined here
Wire\Wire.cpp.o: In function `TwoWire':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:48: multiple definition of `TwoWire::user_onReceive'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:46: first defined here
Wire\Wire.cpp.o: In function `TwoWire::onRequestService()':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:272: multiple definition of `TwoWire::onRequestService()'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:239: first defined here
Wire\Wire.cpp.o: In function `TwoWire':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:48: multiple definition of `TwoWire::user_onRequest'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:46: first defined here
Wire\Wire.cpp.o: In function `TwoWire::onReceive(void (*)(int))':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:286: multiple definition of `TwoWire::onReceive(void (*)(int))'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:253: first defined here
Wire\Wire.cpp.o: In function `TwoWire::onRequest(void (*)())':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:292: multiple definition of `TwoWire::onRequest(void (*)())'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:259: first defined here
Wire\Wire.cpp.o: In function `TwoWire':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:48: multiple definition of `Wire'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:46: first defined here
Wire\Wire.cpp.o: In function `TwoWire::write(unsigned char const*, unsigned int)':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:185: multiple definition of `TwoWire::write(unsigned char const*, unsigned int)'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:152: first defined here
Wire\Wire.cpp.o: In function `TwoWire::write(unsigned char)':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:160: multiple definition of `TwoWire::write(unsigned char)'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:127: first defined here
Wire\Wire.cpp.o: In function `TwoWire':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:48: multiple definition of `TwoWire::txBuffer'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:46: first defined here
Wire\Wire.cpp.o: In function `TwoWire::endTransmission()':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:154: multiple definition of `TwoWire::endTransmission()'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:115: first defined here
Wire\Wire.cpp.o: In function `TwoWire::requestFrom(int, int)':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:100: multiple definition of `TwoWire::requestFrom(int, int)'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:93: first defined here
Wire\Wire.cpp.o: In function `TwoWire::requestFrom(unsigned char, unsigned char)':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:95: multiple definition of `TwoWire::requestFrom(unsigned char, unsigned char)'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:83: first defined here
Wire\Wire.cpp.o: In function `TwoWire::begin()':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:56: multiple definition of `TwoWire::begin()'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:54: first defined here
Wire\Wire.cpp.o: In function `TwoWire::begin(unsigned char)':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:65: multiple definition of `TwoWire::begin(unsigned char)'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:63: first defined here
Wire\Wire.cpp.o: In function `TwoWire::begin(int)':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire/Wire.cpp:75: multiple definition of `TwoWire::begin(int)'
Wire.cpp.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/Wire.cpp:73: first defined here
Wire\utility\twi.c.o: In function `twi_setAddress':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire\utility/twi.c:102: multiple definition of `twi_setAddress'
twi.c.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/twi.c:96: first defined here
Wire\utility\twi.c.o: In function `twi_readFrom':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire\utility/twi.c:116: multiple definition of `twi_readFrom'
twi.c.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/twi.c:109: first defined here
Wire\utility\twi.c.o: In function `twi_writeTo':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire\utility/twi.c:193: multiple definition of `twi_writeTo'
twi.c.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/twi.c:172: first defined here
Wire\utility\twi.c.o: In function `twi_transmit':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire\utility/twi.c:267: multiple definition of `twi_transmit'
twi.c.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/twi.c:230: first defined here
Wire\utility\twi.c.o: In function `twi_attachSlaveRxEvent':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire\utility/twi.c:297: multiple definition of `twi_attachSlaveRxEvent'
twi.c.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/twi.c:260: first defined here
Wire\utility\twi.c.o: In function `twi_attachSlaveTxEvent':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire\utility/twi.c:308: multiple definition of `twi_attachSlaveTxEvent'
twi.c.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/twi.c:271: first defined here
Wire\utility\twi.c.o: In function `twi_reply':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire\utility/twi.c:320: multiple definition of `twi_reply'
twi.c.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/twi.c:283: first defined here
Wire\utility\twi.c.o: In function `twi_stop':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire\utility/twi.c:336: multiple definition of `twi_stop'
twi.c.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/twi.c:299: first defined here
Wire\utility\twi.c.o: In function `twi_releaseBus':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire\utility/twi.c:357: multiple definition of `twi_releaseBus'
twi.c.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/twi.c:334: first defined here
Wire\utility\twi.c.o: In function `__vector_39':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire\utility/twi.c:364: multiple definition of `__vector_39'
twi.c.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/twi.c:341: first defined here
Wire\utility\twi.c.o: In function `twi_init':
C:\Users\Ludwig\Desktop\SVN\IDE\arduino-1.0.1\libraries\Wire\utility/twi.c:71: multiple definition of `twi_init'
twi.c.o:C:\Users\Ludwig\AppData\Local\Temp\build7230240507137172525.tmp/twi.c:67: first defined here


any idea why ? :cry:

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

Re: GPS integration

Post by EOSBandi »

OK It's fixed, I uploaded RC2, I had to rename the used libs to avoid conflict....

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

Re: GPS integration

Post by EOSBandi »

jevermeister wrote:Eosbandi,
I wanted to inform you,that my crasing issue was due to my new Buzzer code.I created a null pointer access that crashed the fc. So it was my fault. Sorry for the confusion.
I tested RTH again today in slight wind and it is astonishing how well it works. Only drawback is the missing visual feedback of how good the fix is at startup. one has to gues how long he has to wait. Maybe we can let the led blink each time for number of sat and then pause.

Again:The GPS code is a fantastic piece of coding. Kudos!!!

Thank you so much for that.
Nils


Hi Nils,
Thanks for letting me know. I followed the thread.... and i'm glad thet you managed to sort out the issue.
Regards,
EOSBandi

Ps. The original code comes from the Arducopter guys, I', just porting it :D So kudos goes to mostly to Jason and the AC team.

Chaosdestro0
Posts: 13
Joined: Wed Mar 21, 2012 9:37 pm

Re: GPS integration

Post by Chaosdestro0 »

Is waypoint functionality working yet?
Thanks, in the next few days I might get hold of a GPS module so I am just interested in what is possible.

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

Re: GPS integration

Post by EOSBandi »

Chaosdestro0 wrote:Is waypoint functionality working yet?
Thanks, in the next few days I might get hold of a GPS module so I am just interested in what is possible.

Nope, Poshold and RTH is the aim for 2.1

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

Re: GPS integration

Post by LuFa »

ok , have change the name of the wire lib and now i can compile it without errors :)

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

Re: GPS integration

Post by LuFa »

is the new i2c Code compatibel with the old one ?
because i doesnt fly the newest Mwii version

User avatar
jose_Quad
Posts: 8
Joined: Wed May 30, 2012 2:57 am
Location: Colombia
Contact:

Re: GPS integration

Post by jose_Quad »

wow i flash the new firmware in GPS and upload the I2C_GPS_NAV-v2.1rc2 and works great, thanks for your effort and cooperation :D

sorry my english :(

User avatar
Bledi
Posts: 187
Joined: Sat Sep 10, 2011 6:36 pm

Re: GPS integration

Post by Bledi »

Great job EOSBandi.
Just 1 think: is it possible de add a #define for the Led pin
#define LedPin 13

Because for exemple on the Rushduino GPS the led pin is on 2

Thanks

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:is the new i2c Code compatibel with the old one ?
because i doesnt fly the newest Mwii version


It is for MultiWii 2.1 but it's backward compatibile to R33 code.
It won't work with Multiwii 2.0....

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

Re: GPS integration

Post by LuFa »

ok , so if my mwii version works with R33 , it will also work with the newest version ?

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:ok , so if my mwii version works with R33 , it will also work with the newest version ?

exactly

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

Re: GPS integration

Post by brettwal »

I have RCTimer i2c module. With r33 i2c code GPS worked fine. I uploaded latest i2c code to module and selected NMEA mode in config.h. Verfied GPS has lock with Mini GPS but module is not seeing GPS data. Flash module back to r33 and it works again. Any help?

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

Re: GPS integration

Post by brettwal »

brettwal wrote:I have RCTimer i2c module. With r33 i2c code GPS worked fine. I uploaded latest i2c code to module and selected NMEA mode in config.h. Verfied GPS has lock with Mini GPS but module is not seeing GPS data. Flash module back to r33 and it works again. Any help?



UPDATE: Well, not exactly sure where the problem was but, it edited the i2c code to set the baudrate and update rate on my MTK3339 SkyLab module and reflashed the i2c module and now its working great. I guess I'll try putting it in binary mode now and see how it behaves.

Sympster
Posts: 15
Joined: Thu May 24, 2012 1:45 am

Re: GPS integration

Post by Sympster »

Great work EOSBandi! I have a Ublox Neo-6M and used your ublox config file. Also running the new I2C code with binary Ublox mode. The config file is set to a 10 hz update rate which the 6M accepted but it is really only a max 5 hz chip. At 10 hz seemed to drift around more than with old I2Ccode and NEMA. Changed the 10 hz to 5 hz in the GPS config and this thing really locked in! Working great with RCTimer UBlox Neo-6M @ 5hz, new I2C code on RCTimer with UBlox binary mode selected.

If running at 5hz on the 6M makes sense over 10hz and you plan to write auto UBlox GPS config into a future version, can you make it 5hz or 10hz selectable?

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

Re: GPS integration

Post by copterrichie »

I wonder how long will it be before this puppy hits the RC Market?

Garmin GLO Portable GPS and GLONASS receiver: location refresh rate 10 times faster than typical GPS

http://www.engadget.com/2012/07/12/garm ... -receiver/

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

Re: GPS integration

Post by Tazzy »

copterrichie wrote:I wonder how long will it be before this puppy hits the RC Market?

Garmin GLO Portable GPS and GLONASS receiver: location refresh rate 10 times faster than typical GPS

http://www.engadget.com/2012/07/12/garm ... -receiver/


There is already glosnas modules on the market i belive http://www.sensorcomm.co.jp/en/pdf/NVS_S4706.pdf

// Tazzy

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

Re: GPS integration

Post by copterrichie »

Tazzy wrote:
There is already glosnas modules on the market i belive http://www.sensorcomm.co.jp/en/pdf/NVS_S4706.pdf

// Tazzy


Very Interesting Tazzy and Thank you.

In the comment section, they were talking about an update of 10 times per second, in the above pdf, it states "Data output rate ...1 Hz", Am I missing something here?

Thank you.

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

Re: GPS integration

Post by EOSBandi »

I would check out the nv08c-csm module, but i did not found any premaid panel with antenna, and attaching an antenna to the module is not an easy design task, On the other hand you'll need a special antenna since glonass uses a sligtly different frequency than gps....
http://www.nvs-gnss.com/products/receiv ... c-csm.html

Jochen
Posts: 5
Joined: Sat Sep 03, 2011 11:14 pm

Re: GPS integration

Post by Jochen »

Hi,

I use 2.1 pre and GPS works now fine! Many thanks to Eosbandi!!

Now I build a sencond copter also with ATMEGA2560 an something is not clear to me:
On Mega2560 I can connect the GPS Module directly to the free serial port - that works.
But when the I2C-Serial solution with 328p makes some own calculations that would mean for me, that the Main Mega2560 has less to calculate. So my question: Do I have any advantages if I spend a 328p I2C-Serial Board aditionaly to the Mega2560 and use I2C GPS instead of serial-GPS?

Currently I use MTK3329. If we compare MTK3329, MTK3339 (http://shop.trenz-electronic.de/catalog ... th=105_139) and NEO-6M (http://www.rctimer.com/index.php?gOo=go ... oductname=) which one would the best solution for this project? I tend to order the RCTimer module, because the backup battery is an the PCB and the module cost´s only 25USD.

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

Re: GPS integration

Post by Tazzy »

EOSBandi if i use mtk protocol in i2c with my gps is it better to turn filtering off and if so both in i2c config and mwi config ?

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

Re: GPS integration

Post by EOSBandi »

Tazzy wrote:EOSBandi if i use mtk protocol in i2c with my gps is it better to turn filtering off and if so both in i2c config and mwi config ?

If U use mtk binary, then you can switch off GPS_FILTERING, it's ok to comment out in multiwii config.h since it is a runtime setting for i2c-gps.

Post Reply