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
dramida
Posts: 473
Joined: Mon Feb 28, 2011 12:58 pm
Location: Bucharest
Contact:

Re: GPS integration

Post by dramida »

I am using Crius SE with BMp085, ITG3205, BMA180, HMC5883L.

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

Re: GPS integration

Post by EOSBandi »

I went through the code and did some simulations but did not find anything. I hope tomorrow i'll have a good weather and can do outdoor flight tests with logged telemetry.

mahowik
Posts: 332
Joined: Sun Apr 10, 2011 6:26 pm

Re: GPS integration

Post by mahowik »

Hi guys,

I got 115200/10hz firmware for mtk3339 (with GGA,GSA,RMC frames) from russian forum http://forum.rcdesign.ru/attachment.php ... 1339597323

You need to reflash this with "MT3339 FlashTool v122 for Customer" tool.
Possible to download here:
ftp route: ftp.gtop-tech.com
account: gtop_flash_tool
password: sales101

Already tried to reflash. Works great in MiniGPS1.7.1 ;)

Also if someone need 38400/5hz http://forum.rcdesign.ru/attachment.php ... 1338708322

thx-
Alex

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

Re: GPS integration

Post by dramida »

MTK3339 has the folowing specifications:

Position Accuracy Without aid:3.0m (50% CEP)
DGPS(SBAS(WAAS,EGNOS,MSAS)):2.5m (50% CEP)  


Is any civilian GPS out there witch provide a better accuracy, let's say, double, that means 1.5m?
What about doubling NMEA sentences refresh frequency to 20Hz?

realpastaman
Posts: 93
Joined: Thu Jan 12, 2012 1:10 am

Re: GPS integration

Post by realpastaman »

Please can someone help me with this ....
I have just bought a Navigatron V2 which should need no firmware change (its got the yellow square cpacitor).
When i try the mini gps program and bring up the exrtra tabs, it looks like its running at 1 HZ. If i change it to 10 Hz on mini gps tab, next time I shut it down and restart it seems to go back to 10Hz. Is this normal?

I currently running MultiWii_dev_20120606 on a modified Paris Board and hope to integrate the GPS into this configuration. Ive attached the Navigation V2 to the 5V I2C bus. Ive been looking at this forum and am a bit stuck as what to do next. Ive found the GPS on the MultiWii_dev_20120606 config and changed this to be suitable for the Navigation but I cant work out what to do next as far a programming the Navigation V2 and which sketch I should upload to that?

I have found Eosbandi pdf and files on this stubject but is refers to and older version of Multiwii. Any assistance as what to do next in the case of MultiWii_dev_20120606 would be much appreciated. Many thanks

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

Re: GPS integration

Post by Tazzy »

realpastaman wrote:Please can someone help me with this ....
I have just bought a Navigatron V2 which should need no firmware change (its got the yellow square cpacitor).
When i try the mini gps program and bring up the exrtra tabs, it looks like its running at 1 HZ. If i change it to 10 Hz on mini gps tab, next time I shut it down and restart it seems to go back to 10Hz. Is this normal?

I currently running MultiWii_dev_20120606 on a modified Paris Board and hope to integrate the GPS into this configuration. Ive attached the Navigation V2 to the 5V I2C bus. Ive been looking at this forum and am a bit stuck as what to do next. Ive found the GPS on the MultiWii_dev_20120606 config and changed this to be suitable for the Navigation but I cant work out what to do next as far a programming the Navigation V2 and which sketch I should upload to that?

I have found Eosbandi pdf and files on this stubject but is refers to and older version of Multiwii. Any assistance as what to do next in the case of MultiWii_dev_20120606 would be much appreciated. Many thanks


Hello
Im using the i2c code that is included to r33 that is on dev site to the latest 21120606 dev release, i have also flashed my fmp04 gps to use 115200baud direct after startup else you probably need to send a init string to the gps to change it to 115200 baud.

Read in the i2c code that is included in r33

// Tazzy

realpastaman
Posts: 93
Joined: Thu Jan 12, 2012 1:10 am

Re: GPS integration

Post by realpastaman »

Thanks Tazzy , Im going to try this tonight

widelec
Posts: 4
Joined: Sun Jun 10, 2012 8:28 am

Re: GPS integration

Post by widelec »

I think SKG13C skylab gps will work.
I see today green numsat indicator and duble arrow on GUI interface
Attachments
gps.jpg

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

Re: GPS integration

Post by Mac9 »

Mac9 wrote:Ref Problems with out of sync error Flytron ver 1 Navigatron
Dr Tom,
Thanks for that but my problem is not the flashing of the GPS I haven't got that far, its a problem with uploading the Blink sketch in order to start the flashing.

Regards

John



just try it, I also had out of sync problems and couldn't even flash the blink code....
but with that mod, I was able to flash the atmega with blink, and then the gps chipset itself...
didn't had time to inspect why and where, but just wanted to go out and fly, it worked for me


Tried it and it didnt work. i have concluded that the problem lies with the Arduino / USBasp or the drivers. When I try and upload any sketch to any Atmel processor via the ICSP and my USBasp device the upload script reports the porogrammer to be "arduino", eventhough I have selected USBasp in the tools menu. Can any one recomend a non Serial or Parralell programmer that I can try and they no works. TinyUSB ?

regards

John

warthox
Posts: 65
Joined: Sat Jan 29, 2011 10:05 pm

Re: GPS integration

Post by warthox »

just another short video showing the mwc quad holding position and alt with r33 fw (outdated)...
pids default.

https://vimeo.com/44150553

sismeiro
Posts: 173
Joined: Tue Feb 21, 2012 12:33 pm

Re: GPS integration

Post by sismeiro »

warthox wrote:just another short video showing the mwc quad holding position and alt with r33 fw (outdated)...
pids default. https://vimeo.com/44150553


warthox, not fair... Not only you pilot multicopters like a 3D champ, you also can make them stand still in the air like no other. :D

Edit: how can I check out the r33 version from svn?

Killab
Posts: 10
Joined: Sat Jun 16, 2012 5:42 pm

Re: GPS integration

Post by Killab »

Ok ive done some searching and cant find what i'm looking for, So maybe someone here can help.

I have a quadrino V1e board and i've seen that gps intergration is getting closer. I would like some advise or how to. To get a gps for my quadrino. I know people say its just a multiwii board, but there is alot of those out there, so i get confused as to which is what.

So if someone could advise me on what i would need to get a GPS working for my board i would really appreciate it.

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

Re: GPS integration

Post by Chaosdestro0 »

Best approach is tinygps, just get a 5hz gps unit and connect it up as follows
http://i.imgur.com/ynZVX.png

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:Best approach is tinygps, just get a 5hz gps unit and connect it up as follows
http://i.imgur.com/ynZVX.png

nope, i recommend a serial gps with an atmega boarad or an i2cgps. tiny gps is a dead end since new nav functions will not fit into the atmega328 memory, so you will need either an atmega board or an i2cgps module.

charbot
Posts: 34
Joined: Wed May 23, 2012 8:37 pm

Re: GPS integration

Post by charbot »

tiny gps is a dead end since new nav functions will not fit into the atmega328 memory


bummer. i just built one.

gompf-2
Posts: 136
Joined: Sun Jun 05, 2011 11:46 am

Re: GPS integration

Post by gompf-2 »

tiny gps is a dead end since new nav functions will not fit into the atmega328 memory

Typo and you ment AtTiny?

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

Re: GPS integration

Post by Chaosdestro0 »

EOSBandi wrote:
Chaosdestro0 wrote:Best approach is tinygps, just get a 5hz gps unit and connect it up as follows
http://i.imgur.com/ynZVX.png

nope, i recommend a serial gps with an atmega boarad or an i2cgps. tiny gps is a dead end since new nav functions will not fit into the atmega328 memory, so you will need either an atmega board or an i2cgps module.

So am I right in thinking you can use a second atmega328 as an i2cgps module that will perform the calculations on?

charbot
Posts: 34
Joined: Wed May 23, 2012 8:37 pm

Re: GPS integration

Post by charbot »

yes, mine is working well. I use a second "pro-mini" and mtk3339 gps.

Killab
Posts: 10
Joined: Sat Jun 16, 2012 5:42 pm

Re: GPS integration

Post by Killab »

So the i2cgps does it plug in just like the bluetooth board that i've used? Meaning same spot on the board?

Im not real sure those last post were directed at me, but if it was thanks. Ill look the I2C GPS's up. Any particular one recommended?

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: GPS integration

Post by wilco1967 »

perhaps in the wrong thread, but.....

I just build a TinyGPS module, but ONLY for the HCSR04 ultrasound module..... I got a serial GPS on the Flyduino mega which is perfect connected directly to the Flyduino.
However, I cannot get the HCSR04 working directly on the Mega in the MultiWii software http://www.multiwii.com/forum/viewtopic.php?f=7&t=1033&hilit=sonar&start=80#p11815 (seems the HCSR04 mega code interfers with the newly added TinyGPS code in dev20120606, and I don't feel like going back to bare 2.0)
But the HCSR04 does work on the ATtiny.... (no altitude hold yet, but at least I got a reading in multiwii).

So I think there is a justification for both...... and those ATTiny4313 are very cheap (starting fron 1 euro + shipping)... and it's another toy to play with ;)
But if you're interested in additional features, definitely go the Mega route....

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

Re: GPS integration

Post by flyrobot »

Killab wrote:Ok ive done some searching and cant find what i'm looking for, So maybe someone here can help.

I have a quadrino V1e board and i've seen that gps intergration is getting closer. I would like some advise or how to. To get a gps for my quadrino. I know people say its just a multiwii board, but there is alot of those out there, so i get confused as to which is what.

So if someone could advise me on what i would need to get a GPS working for my board i would really appreciate it.


I have quadrino adv v1 connect to I2C GPS, it works. You can find the I2C pin in the midle of the board (ground, +, SCL and SDA).

John

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

Re: GPS integration

Post by EOSBandi »

POSHOLD issues during YAW

Okay finally I had a calm weather and time for test. I was able to reproduce this behavior (intermittently loosing poshold when yaw) when my copter was not trimmed perfectly. I start the test with a perfectly trimmed copter (in dead calm weather it did not drifted) then poshold stayed within a 2x2m box... then i changed the trim (20 click to left), it was still pretty much flyable but with untouched sticks it definitely started to drift left... posthold was also perfect 2x2m BUT with a trimmed copter i was able to yaw during poshold and it kept the position, on the other hand the out of trim copter significantly changed position when i yawed. 5-8meter, then it slowly crawled back to the holding position.

So it seems that a perfect trim is a must for gps poshold.

alexia
Posts: 85
Joined: Sun Jun 17, 2012 10:23 pm
Contact:

Re: GPS integration

Post by alexia »

HI everybody
first sorry for my english i am french
i have seen lots of post about multiwii gps integration and i am far impressive about it
but i am so scared to see the same thing than arducopter..(too many features and nothing work well..and not userfriendly)
i hope ,it will be not the case but if we use more sensors,more features, it will be difficult to obtain a better code..in my mind we should stop to add sensors and only use that we have already(mpu6050,itg3200)!same thing about gps,it will be good to have an "officiel" gps board
what do you think about that?

ankimo
Posts: 30
Joined: Fri Jan 20, 2012 7:31 am

Re: GPS integration

Post by ankimo »

Please give me advice.
A strange phenomenon occurs in the second half of RTH.
HOME-DIST is displayed as 1220m and a motion is also strange.
What is a cause?
http://www.youtube.com/watch?v=czejk3rw5ow

Kazz

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

Re: GPS integration

Post by dramida »

EOSBandi wrote:POSHOLD issues during YAW

Okay finally I had a calm weather and time for test. I was able to reproduce this behavior (intermittently loosing poshold when yaw) when my copter was not trimmed perfectly. I start the test with a perfectly trimmed copter (in dead calm weather it did not drifted) then poshold stayed within a 2x2m box... then i changed the trim (20 click to left), it was still pretty much flyable but with untouched sticks it definitely started to drift left... posthold was also perfect 2x2m BUT with a trimmed copter i was able to yaw during poshold and it kept the position, on the other hand the out of trim copter significantly changed position when i yawed. 5-8meter, then it slowly crawled back to the holding position.

So it seems that a perfect trim is a must for gps poshold.


On "a calm weather" with " with a perfectly trimmed copter" you dont even need GPS pos hold ;) So concluding that everything works fine in perfect conditions is not enough to actually work when the wind is blowing.

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

Re: GPS integration

Post by EOSBandi »

dramida wrote:
EOSBandi wrote:POSHOLD issues during YAW

Okay finally I had a calm weather and time for test. I was able to reproduce this behavior (intermittently loosing poshold when yaw) when my copter was not trimmed perfectly. I start the test with a perfectly trimmed copter (in dead calm weather it did not drifted) then poshold stayed within a 2x2m box... then i changed the trim (20 click to left), it was still pretty much flyable but with untouched sticks it definitely started to drift left... posthold was also perfect 2x2m BUT with a trimmed copter i was able to yaw during poshold and it kept the position, on the other hand the out of trim copter significantly changed position when i yawed. 5-8meter, then it slowly crawled back to the holding position.

So it seems that a perfect trim is a must for gps poshold.


On "a calm weather" with " with a perfectly trimmed copter" you dont even need GPS pos hold ;) So concluding that everything works fine in perfect conditions is not enough to actually work when the wind is blowing.


I did the test in calm weater to take out the wind from the equation. My theory is the following. When your copter is not trimmed perfectly, the poshold algorith starts to compensate for the drift. (actually the I term will wind up till it compansates the drift.) Now, when you rotate the copter the oriantation of the drift will change with the copter but the I term induced compansation won't. So if you rotate your copter for example 180degree then the I term compensation will points to the opposit way, and doubles your drift. It will eventually compensate, but that takes time.

So: You have to have a perfectly trimmed copter, or you have to increase poshold P terms to overcome wrong I terms faster.

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

Re: GPS integration

Post by jose_Quad »

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

Multiwii r33 con los parametros por defecto solo cambie PosR P 2.9
Multiwii r33 all values default except PosR P 2.9
Thanks to Alex, Eosbandi and Dramida. Thanks for your support guys :D

Scotth72
Posts: 23
Joined: Sat Jan 21, 2012 4:11 am

Re: GPS integration

Post by Scotth72 »

Couldn't you just clear the I term if a yaw command is issued?

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

Re: GPS integration

Post by EOSBandi »

Scotth72 wrote:Couldn't you just clear the I term if a yaw command is issued?

Well, it will work in calm weather, but with wind it will have the same effect...

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: GPS integration

Post by wilco1967 »

If you want to get rid of that effect, we might consider to 're-calculate' the drift I factor, to make it pointing in the other direction if the copter yaw's....

But that brings us to EOSBandi's point... The drift algorithm cannot distinguish between copter induced drift, or wind induced drift... Wind induced drift should stay in the same geographic orrientation during yaw, and copter drift, should follow the copter orrientation....

So it is really important to have the copter flying as straight as possible, or accept that it has to 're-find' it's location when yawing....
A PID algorithm can only correct for something it senses.... It has to move before it will move back.

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

Re: GPS integration

Post by EOSBandi »

Committed a patch to shared, which adds simple rate control to the nav angles. This supposed to smoothen nav angle spikes. Flight tested it with an i2cgps setup and worked flawlessly.
in the config file there is a

Code: Select all

#define NAV_SLEW_RATE 30 

It limits the change rate of the nav angles (30-means .3deg/cycle)

Sharkcopter
Posts: 21
Joined: Fri Feb 24, 2012 3:12 pm

Re: GPS integration

Post by Sharkcopter »

Hi
Is the Gps working only with R33 or it is also included in the last dev version 20120618 ?
Thanks in advance

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

Re: GPS integration

Post by EOSBandi »

Hi,
Gps works since dev 0606.. 0618 is the latest and greatest...

tazdevil
Posts: 2
Joined: Thu Jan 20, 2011 12:00 am

Re: GPS integration

Post by tazdevil »

Very happy



Back to multiwii after one year break, because of installation in Canada.

How to say, first flight with the 618 dev with flyduino, bobgps, hexa, and stock setting

Working at first with no tuning.

Still just to recalibrate compas and acc in the place to fly not my home with lot of metal part

I m very happy and I m very impress of the evolution of the project.

God job Alex and all the developer contributing to the project.

I know that navigation is not far and sonar for autolanding coming ?

let see the futur

Have fun

seeers
Posts: 3
Joined: Sat Jul 09, 2011 2:14 pm
Location: Germany

Re: GPS integration

Post by seeers »

Hi,
can i use i2c GPS with 100khz i2c on the first arduino which is controlling the ESCs? (Original Nintendo WMP).

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

Re: GPS integration

Post by brettwal »

Question for mahowik or anyone else that can help.

I have a SKYLAB SKM53 GPS module. I can use hyperterminal to set it to 10Hz and 115200 but, I was also trying to update the FW using the tools & files mahowik linked. When I attemp to flash the file, I get the error below:

[Flash Download]
Fail!!(Download) DA responded with an incorrect sync character
[Finish]
Take(22) secs to test.

Anyone have any pointers or other FW files or tools to use on a MTK3339 chip? I am currently on AXN_1.30 (very old)

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

Re: GPS integration

Post by svalent »

Hello,
I have problem with multiwii20120618 & I2C GPS (rev33).... I double checked setting and wiring , but after many hours i still have only I2C error (in GUI) and no GPS data. (led blinks 3 times fast=3D is available)

When i try some I2C demo master(CRIUS SE)/slave (I2C GPS) - everthing is OK (it was comunicate). But multiwii<->rev33 does not :(

I do not understand in code:
multiwii sending in GPS_NewData() "get status register"

Code: Select all

_i2c_gps_status = i2c_readReg(I2C_GPS_ADDRESS,I2C_GPS_STATUS_00);

in code I see:
i2c_write(00); send register_selection - ok
return i2c_read_to_buf(add, buf, size); get value of the status_register -ok...


in eosbandi I succesfully receive value

Code: Select all

void receiveEvent(int bytesReceived)


receivedCommands[0] is 0 - it is OK ....

but i never receive requestEvent() to sending value from status_register ....
maybe it is source of I2c errors ???



many thanks

Stano

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

Re: GPS integration

Post by brettwal »

Was flying 6/06 build with GPS HOLD working fairly well. Changed to the 6/18 build, edited sketch to match what I had before and kept same PID setup but now GPS HOLD cause random jerking of the copter. I have to take control to regain stability. Did anything change in regards to GPS HOLD that could cause this?

Can anyone with a MTK3339 based module connect it to MiniGPS and go to the Setup tab and post how their module is setup?

Thanks

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

Re: GPS integration

Post by p25o1 »

Hi everyone,

Congratulation on the GPS progress, looks very solid , warthox video/demo put a smile on my face.
Some advice before i place the order plz :-)

i have a quadrino rev 1e board , and in the posts, members used a i2c gps board with it successfully.

do you advise me to go for a serial gps board?
is there a pros / con in using the serial gps boards on a quadrino ? or should I just stick with the i2c ones.

I’m planning to order one of the below

Serial
http://air-studio.eu/en/electronics/11- ... board.html
or
i2c
http://store.diydrones.com/MediaTek_MT3 ... 329-02.htm

mmattila
Posts: 5
Joined: Fri Jun 08, 2012 11:33 pm

Re: GPS integration

Post by mmattila »

svalent wrote:Hello,
I have problem with multiwii20120618 & I2C GPS (rev33).... I double checked setting and wiring , but after many hours i still have only I2C error (in GUI) and no GPS data. (led blinks 3 times fast=3D is available)
Stano



Hi, I have same issue with mwdev20120606 & I2C GPS rev33. All other sensors work even I have I2C_GPS enabled but I2C error count keeps incrementing and GPS data is not received. I have verified that I2C_GPS Promini board receives GPS data (3 blinks for 3dfix) but I2C communication is not working between FC board and GPS board. This is the first time I try to integrate I2C GPS so I have not tried any other versions.

I used Arduino 1.0 and replaced twi.c and .h using EOSBandi's versions when compiling I2C_GPS.

After I2C refactoring is default I2C_GPS adresses still ok? (0x20) in both mwdev20120606 and I2C_GPS rev33?

I am using Drotek 10DOF MPU6050 board and I have there 3.3v pullup resistor soldered. Also disabled internal pullup from I2C board as 3.3V I2C bus. FC and I2C boards are 5v, but that should be ok as I2C logic level high is 0.7v regardless of Vcc. I also tried IMU board disconnected and internal pullups enabled but no difference.

I think that there is some issue with address or maybe I2C speed is wrong somehow. It should be 400 kHz on both ends.

-Markus

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

Re: GPS integration

Post by svalent »

mmattila wrote:
svalent wrote:Hello,
I have problem with multiwii20120618 & I2C GPS (rev33).... I double checked setting and wiring , but after many hours i still have only I2C error (in GUI) and no GPS data. (led blinks 3 times fast=3D is available)
Stano


Hi, I have same issue with mwdev20120606 & I2C GPS rev33. All other sensors work even I have I2C_GPS enabled but I2C error count keeps incrementing and GPS data is not received.....
-Markus


very slowly I find the reason why GPS does not work ….. (yes - GPS address is stil (0x20). It is defined in config.h in GPS sketch)

at this time I can share only modification to test if main board comunicate with I2C GPS board:

in GPS.ino (MultiWii sketch) comment original read GPS status register command and write new line :

Code: Select all

// _i2c_gps_status = i2c_readReg(I2C_GPS_ADDRESS,I2C_GPS_STATUS_00);                 //Get status register
i2c_read_to_buf(I2C_GPS_ADDRESS,&_i2c_gps_status , 1);  // for I2C GPS testing only



optional You can simulate GPS with this modifiication in I2C_GPS_NAV.ino :

Code: Select all

void requestEvent()
{
 if (receivedCommands[0] >= I2C_GPS_GROUND_SPEED) i2c_dataset.status.new_data = 0;     
 //*** emulation GPS fix - START ***  by svalent//
  i2c_dataset.status.new_data=0;
  i2c_dataset.status.numsats=8;
  i2c_dataset.status.gps2dfix=1;
  i2c_dataset.status.gps3dfix=1;
 //*** emulation GPS fix - END   *** by svalent//
 
  Wire.write((uint8_t *)&i2c_dataset receivedCommands[0],32);                   
}



of course this modification (MultiWii sketch) is not usable for real flight - it is only for testing I2C bus....

normally MultiWii send :
in first step multiwii send „write“ I2C command to GPS slave („get I2C_GPS_STATUS_00....“)
in second step multwii send „read“ I2C command to GPS slave (to getting value from i2c_dataset.status)


S.

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

Re: GPS integration

Post by svalent »

and SOLUTION :

it was crazy easy....

because I2C_GPS_NAV not using own I2C routine , it is necessary compile sketch in Arduino 1.0 (with patched twi library).
/i was used Arduino 1.0.1 and it was mistake..../


S.

mmattila
Posts: 5
Joined: Fri Jun 08, 2012 11:33 pm

Re: GPS integration

Post by mmattila »

I found the problem also. I had first installed to my PC Arduno-1.0.1 and only installed Arduino-1.0 to compile I2C gps code. For some reason Arduino-1.0 used libraries found from Arduino-1.0.1 folder and I had only copied modified twi files to 1.0 folder. So code got compiled using 1.0.1 Wire library.

Unfortunately I initially copied PID libraries also to 1.0.1 folder so there was no compile error from those either.

-Markus

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

Re: GPS integration

Post by EOSBandi »

Will update the i2c gps for arduino 1.0.1 soon.

Sharkcopter
Posts: 21
Joined: Fri Feb 24, 2012 3:12 pm

Re: GPS integration

Post by Sharkcopter »

Hi
I have a doubt, using RTH must I use the barometer or it is non necessary ? :?:
Thanks in advance

charbot
Posts: 34
Joined: Wed May 23, 2012 8:37 pm

Re: GPS integration

Post by charbot »

baro is not necessary... but something I noticed....
Unless baro/ alt hold is toggled "on", it seems like my quad always wants drop altitude upon returning home. Is this just my imagination( a result of wind/ switching from ff to a hover) or is it returning to the original "home" altitude? I was pretty sure GPS alt data is not used.

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

Re: GPS integration

Post by copterrichie »

Sharkcopter wrote:Hi
I have a doubt, using RTH must I use the barometer or it is non necessary ? :?:
Thanks in advance


How is the copter suppose to maintain altitude?

Sharkcopter
Posts: 21
Joined: Fri Feb 24, 2012 3:12 pm

Re: GPS integration

Post by Sharkcopter »

charbot wrote:baro is not necessary... but something I noticed....
Unless baro/ alt hold is toggled "on", it seems like my quad always wants drop altitude upon returning home. Is this just my imagination( a result of wind/ switching from ff to a hover) or is it returning to the original "home" altitude? I was pretty sure GPS alt data is not used.

The same for me, my quad drop altitude upon returning home and, at the moment, I'm using baro in RTH.
May someone help us about this matter ?

charbot
Posts: 34
Joined: Wed May 23, 2012 8:37 pm

Re: GPS integration

Post by charbot »

Good to hear Im not alone- Mine doesnt go all the way to the ground but if it is returning home at about 30' it'll drop to about 8'.

edit- just did a test flight, and after returning home it (after turning to face original orientation) it does slowly descend, and will touch the ground unless I give a little more throttle- or have alt hold enabled.

BTW- has alt hold been changed at all in the lastest dev? - Mine seems to be working especially well recently.

seeers
Posts: 3
Joined: Sat Jul 09, 2011 2:14 pm
Location: Germany

Re: GPS integration

Post by seeers »

Hold position works perfectly with 20120618!
Many thanks to all developers!

Post Reply