Page 10 of 35

Re: GPS integration

Posted: Tue Apr 17, 2012 6:50 pm
by KeesvR
I've got a I2C GPS from Flytron its working for some seconds. At the startup its working fine everything is moving when I walk around whit it.
But after some seconds it freezes and only the number of sats goes from 9 to 8 for example, all the other sat things stay where they are.
Long- and Latitude are the same values even after changing the typo in the GUI.pde

I use the latest Dev0414, when I calibrate the Giro the distance go to 0, so thats working.

With the code from MelihK I have I2C error of 34 at startup and it stays there.
With the code R11 from Eos Bandi I've got zero I2C error.

I hope somebody can help me with this problem.

Thanks Kees.

Re: GPS integration

Posted: Wed Apr 18, 2012 10:11 am
by dramida
The good news:
Serial GPS on a 328p config (crius) is working. The board already has the GPS connector witch fits the GPS from Remzibi OSD and the GPS TX pin is outputed also in FTDI (derivation) and injected back to REMZIBI OSD with a single wire (gnd is common).

The bad news:
GPS position hold algorithm is codded only for demo principle. It overshoots the target with great speed and fly 20-30 m away before makeing the same approach in reverse. Note: A few times, in GPS pos hold, the copter (Bma180-ITG3205-HMC5883L) leaned more than 45 degrees and i had to manually adjust the level in order to avoid crash as it was loosing altitude. The GPS PID's are lowered to 2,5-0-10 to avoid extreme banking but this didn't help.

The "ugly" news:
I am learning Arduino to better understand MULTIWII and participate to codding developement ;)

Re: GPS integration

Posted: Wed Apr 18, 2012 10:31 am
by jevermeister
dramida wrote:The bad news:
GPS position hold algorithm is codded only for demo principle. It overshoots the target with great speed and fly 20-30 m away before makeing the same approach in reverse.



We already know that,
it is impossible to achieve a good Position hold withoout cascading control algorythims.

But Coming home works great ;-)

Re: GPS integration

Posted: Sat Apr 21, 2012 10:15 am
by KeesvR
KeesvR wrote:I've got a I2C GPS from Flytron its working for some seconds. At the startup its working fine everything is moving when I walk around whit it.
But after some seconds it freezes and only the number of sats goes from 9 to 8 for example, all the other sat things stay where they are.
Long- and Latitude are the same values even after changing the typo in the GUI.pde

I use the latest Dev0414, when I calibrate the Giro the distance go to 0, so thats working.

With the code from MelihK I have I2C error of 34 at startup and it stays there.
With the code R11 from Eos Bandi I've got zero I2C error.

I hope somebody can help me with this problem.

Thanks Kees.


Some more info about this problem.

I have discovered that as soon as there are more then 5 sats it freezes.
It sees enough sats sometimes 11 inside most of the time 9, not tested outside till its working right.
When I have more then 5 sats it freezes, then i cover the GPS with my hand and as soon as it reaches less then 5 sats the latitude, longitude, distance to home, altitude and speed start moving again, but when there are more then 5 sats these values freeze again.

Re: GPS integration

Posted: Sat Apr 21, 2012 11:58 am
by jevermeister
Have u tried to set the sats to 4 manually to see if it is a code problem?

Re: GPS integration

Posted: Sun Apr 22, 2012 10:04 am
by KeesvR
I don't know how to do that, can you give me a hint.

Re: GPS integration

Posted: Sun Apr 22, 2012 10:10 am
by jevermeister
look in the code where the value is assigned and assign 4 manually.

Nils

Re: GPS integration

Posted: Sun Apr 22, 2012 10:17 am
by KeesvR
Is it oke when I remover these signs in red?
Sorry but I'm not a coder :?

    if (_i2c_gps_status & I2C_GPS_STATUS_3DFIX) { //Check is we have a good 3d fix (numsats>5)
       GPS_fix = 1;                                                                   //Set fix
       GPS_numSat = (_i2c_gps_status & 0xf0) >> 4;                                    //Num of sats is stored the upmost 4 bits of status


Re: GPS integration

Posted: Sun Apr 22, 2012 10:29 am
by jevermeister
Hi,
I am not into the code right now but I would try to do the following:
Since the code is beeing computed seqential you need to overwrite the varaiba GPS_numSat directly after it has been written the last time before it will be used.

Think about the following example: You detect the number of satellites and transfer it to the gui, then you need to overwrite it between these two lines.

If the problem still occurs now, then you can be sure, that the multiwii code has no problems and that the problem is in the code on the gps side itself.

Nils

Re: GPS integration

Posted: Sun Apr 22, 2012 11:11 am
by KeesvR
Thank you Nils, I appreciate you like to help me, but I really don't know what I do when I change something in the code.

Is it right when i change this ">> 4" (bigger then) to this "== 4 (equal to).

Re: GPS integration

Posted: Sun Apr 22, 2012 12:07 pm
by jevermeister
You are very welcome.

We all learn by helping each other.

This is not "bigger than". this is a right shift, it is a mathematical opration not a comparison.

Take a look at this page (I always have it open while programming) :

http://processing.org/reference/

The right shift is described here:http://processing.org/reference/rightshift.html

Nils

Re: GPS integration

Posted: Sun Apr 22, 2012 1:23 pm
by KeesvR
Thanks again, time to learn for me to better understand all these things.

Re: GPS integration

Posted: Sat Apr 28, 2012 2:50 pm
by ankimo
MelihK wrote:Improved version of EOS Bandit's I2C GPS Code,

Features:
  • 9600 baud standard GPS switching code added, this MTK command switching the GPS module to 115200 baud. You can use same command set with any baudrate to 115200
  • NMEA sentence configurator MTK command added. It is removing useless NMEA codes from the stream.
  • LED indicator added. Arduino LED(pin 13) blinking for 3 seconds at start and very short blinks after GPS lock.

@EOS Bandit, Please check it and add into your repository, if they are useful features.

I2C_GPS_NAV.zip

Hi MelihK

I bought Navigatron_I2C_GPS at the end of last month.

I wanted for a GPS cycle to be 10 Hz, and replaced I2 C_GPS_NAV.zip.
However, it cannot operate in a huge I2C error.
It tried on Wii2.0.

Where is the original firmware downloadable?

Furthermore, the method of setting GPS to 10 Hz?

Best regards
Kazz

Re: GPS integration

Posted: Sat Apr 28, 2012 8:05 pm
by EOSBandi
Hi Kazz,
The original code is here http://code.google.com/p/i2c-gps-nav/
MelihK's changes will be added shortly..
Bandi

PID based gps pos hold

Posted: Sat Apr 28, 2012 8:26 pm
by EOSBandi
Hi All,
Since nobody started to work on this, and I promised a significant update to i2cGPS code. I ported the arducopter loiter (pos hold) code to MultiWii. I just flown a first couple of packs to sort out coding errors, and it seems to work. It's based on a PI+PID controller (PI for speed and PID for rate (inclination) to reach speed). I did not do any PID tunung yet. But it quite OK with the default parameters. (Significantly better than the current rudimentary code). Here is a quick video : http://www.youtube.com/watch?v=6iYM1LBG680

I'll post the code till the end of this weekend. Currently it's not polished, and due memory constraints runs only ot AtMega2560 based boards. I'll add it to the i2cGPS code, so AtMega328 boards could benefit from it too.
Stay tuned.

Re: GPS integration

Posted: Sat Apr 28, 2012 8:34 pm
by msev
Is atmega1280 too small?

Re: GPS integration

Posted: Sat Apr 28, 2012 8:41 pm
by EOSBandi
atmega 1280 will be ok

Re: GPS integration

Posted: Sat Apr 28, 2012 8:48 pm
by LuFa
EOSBandi you are a Big Hero for me !

when did you plan to put this code into your i2cGPS code ?
Cant wait to test it ;D

Thanks so mutch !

Re: GPS integration

Posted: Sun Apr 29, 2012 1:29 am
by Wayne
Thank you EOSBandi, I hope to see results like yours.
Question: Will serial GPS include your improvements?
If not I have a retired Warthox board I may put into service as i2cGPS.
Keep up the good work!
Wayne

Re: GPS integration

Posted: Sun Apr 29, 2012 10:09 am
by EOSBandi
I do my dev with a serial GPS, and an atmega2560 board. It's more easier to debug the algorithm that runs with the multiwii code, once the code is OK i'll put it into the i2cgps board. This method esures that both platforms are got the code :D

Re: GPS integration

Posted: Sun Apr 29, 2012 10:35 am
by Bledi
EOSBandi, I don't know if you have see that : viewtopic.php?f=8&t=1551
For the moment we use the SD to store GPS nav datas (KML file for google map)
We can use it to read the WP datas.
As the board is based on a modified version of your I2CGPS, it will be fine to develop a comun solution the the WP (for board with or without SD)
What do you think about it ?

Re: GPS integration

Posted: Sun Apr 29, 2012 1:19 pm
by EOSBandi
Hi Bledi,
Yes I saw that and altought it's an obvious idea, I think it just an interim solution. (I admit this is covinient). This definitely OK for logging GPS nav data, but does not work for storing other multiwii nav and control parameters. My idea is to log critical parameters (such as gyro/acc data, PID integrators and pid errors in real time (up to 50Hz) which helps to fine tune control algorithms.
The problem with the SD card is speed, the added overhead of the file system prohibits storing even GPS + nav PID data at 10Hz.

I ported Arducopter dataflash logging to MultiWii, which uses a RAM buffered FLASH chip to store log data, and will release it along with the new WinGUI 2.0

So SD cardis OK as a fancy feature, but not really helpfull as a debug/dev tool.

Andras

Re: GPS integration

Posted: Sun Apr 29, 2012 1:29 pm
by KeesvR
@EOSBandi: Have you seen my problem? What do you think about this?
viewtopic.php?p=12548#p12548

I'm not the only one with this problem.

Re: GPS integration

Posted: Sun Apr 29, 2012 1:52 pm
by EOSBandi
It seems that your gps has something with the 3d fix indicator (it could be even a code error on my side) for a quick fix, you can use 2DFIX checking....

Code: Select all

   if (_i2c_gps_status & I2C_GPS_STATUS_2DFIX) { //Check is we have a good 3d fix (numsats>5)

Re: GPS integration

Posted: Sun Apr 29, 2012 3:23 pm
by micropuller
Hello EOSBandi.
I'm having the same problems as KeesvR.
I tried your quick fix (at least I think I did. I presume you meant to say to just change "I2C_GPS_STATUS_3DFIX" into "I2C_GPS_STATUS_2DFIX"?), allas with the same results.
Could you please direct me to where in the code the 3D fix is implemented? I tried searching for it, but couldn't find it at first glance.

Re: GPS integration

Posted: Sun Apr 29, 2012 4:00 pm
by KeesvR
I also tried this with the same result as Micropuller.

We both live in The Netherlands so our altitude is below sea level, maybe this has something to do with this.
I know PatrikE said something about this in the past.

I've found it:
viewtopic.php?p=10757#p10757

Re: GPS integration

Posted: Sun Apr 29, 2012 9:25 pm
by dramida
I am glad to see that the main GPS navigation function is fine-tuned.

Actually i am using GPS functions on a 328 board with serial 0 realocated to serial GPS and GUI disabled by commenting serialCom() function.

I hope that Bandi's newly implemented algorithm for pos hold to fit in 328 processor also.

Re: GPS integration

Posted: Sun Apr 29, 2012 9:56 pm
by EOSBandi
KeesvR wrote:I also tried this with the same result as Micropuller.

We both live in The Netherlands so our altitude is below sea level, maybe this has something to do with this.
I know PatrikE said something about this in the past.

I've found it:
viewtopic.php?p=10757#p10757


Strange, I checked code and it should not be confused by a negative altitude. Could you send me a gps output log ? (Just connect your gps to serial monitor).

You also can remove the altitude parsing part :

Code: Select all

                      case 9: i2c_dataset.altitude = atoi(string);
                              break;

Re: GPS integration

Posted: Sun Apr 29, 2012 10:03 pm
by EOSBandi
dramida wrote:I am glad to see that the main GPS navigation function is fine-tuned.

Actually i am using GPS functions on a 328 board with serial 0 realocated to serial GPS and GUI disabled by commenting serialCom() function.

I hope that Bandi's newly implemented algorithm for pos hold to fit in 328 processor also.


I think it's impossible. The current MultiWii code is pushing the envelope on 328 proc. It's not only program memory issue but also a ram issue. As I see, for a 328 flight controller, you have to have an i2cGPS nav board.

Re: GPS integration

Posted: Mon Apr 30, 2012 9:15 am
by micropuller
EOSBandi wrote:Could you send me a gps output log ? (Just connect your gps to serial monitor).

I'd be glad to help, but I'm not sure how to do that. Do I connect the GPS to an Arduino over I2C and then read the serial monitor?
Or do I use an FTDI cable or breakout board to connect it to the pc directly?
And how do I save the data from the serial monitor?

Re: GPS integration

Posted: Mon Apr 30, 2012 12:32 pm
by ApoC
Today i had time to test the GPS Feature. Dev from the 14th.

Flyduino Mega, serial FMP04 GPS, Quad from Jakub and 950kV Suppos. 10x4,5 Props.
In the GUI i have Lock and sats. If i go away with my COpter, the distance to home increase. Seems to work, or?

I connected my Lipo, waited till the LED is flashing (Lock). Flown and switched to RTH. My Copter goes crazy and hitted the Ground - not really, because i switched back to Level und hold it in the air. ;)

So i tested it again. Same result. So i tested Posi-Hold. The Copter doesnt hold his position. Flies away.

So what i have to to, to check, whats wrong?

Re: GPS integration

Posted: Mon Apr 30, 2012 1:28 pm
by KeesvR
EOSBandi wrote:
KeesvR wrote:I also tried this with the same result as Micropuller.

We both live in The Netherlands so our altitude is below sea level, maybe this has something to do with this.
I know PatrikE said something about this in the past.

I've found it:
viewtopic.php?p=10757#p10757


Strange, I checked code and it should not be confused by a negative altitude. Could you send me a gps output log ? (Just connect your gps to serial monitor).

You also can remove the altitude parsing part :

Code: Select all

                      case 9: i2c_dataset.altitude = atoi(string);
                              break;


I tried this but no good result.
I discovered that the blue led on the Flytro Navigatron doesn't flash when there is a 3D-Fix.

I tried to make an output log, I did this on my old Laptop I use in the working room, but I've a bad internet connection over there. So I gone inside to my PC but with this I get nothing in the serial monitor, so gone back to my laptop but got the same result nothing on the screen, when I tried it earlier I get some numbers but I haven't stored them. I don't know how to store them but I would make a screenshot of it.

I connected the Navigatron by the FTDI to the computer.
Open the serial monitor and set baudrate to 115200.
I don't know if I loaded the sketch to arduino when I had these numbers, but tried it both ways.

When I disconnect the Navigatron when its locked I get I2C error (thats normal) when I connect it again its working again for some (5 to 10) seconds, then it locks again.

Re: GPS integration

Posted: Mon Apr 30, 2012 3:26 pm
by micropuller
@KeesvR: I do get a flashing blue led when there's a 3D fix. It's on the bottom of the board, did you look there?

I also tried getting data from the GPS and I think I was succesful. Here's what I did:

- connected the Flytron GPS to an arduino, using the I2C pins.
- uploaded the code that can be found on the Flytron website to the arduino: http://www.flytron.com/pdf/Navigatron_Master.pde
- opened the serial monitor. I got readings, but after some time (anywhere between a couple of seconds and maybe a minute), the stream of data stopped.
- closed the serial monitor and opened it up again. The readings resumed, but again only for a short while.

As I don't have a program that will let me log the data, I made a capture of the X-CTU window: http://youtu.be/REejlid8GUY

Edit: another strange thing: in the movie I didn't move the GPS. But when I tried just now, the readings didn't change.
I didn't walk around with the unit, as it's connected to my desktop at the moment, but I moved it for at least a meter. Shouldn't the values be increasing / decreasing?

Re: GPS integration

Posted: Mon Apr 30, 2012 5:03 pm
by KeesvR
For me the serial monitor doesn't work with the FTDI.
I tried it with bluetooth then it was working.

I've set my FTDI to 3.3V especially for the Navigatron, maybe thats the reason why its not working like it should.

Re: GPS integration

Posted: Tue May 01, 2012 12:39 am
by dramida
ApoC wrote:Today i had time to test the GPS Feature. Dev from the 14th.

Flyduino Mega, serial FMP04 GPS, Quad from Jakub and 950kV Suppos. 10x4,5 Props.
In the GUI i have Lock and sats. If i go away with my COpter, the distance to home increase. Seems to work, or?

I connected my Lipo, waited till the LED is flashing (Lock). Flown and switched to RTH. My Copter goes crazy and hitted the Ground - not really, because i switched back to Level und hold it in the air. ;)

So i tested it again. Same result. So i tested Posi-Hold. The Copter doesnt hold his position. Flies away.

So what i have to to, to check, whats wrong?


Obviously, your magnetometer is misconfigured or is affected by the magnetic field of power distribution. A three simple tests to diagnose the problem:

Test 1: Rotate the copter and observe GUI, it shoul rotate accordingly
Test 2: Lean the copter sideways and observe GUI for orientation. It shouldn't change the heading even if it is leaning.
Test 3: (after test 1 and 2 are successful) Keep the copter firmly in your hand, put your throttle to maximum and watch the heading in GUI. If heading varies with throttle, it means the magnetometer is too close to power distribution conductors and the magnetic field generated bu high currents is affecting it.

So, before testing GPS navi, make shure that Care Free mode is working properly.

Re: GPS integration

Posted: Tue May 01, 2012 10:31 am
by EOSBandi
KeesvR wrote:For me the serial monitor doesn't work with the FTDI.
I tried it with bluetooth then it was working.

I've set my FTDI to 3.3V especially for the Navigatron, maybe thats the reason why its not working like it should.


I checked the Navigatron schematics, Theoretically you can plug a 3v3 ftdi into it and access the GPS module directly.
I recommend to load the led blinking sample into the Navigatron to avoid interference on the serial bus. Then the GPS output should be available on the FTDI. Check different serial speeds, since I don't know what is the default setting for the GPS module used by MahliK.
You have to see NMEA sentences "$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47" coming on your terminal...
(Use PUTTY http://www.chiark.greenend.org.uk/~sgta ... nload.html)

Re: GPS integration

Posted: Tue May 01, 2012 11:58 am
by micropuller
Here's mine:

Code: Select all

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2012.05.01 12:54:28 =~=~=~=~=~=~=~=~=~=~=~=
$GPGGA,105427.000,5241.3123,N,00514.1929,E,1,8,1.12,-11.1,M,46.9,M,,*46
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.40,1.12,0.84*0C
$GPRMC,105427.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*65
$GPGGA,105428.000,5241.3123,N,00514.1929,E,1,8,1.12,-11.1,M,46.9,M,,*49
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.40,1.12,0.84*0C
$GPRMC,105428.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*6A
$GPGGA,105429.000,5241.3123,N,00514.1929,E,1,8,1.12,-11.1,M,46.9,M,,*48
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.40,1.12,0.84*0C
$GPRMC,105429.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*6B
$PMTK001,314,3*36
$GPGGA,105430.000,5241.3123,N,00514.1929,E,1,8,1.22,-11.1,M,46.9,M,,*43
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.97,1.22,1.55*08
$GPRMC,105430.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*63
$GPGGA,105431.000,5241.3123,N,00514.1929,E,1,8,1.22,-11.1,M,46.9,M,,*42
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.97,1.22,1.55*08
$GPRMC,105431.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*62
$GPGGA,105432.000,5241.3123,N,00514.1929,E,1,8,1.22,-11.1,M,46.9,M,,*41
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.97,1.22,1.55*08
$GPRMC,105432.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*61
$GPGGA,105433.000,5241.3123,N,00514.1929,E,1,8,1.22,-11.1,M,46.9,M,,*40
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.97,1.22,1.55*08
$GPRMC,105433.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*60
$GPGGA,105434.000,5241.3123,N,00514.1929,E,1,8,1.22,-11.1,M,46.9,M,,*47
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.97,1.22,1.55*08
$GPRMC,105434.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*67
$GPGGA,105435.000,5241.3123,N,00514.1929,E,1,8,1.12,-11.1,M,46.9,M,,*45
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.40,1.12,0.84*0C
$GPRMC,105435.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*66
$GPGGA,105436.000,5241.3123,N,00514.1929,E,1,8,1.12,-11.1,M,46.9,M,,*46
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.40,1.12,0.84*0C
$GPRMC,105436.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*65
$GPGGA,105437.000,5241.3123,N,00514.1929,E,1,8,1.12,-11.1,M,46.9,M,,*47
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.40,1.12,0.84*0C
$GPRMC,105437.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*64
$GPGGA,105438.000,5241.3123,N,00514.1929,E,1,8,1.12,-11.1,M,46.9,M,,*48
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.40,1.12,0.84*0C
$GPRMC,105438.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*6B
$GPGGA,105439.000,5241.3123,N,00514.1929,E,1,8,1.12,-11.1,M,46.9,M,,*49
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.40,1.12,0.84*0C
$GPRMC,105439.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*6A
$GPGGA,105440.000,5241.3123,N,00514.1929,E,1,8,1.12,-11.1,M,46.9,M,,*47
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.40,1.12,0.84*0C
$GPRMC,105440.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*64
$GPGGA,105441.000,5241.3123,N,00514.1929,E,1,8,1.12,-11.1,M,46.9,M,,*46
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.40,1.12,0.84*0C
$GPRMC,105441.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*65
$GPGGA,105442.000,5241.3123,N,00514.1929,E,1,8,1.12,-11.1,M,46.9,M,,*45
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.40,1.12,0.84*0C
$GPRMC,105442.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*66
$GPGGA,105443.000,5241.3123,N,00514.1929,E,1,8,1.12,-11.1,M,46.9,M,,*44
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.40,1.12,0.84*0C
$GPRMC,105443.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*67
$GPGGA,105444.000,5241.3123,N,00514.1929,E,1,8,1.22,-11.1,M,46.9,M,,*40
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.97,1.22,1.55*08
$GPRMC,105444.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*60
$GPGGA,105445.000,5241.3123,N,00514.1929,E,1,8,1.22,-11.1,M,46.9,M,,*41
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.97,1.22,1.55*08
$GPRMC,105445.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*61
$GPGGA,105446.000,5241.3123,N,00514.1929,E,1,8,1.22,-11.1,M,46.9,M,,*42
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.97,1.22,1.55*08
$GPRMC,105446.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*62
$GPGGA,105447.000,5241.3123,N,00514.1929,E,1,8,1.12,-11.1,M,46.9,M,,*40
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.40,1.12,0.84*0C
$GPRMC,105447.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*63
$GPGGA,105448.000,5241.3123,N,00514.1929,E,1,8,1.22,-11.1,M,46.9,M,,*4C
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.97,1.22,1.55*08
$GPRMC,105448.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*6C
$GPGGA,105449.000,5241.3123,N,00514.1929,E,1,8,1.22,-11.1,M,46.9,M,,*4D
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.97,1.22,1.55*08
$GPRMC,105449.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*6D
$GPGGA,105450.000,5241.3123,N,00514.1929,E,1,8,1.22,-11.1,M,46.9,M,,*45
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.97,1.22,1.55*08
$GPRMC,105450.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*65
$GPGGA,105451.000,5241.3123,N,00514.1929,E,1,8,1.22,-11.1,M,46.9,M,,*44
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.97,1.22,1.55*08
$GPRMC,105451.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*64
$GPGGA,105452.000,5241.3123,N,00514.1929,E,1,8,1.12,-11.1,M,46.9,M,,*44
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.40,1.12,0.84*0C
$GPRMC,105452.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*67
$GPGGA,105453.000,5241.3123,N,00514.1929,E,1,8,1.12,-11.1,M,46.9,M,,*45
$GPGSA,A,3,07,05,13,28,10,26,08,02,,,,,1.40,1.12,0.84*0C
$GPRMC,105453.000,A,5241.3123,N,00514.1929,E,0.00,130.18,010512,,,A*66


I used a 3.3V FTDI bob. Serial speed was 115200.
Didn't load the "blink" sketch, hope it doesn't matter too much.
BTW: I left the Putty window open and it's still putting out data, no freezing whatsoever.

Re: GPS integration

Posted: Tue May 01, 2012 3:52 pm
by Galumbo
dramida wrote:
ApoC wrote:Today i had time to test the GPS Feature. Dev from the 14th.

Flyduino Mega, serial FMP04 GPS, Quad from Jakub and 950kV Suppos. 10x4,5 Props.
In the GUI i have Lock and sats. If i go away with my COpter, the distance to home increase. Seems to work, or?

I connected my Lipo, waited till the LED is flashing (Lock). Flown and switched to RTH. My Copter goes crazy and hitted the Ground - not really, because i switched back to Level und hold it in the air. ;)

So i tested it again. Same result. So i tested Posi-Hold. The Copter doesnt hold his position. Flies away.

So what i have to to, to check, whats wrong?


Obviously, your magnetometer is misconfigured or is affected by the magnetic field of power distribution. A three simple tests to diagnose the problem:

Test 1: Rotate the copter and observe GUI, it shoul rotate accordingly
Test 2: Lean the copter sideways and observe GUI for orientation. It shouldn't change the heading even if it is leaning.
Test 3: (after test 1 and 2 are successful) Keep the copter firmly in your hand, put your throttle to maximum and watch the heading in GUI. If heading varies with throttle, it means the magnetometer is too close to power distribution conductors and the magnetic field generated bu high currents is affecting it.

So, before testing GPS navi, make shure that Care Free mode is working properly.


I've got the same problems like ApoC. The position hold does not work.
The carefree (head free) mode is working perfectly and in the GUI the GPS found more than 3 satellites.
What can I do to teach my copter believing and using the gps signal?

Re: GPS integration

Posted: Tue May 01, 2012 8:11 pm
by dr.tom
GPS is working ok (Navigatron I2C on Crius SE FC)

ImageImage



but when model is lets say 100m away, when RTH activates, it rushes at full speed to target, and overshots drastically,
then stops, and rushes back, overshots, and so on...

if activated at <5m, it works ok, stable at first, then after some time starts to slowly circle around the target.

Looking forward to EosBandi's code for I2C gps units, his video of GPS working is awesome! :shock:

Re: GPS integration

Posted: Tue May 01, 2012 9:10 pm
by micropuller
I've read about several people that are using the navigatron without problems, yet me an KeesvR are having problems with the data freezing.
As it looks like it's not a problem with the GPS module itself, could it be that there are units with faulty software?
I'd like to try and upload the software again, but I have no experience using an ftdi board.
Can I just put the code into an Arduino sketch, connect the Navigatron to the USB port using the ftdi board and upload the software to the chip?
Do I have to cross the tx / rx wires or not?

Re: GPS integration

Posted: Tue May 01, 2012 9:16 pm
by jevermeister
dr.tom wrote:GPS is working ok (Navigatron I2C on Crius SE FC)

Image



but when model is lets say 100m away, when RTH activates, it rushes at full speed to target, and overshots drastically,
then stops, and rushes back, overshots, and so on...

if activated at <5m, it works ok, stable at first, then after some time starts to slowly circle around the target.

Looking forward to EosBandi's code for I2C gps units, his video of GPS working is awesome! :shock:


Oh come on, does anybody read this thread?!

Alex and I stated a million times, that the GPS RTH feauture is only a test implementation.

It computest the angle to tilt into target direction in relation to distance.
THIS CANNOT WORK FOR PERFECT RTH

you have to compute speed in relation to distance - so the copter can slow down and even brake before reaching home. No it only can tilt to zero degerees when reaching home but the velocity is still there.

Sit down and code something better guys.

Nils

ps.: Sorry for the harsh tone but plz read the posts before complaining ;-)

Re: GPS integration

Posted: Tue May 01, 2012 10:02 pm
by marbalon
jevermeister wrote:
ps.: Sorry for the harsh tone but plz read the posts before complaining ;-)


Please read this thread careful before your write the same about others - you miss this post:

viewtopic.php?f=8&t=649&start=460#p12970

I think this is quite enough for most people.

Re: GPS integration

Posted: Tue May 01, 2012 10:03 pm
by dr.tom
That wasn't complaining :(
I was happy it works, so it can bring the model back if it wonders away on some noob pilot :)
That's a nice new feature. I realize it's not perfect yet, but good enough for emergency cases...

And mentioned what marbalon has just linked, an new and improved approach to GPS RTH function from EosBandi...

Re: GPS integration

Posted: Tue May 01, 2012 10:06 pm
by jevermeister
dr.tom wrote:That wasn't complaining :(
I was happy it works, so it can bring the model back if it wonders away on some noob pilot :)
That's a nice new feature. I realize it's not perfect yet, but good enough for emergency cases...

And mentioned what marbalon has just linked, an new and improved approach to GPS RTH function from EosBandi...



Okay mate,
I am sorry for that last post - I am in quite a bitter mood right now.

Nobody is a noob here - you built your quad buy yourself - that is quite an accomplishment!

Re: GPS integration

Posted: Tue May 01, 2012 10:13 pm
by dr.tom
OK, no hard feelings mate :)

been building and flying multis for almost 3 years,
a lot of soldering and drilling, but no experience in coding new stuff :(
http://www.youtube.com/user/TomRi25

you people are great, providing your knowledge and makind MWC a bettter and better every day for rest ofus to fly. thank you all. :)

Re: GPS integration

Posted: Tue May 01, 2012 10:18 pm
by jevermeister
dr.tom wrote:OK, no hard feelings mate :)

been building and flying multis for almost 3 years,
a lot of soldering and drilling, but no experience in coding new stuff :(
http://www.youtube.com/user/TomRi25

you people are great, providing your knowledge and makind MWC a bettter and better every day for rest ofus to fly. thank you all. :)



Youtube cchannel subscribed - WOW that is so smooth.

Send a pm about your setup man.

mine is here
http://ncopters.blogspot.com


BTW: Thanks for taht last statement: Everytime wee see a Multiwii like yours in the air - that is our reward :-)

Re: GPS integration

Posted: Wed May 02, 2012 11:38 am
by micropuller
Ok, according to Melih from Flytron, the problem isn't in the Navigatron, but in the GUI: http://forum.flytron.com/viewtopic.php?f=4&t=338&p=2829#p2829
That would explain a lot.

Re: GPS integration

Posted: Wed May 02, 2012 1:17 pm
by EOSBandi
Guys, I need a little help. Honestly vector algebra and trigonometrics are not my favourite topics, and I'm stuck with a final step of poshold implementation..

I have a nav_lon and nav_lat calculated which tells the desired banking (nav_lat - North/South where North is positive and South is negative, and nav_lon West/East where West negative and East is positive). Now I have to rotate this vector into the copter's frame of reference.

By the book is's easy :
pitch = nav_lon*cos_yaw-nav_lat*sin_yaw
roll = nav_lon*sin_yaw+nav_lat*cos_yaw

Where sin_yaw and cos_yaw is the sin and cos of heading from compass.
However I'm not sure about the +/- combinations... Could somebody take a look and advise ?

Thanks,
Andras

Re: GPS integration

Posted: Wed May 02, 2012 1:38 pm
by Bledi
just a question because I don't find the answer : Why is it not possible (for the moment) to have a Position Hold (different of the home) on I2C GPS ?

Re: GPS integration

Posted: Wed May 02, 2012 1:46 pm
by Tommie
Does position hold work on serial GPS? Why not optionally implement a mode in which the course calculation is done by the main ATMega328 and only position information is transferred via I²C (like with tiny-gps viewtopic.php?f=8&t=1549)?