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
KeesvR
Posts: 194
Joined: Fri May 27, 2011 6:51 pm
Location: The Netherlands

Re: GPS integration

Post by KeesvR »

I think my GPS is not working anymore.
So I can't test anymore.

MelihK
Posts: 13
Joined: Sat Feb 18, 2012 10:00 pm

Re: GPS integration

Post by MelihK »

EOSBandi wrote: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..


Good News: I'm writing GPS position and LOS calculation codes since years because of SimpleOSD(I'm the designer). I have alot of code part and experience about fast sin/cosin calculations and heading.
Bad News: Now I'm in the winter house(in the city center) and finding a test place is impossible for me. I'm planning to go to summer house in 4 weeks and i will help about coding :)

Cheers
Melih

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: GPS integration

Post by Katch »

Can someone post a summary of what behaviour to expect while testing the i2c GPS code please?

I've just installed a Flytron i2c on my Warthox MWC with Free IMU 0.3.5.MS.

My headfree mode is working nicely and I get a 3D fix on my GPS.

At the moment when I turn on POS hold the Quad goes off on a little adventure way over there somewhere.

Haven't tested RTH but I understand I should expect the quad to strafe the sh*t out of me and then go for a little adventure way over there somewhere.

Is this basically where we are at right now with the latest dev code.

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

Re: GPS integration

Post by EOSBandi »

Katch wrote:Can someone post a summary of what behaviour to expect while testing the i2c GPS code please?

I've just installed a Flytron i2c on my Warthox MWC with Free IMU 0.3.5.MS.

My headfree mode is working nicely and I get a 3D fix on my GPS.

At the moment when I turn on POS hold the Quad goes off on a little adventure way over there somewhere.

Haven't tested RTH but I understand I should expect the quad to strafe the sh*t out of me and then go for a little adventure way over there somewhere.

Is this basically where we are at right now with the latest dev code.


I recommend to wait a couple of days... I'll release a new gps code very soon. It seems that I managed to figured out the vector rotation. Will have a test fly tomorrow, then publish...

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

Re: GPS integration

Post by jevermeister »

Eosbandi,
What are you trying to do?

If you want to implement poshold just copy alex code to have the same behavior for start.
If sou wwnt to code w better solution you have to control the approadhing speed as afunction of tilt angle.

Nils
Ps. I am in my summer house now and only uee my pad. I will try to help when I am back ih my lab - oh yes: The lab!!!

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: GPS integration

Post by mbrak »

hi andras

good news :)

will you release both (serial and i2c)?

some posts before i read that you develop the code on a mega2560 with serial gps :)
my copter has a 2560 with serial gps :)

we are waiting patiently :) :) :)

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: GPS integration

Post by mbrak »

offtopic on

summerhouse, winterhouse, lab......

whats going on here ? :)

have you won in the lottery? :)

offtopic off

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

Re: GPS integration

Post by jevermeister »

mbrak wrote:offtopic on

summerhouse, winterhouse, lab......

whats going on here ? :)

have you won in the lottery? :)

offtopic off


The so called summer house is the old farm of my father in law. My lab is an underground lair with lots of spiders and stuff.

Sorry no lottery.

Nils

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: GPS integration

Post by Katch »

EOSBandi wrote:
Katch wrote:Can someone post a summary of what behaviour to expect while testing the i2c GPS code please?

I've just installed a Flytron i2c on my Warthox MWC with Free IMU 0.3.5.MS.

My headfree mode is working nicely and I get a 3D fix on my GPS.

At the moment when I turn on POS hold the Quad goes off on a little adventure way over there somewhere.

Haven't tested RTH but I understand I should expect the quad to strafe the sh*t out of me and then go for a little adventure way over there somewhere.

Is this basically where we are at right now with the latest dev code.


I recommend to wait a couple of days... I'll release a new gps code very soon. It seems that I managed to figured out the vector rotation. Will have a test fly tomorrow, then publish...


Will this require reprogramming the Arduino on the i2c GPS BoB?

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

Re: GPS integration

Post by PatrikE »

Katch wrote:Will this require reprogramming the Arduino on the i2c GPS BoB?


Yepp...

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,
What are you trying to do?

If you want to implement poshold just copy alex code to have the same behavior for start.
If sou wwnt to code w better solution you have to control the approadhing speed as afunction of tilt angle.



Well,
I'm porting this http://code.google.com/p/arducopter/wiki/AC2_loiter_PID which is a proven method, and most of the code is available in arduino format. Almost finished...

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

Re: GPS integration

Post by jevermeister »

Hey Andras,
That is exactly what I wm talking about.cool. I tried to export the mikrokopter code but hwd problems importing it into the code.

Andras,if you need help or ideas,please contact me. I am very interested in helping you.

Nils

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

Re: GPS integration

Post by dr.tom »

I know you are doing a great job and putting a lot of effort, thank you all.
here's just a thought, when you are already taking GPS speeds into equations of rth...

it would be nice if in upcoming config or gps section of the code, we could define some things if needed
- max ground speed of rth function (if we don't need to come fast from far away, but rather calm speed)
- facing the model to rth point while returning, now it stays oriented as it was, only tilts to home, doesn't turn
(would be better for AP and FPV use)
Last edited by dr.tom on Thu May 03, 2012 2:01 pm, edited 1 time in total.

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

Re: GPS integration

Post by Bledi »

an other factor that is look interesting for secure is the altimeter for return to home.
if we use return to home is often because we are at long distance so we need to come back without going into a tree. By putting a min altitude for the return to home in secure conditions.

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

Re: GPS integration

Post by EOSBandi »

Bledi wrote:an other factor that is look interesting for secure is the altimeter for return to home.
if we use return to home is often because we are at long distance so we need to come back without going into a tree. By putting a min altitude for the return to home in secure conditions.


First : Stable poshold.
Second : Rate based, cross track corrected RTH
All others after these two...

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

Re: GPS integration

Post by Bledi »

+1 :)

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

Re: GPS integration

Post by shikra »

+1 too!!
Nice work EOS

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

Re: GPS integration

Post by EOSBandi »

OK Folks,

I can not hold it back anymore, here is a work-in-progress http://code.google.com/p/multiwii-gps-work/
release. It's a vanilia MultiWii 2.0 codebase for SERIAL GPS ONLY with the following changes:
-Improved mag calibration. It's crucial to have a dead on compass for gps nav. Alex did a great work on simplifying the mag gain and offset calibration, but it also added some non-linearity.
-Added magnetic decliniation to the heading. You can set it at the beginning of the MultiWii.ino
-Raised resolution of the gps coordinates to 1deg = 10 000 000. I had bad experiences with the pervious lower resolution.
-Added a pos_hold PI and a pos_hold_rate PID controller. See description here : http://code.google.com/p/arducopter/wiki/AC2_loiter_PID
-Using PI and PID controller classes (they are in the libraries folder, copy them to arduino libraries folder)
Notes : PI and PID values are not wired out to the gui yet, you have to change them at the beginning of multiwii.ino.
It's a work in progress now, so i'm continously working on this code. You can try it if you really know what are you doing, please do not use it if you are not familiar with multiwii code. I know this code does not follow standard multiwii coding guidelines (for example using classes and libraries) and not optimalised, so please do not complain for these.
And finally, I do not believe that this code will fit into a 328, so please use 1280 or 2560 based boards for testing.
Once the code is stabilised (more or less) i'll put it to the i2c_gps codebase...
Last edited by EOSBandi on Thu May 03, 2012 9:59 pm, edited 1 time in total.

User avatar
Gaijin
Posts: 82
Joined: Sat Jan 14, 2012 8:00 am

Re: GPS integration

Post by Gaijin »

No complaints, thanks for working on it all. :ugeek:

I look forward to testing the I2C version when you are finished, keep up the good work

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

Re: GPS integration

Post by copterrichie »

Is there a safe way to ground test these new features? I am in the process of building a new copter with a 1280 but it is not totally ready yet or that I would trust for GPS flight testing. I really would like to help out if possible.

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

Re: GPS integration

Post by LuFa »

Hi EOSBandi ,

Today i have test your GPS code :)
but i think there is a proplem into yout code .
After Switch On GPS Position Hold all is ok , but after ~ 20 - 30 sek. the Copter make a Flip :(
I have make around 10 Flights , and 9 of tham End with a Flip after turn On Gps .
The Onetime where the copter makes no Flip was the Firt Flight .
But without Flip , the GPS Wokrs very great !

Im not 100% shure that is it a proplem of your code , its also possible that is it a proplem of my Hardware .

My Setup Is :

QuadX
Multiwii 2.0 Processing Gui
Standart Reveiver
Flyduino Mega
Mediatek GPS with 9600bd
MS5611
ITG3200
HMC5843
ADXL345

GPS is Connect to Serial Port 3 .
PID and Pi Parameter from GPS are default ;)

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:Hi EOSBandi ,

Today i have test your GPS code :)
but i think there is a proplem into yout code .
After Switch On GPS Position Hold all is ok , but after ~ 20 - 30 sek. the Copter make a Flip :(
I have make around 10 Flights , and 9 of tham End with a Flip after turn On Gps .
The Onetime where the copter makes no Flip was the Firt Flight .
But without Flip , the GPS Wokrs very great !

Im not 100% shure that is it a proplem of your code , its also possible that is it a proplem of my Hardware .

My Setup Is :

QuadX
Multiwii 2.0 Processing Gui
Standart Reveiver
Flyduino Mega
Mediatek GPS with 9600bd
MS5611
ITG3200
HMC5843
ADXL345

GPS is Connect to Serial Port 3 .
PID and Pi Parameter from GPS are default ;)


Exactly how do you describe the "flip" ? The GPS code indiced banking is limited to +/- 20deg. So it could not lead to a flip, but could look like an agressive bank.
However it's recommended to use the gps at least 5Hz update rate (10Hz is better) which requires 57kbaud or 112.2K speed.
1Hz is definitely a no go... it throws the pid controller to the extremes.
You can try to limit further the GPS banking by modifying this line in the gps.pde
#define NAV_BANK_MAX 2000
100 = 1deg

ygl611
Posts: 9
Joined: Mon Mar 05, 2012 1:29 am

Re: GPS integration

Post by ygl611 »

Hi EOSBandi

Just tested you new GPS code, "GPS Position Hold"function wokes very great! no flip.
Thanks your wonderful work.
Next step I will test "GO home"function.
BTW, I can say that your code runs on the M328 board very well with a serial 5 Hz Ulbox GPS, of course, "serialCom()" must be commented.

EDIT : "Go home" is also perfect.

Thanks EOSBandi again

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

Re: GPS integration

Post by flyrobot »

Hi ygl611,

Can you share, what ublox gps do you use?

Thanks,
John

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

Re: GPS integration

Post by LuFa »

can you tell me your PID Values ?
today i have found the Flipproplem :D it wars a bad cabel connection .

@ EosBandi , witch GPS Modul did you use ?

ygl611
Posts: 9
Joined: Mon Mar 05, 2012 1:29 am

Re: GPS integration

Post by ygl611 »

flyrobot wrote:Hi ygl611,

Can you share, what ublox gps do you use?

Thanks,
John


I made the Ublox GPS board by myself, use the Ulbox chip NEO6M. GPS PID is defaut value
Last edited by ygl611 on Sat May 05, 2012 2:12 pm, edited 1 time in total.

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

Re: GPS integration

Post by flyrobot »

That is cool.

This gps was using by dji wkm and MK with very good result.

Do you plan to sell with mega 328 ?

John

Quad FRITZ
Posts: 44
Joined: Wed Apr 25, 2012 11:21 pm

Re: GPS integration

Post by Quad FRITZ »

Hello-

Does anybody know how to change the GPS refresh rate of a NAVIGATRON I2C GPS module?
I really would love to test the serial GPS Dev Version of EOSbandi but also see no point in trying this with a refresh rate of 1Hz.
The module should be able to output a 10 Hz position signal.

Thanks and have a nice weekend
Roman

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

Re: GPS integration

Post by EOSBandi »

Quad FRITZ wrote:Hello-

Does anybody know how to change the GPS refresh rate of a NAVIGATRON I2C GPS module?
I really would love to test the serial GPS Dev Version of EOSbandi but also see no point in trying this with a refresh rate of 1Hz.
The module should be able to output a 10 Hz position signal.

Thanks and have a nice weekend
Roman

Current dev is serial gps only.... i2c is still the old code.... stay tuned for the i2c version :D

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

Re: GPS integration

Post by LuFa »

10 flight later :)

I have big proplem with overshoot .
But i know its a proplem of the default setting from the Mediatek GPS , because its only 1hz at 9600bd .
Now i have search for a config tool and have found one :) The name is " Mini GPS Tool" (here is the Download link : http://www.robotshop.com/content/SOFTWA ... s-pa6b.zip) .
Know i have setup 10hz and 115200bd and hope i get a better GPS Position Hold .

now i waiting for the rain does stop outside :D

I will report after the next flight ;)

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

Re: GPS integration

Post by LuFa »

now i have make some test flights with 10hz and 115200bd .

But the Position Hold is not realy better than bevor :(
First 10sek. the Copter Hover at the Hold Position , after some sek. the copter move to one site and the copter goes faster and faster and come not realy back to the Hold position .
Looks like the Compass is wrong , but in GUI the direction is right and also calibrated .

any ideas why ?

EDIT :

what make this line ?

Code: Select all

    SerialWrite(GPS_SERIAL,'$');
    SerialWrite(GPS_SERIAL,'P');
    SerialWrite(GPS_SERIAL,'M');
    SerialWrite(GPS_SERIAL,'T');
    SerialWrite(GPS_SERIAL,'K');
    SerialWrite(GPS_SERIAL,'2');
    SerialWrite(GPS_SERIAL,'2');
    SerialWrite(GPS_SERIAL,'0');
    SerialWrite(GPS_SERIAL,',');
    SerialWrite(GPS_SERIAL,'1');
    SerialWrite(GPS_SERIAL,'0');
    SerialWrite(GPS_SERIAL,'0');
    SerialWrite(GPS_SERIAL,'*');
    SerialWrite(GPS_SERIAL,'2');
    SerialWrite(GPS_SERIAL,'F');
    SerialWrite(GPS_SERIAL,'\r');
    SerialWrite(GPS_SERIAL,'\n');
Last edited by LuFa on Sat May 05, 2012 6:51 pm, edited 1 time in total.

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:now i have make some test flights with 10hz and 115200bd .

But the Position Hold is not realy better than bevor :(
First 10sek. the Copter Hover at the Hold Position , after some sek. the copter move to one site and the copter goes faster and faster and come not realy back to the Hold position .
Looks like the Compass is wrong , but in GUI the direction is right and also calibrated .

any ideas why ?


1. did you check and set your magnetic declination ?
2. try changing pid values for powerful copter, decrease P for weak ones, increase....
3. with bad pid's it must oscillate and/or doing circles, if it's flying away then someting basically wrong....

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

Re: GPS integration

Post by LuFa »

1. declanation is set to 2.55f
2. does i try tomorrow :)
3. yes i think so , but the Compass work , maybe a proplem of X Config ? I can not realy say if the Copter try to fly back , because i stop the copter after 30-40m .

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:1. declanation is set to 2.55f
2. does i try tomorrow :)
3. yes i think so , but the Compass work , maybe a proplem of X Config ? I can not realy say if the Copter try to fly back , because i stop the copter after 30-40m .


just a short question, did you donwnloaded the whole dev code?

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

Re: GPS integration

Post by LuFa »

yes ;)

but i have use copy paste for download your code :) because i have no SVN Client to download it , and i dont know how it work ^^

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: GPS integration

Post by howardhb »

@Lufa,
SerialWrite(GPS_SERIAL,'$');
SerialWrite(GPS_SERIAL,'P');
SerialWrite(GPS_SERIAL,'M');
SerialWrite(GPS_SERIAL,'T');
SerialWrite(GPS_SERIAL,'K');
SerialWrite(GPS_SERIAL,'2');
SerialWrite(GPS_SERIAL,'2');
SerialWrite(GPS_SERIAL,'0');
SerialWrite(GPS_SERIAL,',');
SerialWrite(GPS_SERIAL,'1');
SerialWrite(GPS_SERIAL,'0');
SerialWrite(GPS_SERIAL,'0');
SerialWrite(GPS_SERIAL,'*');
SerialWrite(GPS_SERIAL,'2');
SerialWrite(GPS_SERIAL,'F');
SerialWrite(GPS_SERIAL,'\r');
SerialWrite(GPS_SERIAL,'\n');

This forces the (MediaTek)GPS to output at 10Hz.

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

Re: GPS integration

Post by LuFa »

ok , thanks !

is it need to that that every newstart from the Mwii or does the Mediatek safe this setup ?

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: GPS integration

Post by howardhb »

I've got a DiyDrones MTK2239
When I use MiniGPS_1.4.exe (with FTDI cable direct to the GPS) to change baud rate from 38400 to 115200 and update speed to 10Hz, it works fine, until power is removed.
All settings then revert to default 38400 baud and 1Hz update.

The work-around is to re-configure the GPS at every MultiWii startup.
In config, make a new #define for your defualt GPS baud rate. #define GPS_DEFAULT_BAUD 38400) (DiyDrones GPS is 38400)
and then also define the new GPS baudrate : #define GPS_BAUD 115200
At the end of gps.pde, make a serial function for the GPS,

Code: Select all

void GPS_Send_Char(const char *c) {
  while (*c) SerialWrite(GPS_SERIAL, *c++);
}


Then, in multiwii.pde, a the end of setup(), add the following code, to re-configure the GPS.......

Code: Select all

#if defined(GPS)  // This code sets the MediaTek GPS default 38400 baud to 115200 and set to send NEMA frames
    SerialOpen(GPS_SERIAL,GPS_DEFAULT_BAUD);   
    delay(10);
    GPS_Send_Char("$PMTK251,115200*1F\r\n");      //set baudrate 115200
    delay(10);
    SerialOpen(GPS_SERIAL,GPS_BAUD);   // open the serial port at the new speed
    delay(10);
    GPS_Send_Char("$PMTK314,1,1,1,1,1,5,1,1,1,1,1,1,0,1,1,1,1*2C\r\n");  //set to NMEA output
    delay(10);
    GPS_Send_Char("$PMTK220,100*2F\r\n");         //Will set the GPS to output serial at 10hz
    delay(10);
  #endif

Sometimes my GPS takes over 3 minutes to get a fix, other times, 35 seconds??? :o
Last edited by howardhb on Sat May 05, 2012 10:46 pm, edited 2 times in total.

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

Re: GPS integration

Post by LuFa »

AAAAAAAAaaaaaaHHHHHhhhhhh :D
that is my proplem of the bad GPS Postition Hold 8-) i have set the new setup with Mini-GPS Tool but the GPS doesnt remember the setup after a new start .

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: GPS integration

Post by howardhb »

I'm using dev20120504 and my MAG never showed the correct direction, according to true compass readings, so I added declination and a compass installation angle correction.
Now, the heading indicator in the GUI, shows exactly NORTH (UP) when copter is facing North (used a hiking compass)
I think this is absolutely necessary for the GPS to work properly.

I made 2 defines in config.h:
#define MAG_DECLINATION -272 // NEGATIVE 27.2 degrres in Port Elizabeth
#define MAG_MOUNTING_ANGLE 1800 // My compass is mounted backwards?

In imu.pde: look for heading = _atan2( EstG.V.X * EstM.V.Z - EstG.V.Z * EstM.V.X , EstG.V.Z * EstM.V.Y - EstG.V.Y * EstM.V.Z ) /10;

Code: Select all

  #if MAG
    // Attitude of the cross product vector GxM
    heading = _atan2( EstG.V.X * EstM.V.Z - EstG.V.Z * EstM.V.X , EstG.V.Z * EstM.V.Y - EstG.V.Y * EstM.V.Z  );
    #if defined(MAG_DECLINATION) // defined in Config.h NOTE: negative or positive.  see: http://magnetic-declination.com
        heading += MAG_DECLINATION;   
    #endif
    #if defined(MAG_MOUNTING_ANGLE) // to correct the direction of heading indicator. MAG_MOUNTING_ANGLE defined in Config.h
        heading += MAG_MOUNTING_ANGLE;
    #endif
    heading /= 10;  // dividing by 10 here gives one decimal place precision for declination, without using floating point addition

    if ( heading > 180)   // Once we've added the declination and mounting angle correction, make sure heading is in the range of:   -180 < HEADING > 180
       heading -= 360;
    else if (heading < -180)
    heading += 360;

  #endif

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

Re: GPS integration

Post by LuFa »

@howardhb : have your GPS a backup battery ?

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: GPS integration

Post by howardhb »

You can find your specific declination here: http://magnetic-declination.com/

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: GPS integration

Post by howardhb »

LuFa wrote:@howardhb : have your GPS a backup battery ?


No it doesn't :cry: I've spent hours (many many minutes added up) waiting for GPS fix.....
I might just add a 3V lithium cell or a super capacitor for back-up, for when changing the copter's lipo for a new flight...
MediaTek Battery Backup.png
Last edited by howardhb on Sun May 06, 2012 7:09 am, edited 1 time in total.

Quad FRITZ
Posts: 44
Joined: Wed Apr 25, 2012 11:21 pm

Re: GPS integration

Post by Quad FRITZ »

@EOSBandi

Thank you so much for the quick reply!
I ll stay tuned because it is bejond my horizon to implement it myself ;-) (or at leat I do not have the time :lol: )

Kind regards
Roman

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

Re: GPS integration

Post by LuFa »

does onywhere no , why Serial Sum doesnt work at Arduino Mega and Mwii 2.0 with EOSBandi GPS ?
The Channles move right in the GUI but with big spiks :(
PPM is connect to PIN 19 (Serial1)

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: GPS integration

Post by howardhb »

@Lufa, just add : Look in config.h
For PPM input on the mega, you must:

Code: Select all

/**********************************    Buzzer Pin    **********************************/
// this moves the Buzzer pin from TXO to D8 for use with ppm sum or spectrum sat. RX (not needed if A32U4ALLPINS is active)
 #define D8BUZZER

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

Re: GPS integration

Post by LuFa »

@howardhb : same proplem :( i use graupner MX16 Hott with GR-16

Edit : Have found the proplem ;) the Receiver is defect .

Question to EOSBandi : it the Home and Hold position allready store in :

GPS_latitude_hold
GPS_longitude_hold

and

GPS_latitude_home
GPS_longitude_home

?

thanks ;)
Last edited by LuFa on Sun May 06, 2012 7:24 pm, edited 1 time in total.

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:@howardhb : same proplem :( i use graupner MX16 Hott with GR-16

Edit : Habe found the proplem ;) the Receiver is defect .

Question to EOSBandi : it the Home and Hold position allready store in :

GPS_latitude_hold
GPS_longitude_hold

and

GPS_latitude_home
GPS_longitude_home

?

thanks ;)

Yes

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

Re: GPS integration

Post by LuFa »

great :D is GPS_distanceToHold and GPS_distanceToHome also in use ?

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

Re: GPS integration

Post by EOSBandi »

I pushed a quick update to the code,

Simplify GPS nav correction rotation into copters's frame reference
Increased mag declination calculation precisity based on HowardHB idea http://ww
w.multiwii.com/forum/viewtopic.php?f=8&t=649&sid=b2fce6b235836b8406d1b312d3ae0a1
2&start=530#p13470
Lowered default nav pid-s (still need to be tuned...)

Now moving to i2c_gps.....

Post Reply