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 »

PatrikE wrote:@EOSBandi.
What does the Dist home show? CM,DM or meters?
Looks like cm for me!
While sitting inside with 5 sats Dist home soon shows a value of 70-100.
With serial connection it only shows 1-2.

But it works!..
Haven't tested it in flight yet.

It is supposed to be in meters....

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: GPS integration

Post by Alexinparis »

EOSBandi wrote:Hi Alex,
Well, the issue is not in the distance calculation, but whith the lat/lon conversion routine. In the distance calculation I just followed the increased resolution of the coordinates.
Here is what I found:
Take a GPS coordinate, for example 47 34.2841N, 19 2.211E (This is my test field :D)
Convert it to decimal degrees with 10e5 prec, and we got 47.5714N 19.0368E This point is 3.7meters away from the gps coordinate.
Now convert it with 10e7 precision and we got 47.571402N 19.03685E This is pretty much at the same point.
Capture.JPG


Hi,
I did this little test with the current function GPS_coord_to_degrees (1 degree = 100 000)

Code: Select all

    char toto[] = "1902.211";
    Serial.println(GPS_coord_to_degrees(toto));

The result is 1903685 and not 190368
So for me it's good.

Code: Select all

    char toto[] = "4734.2841";
    Serial.println(GPS_coord_to_degrees(toto));

The result is 4757140.
Here we lost the last figure 2 (47571402) according to your example.
But the distance between 47.57140 deg and 47.571402 deg is less than 22cm on the earth sphere.
So I still don't understand the need to push up the decimal accuracy.

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

Re: GPS integration

Post by EOSBandi »

And you are right ! I did screw up somewhere during the long night....
I'll change my code accordingly.
Thanks for looking and insisting :D

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

Re: GPS integration

Post by EOSBandi »

Meanwhile I moved forward with the onboard flight data logging. I think I got some very interesting data, which can underpin the justification of using i2c gps instead a serial one.
I made meassurements with the following config :
ATMega2560 proc, ITG3205+BMA020. Logging interval : 50Hz (20ms). Logged average cycleTime and maximum cycleTime since last log write.
What do you think ?

GPS code disabled
GPS code disabled

Serial GPS, 5Hz, 115200bps, only GPGGA sentences
Serial GPS, 5Hz, 115200bps, only GPGGA sentences

Serial GPS, 10Hz, 115200bps, only GPGGA sentences
Serial GPS, 10Hz, 115200bps, only GPGGA sentences

I2C GPS, 10Hz, GPGGA+GPRMC+GPGSA sentences
I2C GPS, 10Hz, GPGGA+GPRMC+GPGSA sentences

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

Re: GPS integration

Post by marbalon »

I think this confirms that it is really worth doing i2c module. But do you have a GPS module with binary data format? I my case it only one frame 44bytes with checksum and all information we have so if someone have a Arduino Maga and more UART ports can use module with binary format. But if someone have a time and like soldering it is better use I2C module I think.

Thanks EOSBandi for all tests, I think we will get nice working GPS functions before spring ;)

If someone are interested here is a firmware for GPS-GMS-U1LP (MTK3329 based GPS from GlobalTop) with binary format and 10Hz refresh + 115200 by default. But remember this is only for GPS-GMS-U1LP. Here isan information how can you load this firmware and all tools. It is quite cheap -about $20 in Poland - easy to solder, and nice working module.

Regards,
Marcin.

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:I think this confirms that it is really worth doing i2c module. But do you have a GPS module with binary data format? I my case it only one frame 44bytes with checksum and all information we have so if someone have a Arduino Maga and more UART ports can use module with binary format. But if someone have a time and like soldering it is better use I2C module I think.

Thanks EOSBandi for all tests, I think we will get nice working GPS functions before spring ;)

If someone are interested here is a firmware for GPS-GMS-U1LP (MTK3329 based GPS from GlobalTop) with binary format and 10Hz refresh + 115200 by default. But remember this is only for GPS-GMS-U1LP. Here isan information how can you load this firmware and all tools. It is quite cheap -about $20 in Poland - easy to solder, and nice working module.

Regards,
Marcin.


Hi !
Agree, it's on the ToDo list to implement binary protocols alongside with the NMEA (There are uBlox, MTK3329 bin, SIRF and the DiYDrones custom protocol that you mentioned above). (Once I implement it in i2C gps it can be easily moved to the main MultiWii code.) This will help ease the reading and parsing, but there are still a lots of calculation, especially when we start implement navigation (cross track, wind compensation, dead reconing etc.).

Btw, Could you point me to the source in Poland for the U1LP ? The cheapest what I found in Hungary was U.top-PA6B (Same chip, smaller form factor, without supporting electronics) but it's about 35usd.

(The I2C_GPS_NAV code is now lives at https://code.google.com/p/i2c-gps-nav/)

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

Re: GPS integration

Post by marbalon »

Hi,
Here is the shop where I bought it. I don't think they ship this outside Poland, but if you want I can bought it and send it to you. Just pm me. But if you can wait a while, because me and some friends want to to build special small PCB with this GPS, Atmega, HMCL, and Baro - all powered from 3v3 and connected to main board only using four pins. I think this will be good solution because can be moved from one copter to other.

I forgot attach firmware and manual for binary format to previous message.

Here you are - only for GPS-GMS-U1LP module, 10Hz and binary format

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

Re: GPS integration

Post by dramida »

i would be happyer if i would not have to build another board for I2C GPS with another schetch, instead i would like to use the same GPS as Remzibi OSD uses with no other hardware.

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: GPS integration

Post by Alexinparis »

Hi,
It's clear the GPS frame decoding and distance calculation takes some times in the arduino.
But I think your graph is a little bit smoothed ;) we should see Dirac impulsion

Let me explain:
Without a GPS, a "standard" config should run at more or less 300Hz loop speed.
A 10Hz GPS will disturb the normal loop 1 time every 30 times. not really noticeable in flight.

But you're right on the principle. I2C GPS with offload computation will suppress those spike delays


EOSBandi wrote:Meanwhile I moved forward with the onboard flight data logging. I think I got some very interesting data, which can underpin the justification of using i2c gps instead a serial one.
I made meassurements with the following config :
ATMega2560 proc, ITG3205+BMA020. Logging interval : 50Hz (20ms). Logged average cycleTime and maximum cycleTime since last log write.
What do you think ?

nogps.JPG

gps-5Hz.JPG

gps-10Hz.JPG

i2cgps-10Hz.JPG

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: GPS integration

Post by timecop »

Better use a proper gps with binary format, ublox, or even MTK (yuck)

refractions
Posts: 92
Joined: Thu Dec 01, 2011 8:55 pm
Location: Scotter, Lincolnshire, UK

Re: GPS integration

Post by refractions »

Wonder if anyone can shed any light. Hoping to use this model of GPS.

http://www.globalsat.co.uk/product_pages/gsat_products_cable_bu303.htm

Would it be possible to use this, or should I just put it in the bin - bought it quite a while ago for another project but ended up not using it.

Many thanks in advance

Iain

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: GPS integration

Post by PatrikE »

If you can hack it and find serial data in it! :ugeek:

nhadrian
Posts: 421
Joined: Tue Oct 25, 2011 9:25 am

Re: GPS integration

Post by nhadrian »

Hi all,

does anybody succeed on i2c GPS connection with secondary arduino?

I have 5V arduino nano, flytron GPS receiver and built a level converter:
http://www.flytron.com/osd-headtrackers ... odule.html
http://www.sparkfun.com/products/8745

I modified my dev_2011... MWI code in my quadrino board following the steps, uploaded the i2c_GPS to secondary arduino but it still looks like it doesn't work, I think there is something problem with serial communication.
I tried the i2c program of EOSBandi.

any idea what to change or try?

ps.:just one question. Should ' see the number of sats in GUI when communications are working and have valid 3D fix?

LenzGr
Posts: 166
Joined: Wed Nov 23, 2011 10:50 am
Location: Hamburg, Germany
Contact:

Re: GPS integration

Post by LenzGr »

refractions wrote:Wonder if anyone can shed any light. Hoping to use this model of GPS.
http://www.globalsat.co.uk/product_pages/gsat_products_cable_bu303.htm
Would it be possible to use this, or should I just put it in the bin - bought it quite a while ago for another project but ended up not using it.

If you aren't afraid to open it, you should be able to make use of it. It seems there is a "Serial to USB" chip (a PL-2303 from Prolific) between the GPS circuit and the USB port, so it should be possible to pull the serial data directly. You will have to remove or disable the PL-2303 chip and solder wires to the serial lines and power supply (Vcc) directly.

refractions
Posts: 92
Joined: Thu Dec 01, 2011 8:55 pm
Location: Scotter, Lincolnshire, UK

Re: GPS integration

Post by refractions »

LenzGr wrote:
refractions wrote:Wonder if anyone can shed any light. Hoping to use this model of GPS.
http://www.globalsat.co.uk/product_pages/gsat_products_cable_bu303.htm
Would it be possible to use this, or should I just put it in the bin - bought it quite a while ago for another project but ended up not using it.

If you aren't afraid to open it, you should be able to make use of it. It seems there is a "Serial to USB" chip (a PL-2303 from Prolific) between the GPS circuit and the USB port, so it should be possible to pull the serial data directly. You will have to remove or disable the PL-2303 chip and solder wires to the serial lines and power supply (Vcc) directly.


Many thanks for the info. Opened it up, but haven't got around to unsoldering the shielding covering the entire board. Will let you know how it goes.

Iain

refractions
Posts: 92
Joined: Thu Dec 01, 2011 8:55 pm
Location: Scotter, Lincolnshire, UK

Re: GPS integration

Post by refractions »

Hi,

Got around to removing all the shielding on this board. You are correct in that the usb chip is a PL-2303. Seems simple enough from datasheet.

pin 1 TXD
pin 5 RXD
pin 20 VDD
pin 21 GND

Just need a small enough iron tip now.

Iain

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: GPS integration

Post by PatrikE »

How about this?... ;)
Image

JohnyGab
Posts: 144
Joined: Sat Oct 29, 2011 4:41 am

Re: GPS integration

Post by JohnyGab »

Precise question : The variable that hold GPSdirectiontohome in the multiwii, is it a value from -180 to 180 ???
0 in there will be straight foward, -90 will show that home is a 9h and 90 show home at 3h. ?

I'm asking this because i'm adding it to Rushduino Osd code and its hard to go outside to test gps and those data when its -15deg celcius outside.....with wind and snow ;)

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

Re: GPS integration

Post by Bledi »

I just try tthe GPS-I2C-NAV (R6) all is working fine. GOOD JOB !
I try it with a old GPS (1hz @ 38400) on a promini and there is no problem.

Just one think, I had to change directly TWI.h to put the I2C speed to 100k. Is it possible to make a change in the soft to have this opition directly in I2C_GPS_NAV.ino ?

Next step, I wait for my rushduino OSD and I will try to integrate all.

nhadrian
Posts: 421
Joined: Tue Oct 25, 2011 9:25 am

Re: GPS integration

Post by nhadrian »

Hi all,

I have just finished my setup with secondary Arduino nano and GPS, thanks for the code to EOSBandi!!!!!!!!!!
Here is a small test video:
http://youtu.be/SqMts1BAxD4

BR
Adrian

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: GPS integration

Post by Alexinparis »

now, let's see how it behaves in the air ;)

nhadrian
Posts: 421
Joined: Tue Oct 25, 2011 9:25 am

Re: GPS integration

Post by nhadrian »

Some terrible weather arrived to Hungary right now... unfortunatelly I have to wait a few days... :(:(:(:(

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

Re: GPS integration

Post by jevermeister »

Ahoi,
piles of snow here, so.testing yet. :-(

Nils

Magnetron
Posts: 124
Joined: Tue Jul 05, 2011 4:32 pm

Re: GPS integration

Post by Magnetron »

Excuse me but is possibile to install GPS on Arduino Nano 3.0? If yes, how?

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

Re: GPS integration

Post by LuFa »

today i have test the EOSBANDI Code .
It works great , but the home position is not realy set at the homeposition , because after the first fix , the gps drift around 50m away to the real position .

So my question is , how can i juse position hold function from the EOSBANDI code ? I think its the better way to test the code :)


But it works :) JEAHHHHHHH !

THANKS SO MUTCH

nhadrian
Posts: 421
Joined: Tue Oct 25, 2011 9:25 am

Re: GPS integration

Post by nhadrian »

I added this to the Multiwii.ino inside the i2c GPS part:

if (rcData[AUX1]>1700) {
GPS_fix_home = 0;
i2c_writeReg(I2C_GPS_ADDRESS,I2C_GPS_COMMAND,I2C_GPS_COMMAND_SET_WP);
i2c_writeReg(I2C_GPS_ADDRESS,I2C_GPS_COMMAND,I2C_GPS_COMMAND_ACTIVATE_WP);
GPS_fix_home = 1;
}

this re-define the home position, I have a mix in my TX which sets up AUX1 to high when I pull the spring-switch up on my TX.
Unfortunatelly sometimes I have to pull-up the switch for 4-5 seconds or even more till it re-defines the position, sumetimes just a second, I couldn't figure out why.
But, it works!

BR
Adrian

Magnetron
Posts: 124
Joined: Tue Jul 05, 2011 4:32 pm

Re: GPS integration

Post by Magnetron »

Excuse me, but exist a GPS module that natively has a i2c capabilities? If yes I will not buy a FMP04 GPS that had only serial comm line.

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

Re: GPS integration

Post by LuFa »

cool , thanks ;)

But it does not juse the Position Hold function from EOSBANDI .....

But for now its good for testing

nhadrian
Posts: 421
Joined: Tue Oct 25, 2011 9:25 am

Re: GPS integration

Post by nhadrian »

No, it doesn't use position hold, but you can re-define home position at any time, practically before take-off...

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: GPS integration

Post by PatrikE »

You can get new home fix when you Arm.
Add GPS_fix_home = 0; in the arming code.( 2 places in MultiWii tab)

Code: Select all

          armed = 1;
          GPS_fix_home = 0;
          headFreeModeHold = heading;


Every time you Arm the engines a new RTH point will be stored.

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

Re: GPS integration

Post by EOSBandi »

nhadrian wrote:I added this to the Multiwii.ino inside the i2c GPS part:

if (rcData[AUX1]>1700) {
GPS_fix_home = 0;
i2c_writeReg(I2C_GPS_ADDRESS,I2C_GPS_COMMAND,I2C_GPS_COMMAND_SET_WP);
i2c_writeReg(I2C_GPS_ADDRESS,I2C_GPS_COMMAND,I2C_GPS_COMMAND_ACTIVATE_WP);
GPS_fix_home = 1;
}

this re-define the home position, I have a mix in my TX which sets up AUX1 to high when I pull the spring-switch up on my TX.
Unfortunatelly sometimes I have to pull-up the switch for 4-5 seconds or even more till it re-defines the position, sumetimes just a second, I couldn't figure out why.
But, it works!

BR
Adrian


Hi !
I pushed a new version to the repo (http://code.google.com/p/i2c-gps-nav/) added watchdog timer to detect loss of gps communication. Also find a bug which caused issue with register writing (and setting poshold). So please use the code from the http://code.google.com/p/i2c-gps-nav/so ... ipplet.txt file.

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: GPS integration

Post by PatrikE »

Hi EOSBandi,

Wound it be possible to extract Altitude and true heading from the i2c?
It would open up for RTH on airplane mode. 8-)

Just compare direction home and true heading.

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

Re: GPS integration

Post by EOSBandi »

PatrikE wrote:Hi EOSBandi,

Wound it be possible to extract Altitude and true heading from the i2c?
It would open up for RTH on airplane mode. 8-)

Just compare direction home and true heading.


Does not really understand why and how ?
Alt and true heading is available in the Flight controller, you can send these values to the i2c_gps controller (just define two additional registers and write the alt and head values there) but what is it for ?

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: GPS integration

Post by PatrikE »

A airplane is always moving forward and Gps ground_course is enogh to navigate after.
Eliminating the need of a mag and baro.
You already read the altitude in i2c but not the heading.

Code: Select all

  case 7: i2c_dataset.ground_speed = (atof(string)*0.5144444)*10;      //convert to m/s*100
                               break;
  case 8: i2c_dataset.ground_course = (atof(string));                   //True course in degrees
                              break;

It's easy to read from the Gps string BUT
I'm a "little" confused by the i2c comunication... :roll:

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

Re: GPS integration

Post by EOSBandi »

PatrikE wrote:A airplane is always moving forward and Gps ground_course is enogh to navigate after.
Eliminating the need of a mag and baro.
You already read the altitude in i2c but not the heading.

Code: Select all

  case 7: i2c_dataset.ground_speed = (atof(string)*0.5144444)*10;      //convert to m/s*100
                               break;
  case 8: i2c_dataset.ground_course = (atof(string));                   //True course in degrees
                              break;

It's easy to read from the Gps string BUT
I'm a "little" confused by the i2c comunication... :roll:


OK, updated the code in repo (r10) added ground_course register
you can read out with the follwing code

Code: Select all


uint16_t ground_speed;   
uint16_t ground_course;    //degrees *10
uint8_t *varptr;

varptr = (uint8_t *)&ground_speed;
i2c_rep_start(I2C_GPS_ADDRESS);
i2c_write(I2C_GPS_SPEED);                                               //0x07
i2c_rep_start(I2C_GPS_ADDRESS+1);
*varptr++ = i2c_readAck();
 *varptr   = i2c_readNak();

varptr = (uint8_t *)&ground_course;
i2c_rep_start(I2C_GPS_ADDRESS);
i2c_write(I2C_GPS_COURSE);                                               //0x9C
i2c_rep_start(I2C_GPS_ADDRESS+1);
*varptr++ = i2c_readAck();
 *varptr   = i2c_readNak();

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: GPS integration

Post by PatrikE »

Thnx Eos..

Now i can test RTH with my plane..

nhadrian
Posts: 421
Joined: Tue Oct 25, 2011 9:25 am

Re: GPS integration

Post by nhadrian »

I found something interresting.
When I test with GUI and ESCs turned off, after arming and activating the GPS RTH, it looks like it would move in the direction of the home arrow.
But, when I replace the singn for the GPS calculation regarding to EOSBandi, it seems like it would move avay from home direction arrow.
Could anybody confirm the working of the GUI and directions?

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

Re: GPS integration

Post by EOSBandi »

Catched another bug in the watchdog, nasty overflow one. Fix is in the repo (r11)

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: GPS integration

Post by PatrikE »


nhadrian
Posts: 421
Joined: Tue Oct 25, 2011 9:25 am

Re: GPS integration

Post by nhadrian »

Hi all,

today I had my first test flight with my Mini Hexa and I2C GPS by EOSBandi!!!
Here is the test video:
http://www.youtube.com/watch?v=YcLJfC4h90M

There was some cross-wind, and as you can see on the video, it hoovered some meters behind the Home Point in wind shadow. (I suspected this behaviour because of the current working method of the code).

So the hardware is working, I'm using the Locosys LS20031 receiver which is not the newest but has a big and sensitive patch on top. And it looks like more sensitive and accurate than the PA6!!! (Tomorrow I had 10 satellites fix on my desktop during heavy snowing outside...).

During the test flight I used altitude hold, and the dev20111220 code. GPS P is 3.0, D is 7.

BR
Adrian

nhadrian
Posts: 421
Joined: Tue Oct 25, 2011 9:25 am

Re: GPS integration

Post by nhadrian »

Now I can confirm, Home direction arrow points to the opposite direction as it should...... does anybody know how to modify GUI?

User avatar
NikTheGreek
Posts: 348
Joined: Thu Dec 08, 2011 4:17 pm
Location: Greece
Contact:

Re: GPS integration

Post by NikTheGreek »

Hello again.
I'm very interested about GPS guidance impementation .
I've bought some time ago an Skylab SKM53 and i would like to try to help you , at least as a tester , in this project ;)
But seems that i m a bit " lost " and thats why i ll try to resume what i ve understand. :?
So...
1) We are talking about a 2nd arduino with a GPS module connected and used as I2C external module....RIGHT ?
2) In this I2C module this ..... http://code.google.com/p/i2c-gps-nav/updates/list .... must be loaded (last update) ....RIGHT ?
3) The second module must be connected to the main arduino like this...http://hackaday.com/2011/11/08/a-simple ... -capacity/ ........RIGHT ?
4) In the main arduino code there are some modifications...and if yes... which ones ????
5) I'm missing something ?

Thank you in advance for your time.

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

Re: GPS integration

Post by EOSBandi »

Code mods for MultiWii code are there : http://code.google.com/p/i2c-gps-nav/so ... ipplet.txt

User avatar
NikTheGreek
Posts: 348
Joined: Thu Dec 08, 2011 4:17 pm
Location: Greece
Contact:

Re: GPS integration

Post by NikTheGreek »

Oups....in arduino 022 i'm taking this ..

sketch_feb07a.cpp: In function 'void requestEvent()':
sketch_feb07a:146: error: 'class TwoWire' has no member named 'write'
sketch_feb07a.cpp: In function 'void receiveEvent(int)':
sketch_feb07a:159: error: 'class TwoWire' has no member named 'read'
sketch_feb07a:161: error: 'class TwoWire' has no member named 'read'

must install the new 1.0 version ?

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

Re: GPS integration

Post by jevermeister »

I've a stupid question,
I am about to start GPS testing tomorrow and I wonder what the behaviour of the LED ist.

If I start up there obviously is no fix but what happens to the LED when the fix is optained (regarding to code it should blink, but this is not happening at my flyduino, maybe some other function is i)

I coded a buzzer sound for the event of a first fix and a warning sound if you try to activate GPS without a valid fix.

Is there intereest for introducing this into the code?

Nils

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

Re: GPS integration

Post by EOSBandi »

NikTheGreek wrote:Oups....in arduino 022 i'm taking this ..

sketch_feb07a.cpp: In function 'void requestEvent()':
sketch_feb07a:146: error: 'class TwoWire' has no member named 'write'
sketch_feb07a.cpp: In function 'void receiveEvent(int)':
sketch_feb07a:159: error: 'class TwoWire' has no member named 'read'
sketch_feb07a:161: error: 'class TwoWire' has no member named 'read'

must install the new 1.0 version ?

YES

msev
Posts: 186
Joined: Thu Apr 14, 2011 11:49 am

Re: GPS integration

Post by msev »

Patrik great that you are working on a RTH code for aeroplanes :)...I have a few noob questions.. I have the 10Hz Flytron GPS module at home (v2), will it work for this project? Is there enough room on the promini that aircraft stabilization and rth code operates on it?

User avatar
NikTheGreek
Posts: 348
Joined: Thu Dec 08, 2011 4:17 pm
Location: Greece
Contact:

Re: GPS integration

Post by NikTheGreek »

Question. :?:
In I2C_GPS the gps connected to D2 & D3 ? :?

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

Re: GPS integration

Post by jevermeister »

Okay,
I did the first two tests with my FMP04:

I cannot say for sure, that the gps tries to come home...
I had a perfectly tweaked Baro mode but with the new dev the vel pid is gone so I have to find new values.
Question1: is the baro neede for coming home!?
question 2: I have GPS P: 1 is this a good value to start!? or is it too low to see an effect.

Suggestion: I find it hard to rely on the home coordinates beeing set with the first fix, I think we need a switch to st home coordinates (optional)...

Nils

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: GPS integration

Post by PatrikE »

@msev.
Serial gps only work on Mega cards now.
You need the I2C GPS for the MINI.

Post Reply