Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to I²C)

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Pyrofer
Posts: 180
Joined: Sat Apr 14, 2012 2:55 pm

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Pyrofer »

We have enough limits already because of historic choices and hardware selection.
Setting artificial and arbitrary limits such as "no new tabs" can only hinder development. Without well written clean code this project is doomed, as is any other.
Such strange limits will not help the average user as mentioned, they only care about config.h
More files/tabs will not scare coders as they are used to it.
If you want to make it friendly for "n00bz" then make a GUI that configures config.h without any code editing. (This will be a problem each time config.h changes)
This is just my opinion, but I think it needs to be said. Lets try not to hobble the project too much eh.

fiendie
Posts: 151
Joined: Fri Apr 20, 2012 4:22 pm

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by fiendie »

I also think that excessively large source files are much worse than the total number of files.
If the build process is well documented it shouldn't be over anybody's head.
And if it is then it's questionable if the person should be building their own board anyway.
The ER9X project is using build scripts for example. What could be easier than editing a source file and double-click an executable.
Everyone could use his trusted text editor of choice and you would circumvent the insane limitations of the Arduino IDE.

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

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Alexinparis »

Tommie wrote:
Alexinparis wrote:It's maybe not the most efficient way of coding from a coder point of view, but I prefer to keep low the number of files.
So please remove and merge tinygps.h into gps.ino

Do you really think dumping the entire bulk of structs into a single file is a good idea? GPS.ino (and most of the other files) are already so heavily overloaded that it is hard to get anything done without spending considerable time searching for definitions or declarations.
If you think that its a good idea[tm], I'm happy to comply, but I'm not sure whose life is made easier by doing so. Ordinary users? Won't case about these tabs, edit config.h and upload. Developers? Are happy about some structure and probably aren't using "tabs" anyway.


This is my personal view:
- if you take some project example like arducopter: It's very difficult for me to follow how things works ***in detail*** just because there are a lot of files. I can understand a different point of view here, but multiwii should remain easy to read for me.
- definition of things scattered everywhere does not encourage to use and optimize the same structs/variable of other code related to the same thing.

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

Alexinparis wrote:- if you take some project example like arducopter: It's very difficult for me to follow how things works ***in detail*** just because there are a lot of files. I can understand a different point of view here, but multiwii should remain easy to read for me.

So why use multiple files at all? Slap everything into a single sketch, much easier to maintain and understand.

Consider this: It's easy to make one file out of many (cat *.ino > mybigblob.ino); It's far more difficult to divide one file into distinct topics.
- definition of things scattered everywhere does not encourage to use and optimize the same structs/variable of other code related to the same thing.

Things related to the same thing are in the same file. That's what proper namespacing encourages, sadly, Arduino throws the (slim) capabilities C (non++) offers out of the window by concatenating all .ino files into one giant blob before compiling.

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

And another thing: Since tinygps handles GPS, optical and sonar data, the structs must be available in Sensors.ino as well as GPS.ino, that's why they are included in both files; adding them inline won't work, since the order of concatenations is undefined, and adding them in both files would be completely stupid.

Any idea how to handle this? :-/

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

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Alexinparis »

Tommie wrote:
Alexinparis wrote:- if you take some project example like arducopter: It's very difficult for me to follow how things works ***in detail*** just because there are a lot of files. I can understand a different point of view here, but multiwii should remain easy to read for me.

So why use multiple files at all? Slap everything into a single sketch, much easier to maintain and understand.

Consider this: It's easy to make one file out of many (cat *.ino > mybigblob.ino); It's far more difficult to divide one file into distinct topics.
- definition of things scattered everywhere does not encourage to use and optimize the same structs/variable of other code related to the same thing.

Things related to the same thing are in the same file. That's what proper namespacing encourages, sadly, Arduino throws the (slim) capabilities C (non++) offers out of the window by concatenating all .ino files into one giant blob before compiling.


You know, this project began with arduino from the LED PIN 13 blink sketch and grew progressively.
10 years before, I had some coding notions.
But I re-learnt coding with arduino with its principles.
I understand it's not as clean as it could be as my main focus is performance and optimization, and I don't care a lot about good coding practices.

TinyGPS is a special thing that has no equivalency because it's now not only a GPS device. And things are separated by functional domains in multiwii and not designed for this kind of integration. So let's keep the code like this and we will the evolution.
I hope I won't be useful only for you, and you will persuade someone to produce it for the mass...

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

Alexinparis wrote:You know, this project began with arduino from the LED PIN 13 blink sketch and grew progressively.
10 years before, I had some coding notions.
But I re-learnt coding with arduino with its principles.
I understand it's not as clean as it could be as my main focus is performance and optimization, and I don't care a lot about good coding practices.

Don't get me wrong, I appreciate what you have achieved with this project, and I know how a project starts small, gets bigger, accumulates more features and suddenly you find yourself piling hack upon hack just to keep up with the new demands you never thought of in the beginning - I contributed to several projects like that before, and often you come to a point where you have to realize that an approach that was completely legit at the beginning has served its purpose and has to be replaced. I agree that keeping the number of files low might have been a good thing in a time when Multiwii supported a handful of sensors; but with Sensors.ino approaching 1500 and MultiWii.ino 1000 lines, things get difficult to follow. Changes are difficult because of unanticipated side effects, merging gets difficult because unrelated code is located right next to each other.

Good coding practices does not necessarily impede system performance; but they always increase coding and debugging performance.


Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

Although it might work, you'd probably have to adapt the firmware to it. The Atmel site is down at the moment, so I can only recollect from memory that the ATTiny45/85 series does not have an UART, so there is no support for the serial interface. It's also quite expensive on the site you posted. I advice to get an ATTiny2313 or even better an ATTiny4313 if you can get your hands on it; I don't know about the available sources in the Netherlands, but you can get them cheaply here: https://guloshop.de/shop/Mikrocontrolle ... 3::31.html
eBay also has quite a few electronics retailers, so you can probably find them there as well. Don't forget to get an 100nF capacitator :-)

nspierbundel
Posts: 15
Joined: Tue Jun 05, 2012 2:12 pm

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by nspierbundel »

found some for 1.22 http://nl.mouser.com/Search/ProductDeta ... CIeQ%3D%3D
only charges 20 euro handling fee :shock: :shock: :shock:

on ebay I can only find the 2313 with 2 - 3 euro shipment costs just bought the http://www.ebay.com/itm/ws/eBayISAPI.dl ... SS:US:1123 for cheap :mrgreen:

I will check your link
thanks
Daniel

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

They only ship to germany, I don't know how far you live from the border ;-)

nspierbundel
Posts: 15
Joined: Tue Jun 05, 2012 2:12 pm

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by nspierbundel »

It`s cheaper to accept the 20 euro fee from mousser than driving to the border.
why is it so hard to find a cheap part for a reasonable price :?

can`t find a 4313 on ebay either
http://www.ebay.nl/sch/i.html?LH_PrefLo ... p=15&_sc=1

do I only need the 100uF cap or also other resistors ? going to use on a crius se board ?

the search continues

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

I don't know the crius board, but my setup is just the following: I have a plain ATTiny4313 with an 100nF capacitator (as reqiured by nearly all ICs), a GPS unit connected to it as well as one sonar device. Your I²C bus is probably working, so you do not need any additional hardware I guess.

Hint: If you are _not_ using GPS and only want to turn your sonar into an I²C unit, the tiny45 probably works; code adaptions might be necessary however. It's not tested, so you are on new ground and quite alone :)

nspierbundel
Posts: 15
Joined: Tue Jun 05, 2012 2:12 pm

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by nspierbundel »

just ordered the 2313

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

not to forget: You do have a way of programming the device? Like an dedicated ISP programmer or an Arduino you can turn into one (http://arduino.cc/en/Tutorial/ArduinoISP)?

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

As a sidenote: I just ordered 5 additional sonar devices for me. Since the ATTiny has still a lot of pins to spare, those devices can be multiplexed and provide measurements in all directions; with the appropiate software, the copter should be able to bounce off walls and the ceiling :-)

nspierbundel
Posts: 15
Joined: Tue Jun 05, 2012 2:12 pm

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by nspierbundel »

I have a usbavr I wanted to program my escs however they are sil based :evil:
Also ordered 4 sonars and 5 atinys so I can f#%kup 1 in the worst. Now I just need the caps and maybe a led indicating it is on.
Will post my experience when done
Any idea for a cheap(but decently working) gps ?

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

I am using a USB stick I had lying around (pried it open, located the Serial2USB converter and soldered a wire to the TTL line), but it's more for tinkering than flying; from what I have read, an update rate of 1Hz is not enough for decent position hold operation. So I am looking a well for inexpensive modules :)

nspierbundel
Posts: 15
Joined: Tue Jun 05, 2012 2:12 pm

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by nspierbundel »

Maybe this one can be set to 10hz

$14.90 gps http://www.dealextreme.com/p/eb-365-gps ... 045?item=2

specs
http://www.google.co.uk/url?sa=t&rct=j& ... kg&cad=rja

has an i2c line :) some say it doesn`t have an antenna !!!

but my knowledge is not sufficient to check this

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »


While the website claims an update rate of up to 5 Hz, the documentation does not reflect this and only specifies rates up to 1Hz; I wouldn't want to gamble about who is right :-)

This one might work: http://www.drotek.fr/shop/en/90-pa6c-gps-llc.html

nspierbundel
Posts: 15
Joined: Tue Jun 05, 2012 2:12 pm

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by nspierbundel »

nope me neither, if a chinese company says five and the manual says one, always take the lowest.
is the gps chip mt3339 the important part ?
http://www.aliexpress.com/store/605000/ ... ption.html
shipping price is not worth it tough, but maybe there are others.
adafruit has one http://www.oomlout.co.uk/gps-receiver-m ... 7b705b010c (claims to be altitude unlocked)

still not sure if I want to spent 30 euros on a gps, don`t need the functions, just for the "because it can" factor.

User avatar
Loosi
Posts: 63
Joined: Sat Aug 20, 2011 8:31 pm
Location: Germany (HSK)
Contact:

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Loosi »

Hi!
After some problems during compiling i got mine up and running :)

Thank you!

DSCF0021.JPG


DSCF0029.JPG


DSCF0028.JPG


DSCF0031.JPG


Would be great if there is a way to initialize the GPS using 115200baud and 5 or 10Hz the commands are:

$PMTK251,115200*1F<CR><LF> //switch to 115200 baud
$PMTK300,200,0,0,0,0*2F<CR><LF> //change update rate to 5Hz

is there a way to implement it? i´am happy to understand arduino c a bit, but pure c is an other world for me ;)
maybe it could be done if mt3329 is defined in config than use the other commands to init gps.

Greetings
Daniel

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

Looks pretty nice, although I would have put the controll in a socket; you might want to replace it someday. (e.g. use an 4313)
You should also add a 100nF ceramics capacitator; otherwise the Tiny might reset spontaniously when experiencing voltage spikes.

I also thought about init strings for the GPS device; it's in the queue, but for now, I advice you to configure the GPS and save the settings, most devices store them permanently.

Keep on hacking, and have fun with your neat I²C GPS.

If you like, join our IRC channel #multiwii on Freenode; lot's of people tinkering there :-)
Last edited by Tommie on Mon Jun 11, 2012 7:21 pm, edited 1 time in total.

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

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by charbot »

Tommie-
congrats on tiny gps making it to the lastest dev! I saw the sonar contrioled landing lights-, cool- Is the optical fuctional?
Actually I was going to ask to same thing about the init command- unfortunately, I only have a mac - currently no windows access and unable to run the mediatek configure tools. Any advice or where these commands should go? ( sorry, skill wise -Im in the same boat as Loosi, I can hang with arduino, but way over my head with the "big-boy"code. I tried looking thru tiny-gps, but had no idea where to even start)

- This may not be a completely selfish request... seems like the mtk3339/3329 are/will be pretty popular options(relatively cheap/powerful and accessible), and (pretty sure) there were a few posts in the GPS thread by others who were having difficulty saving settings with the tool.

(and since this has become a "wish list"....) Also gps status led would be cool!
Keep up the good work


BTW- I threw in a couple 4313su when I ordered parts. - For surface mount components, they are actually fairly large (with some decent space between leads) look pretty friendly to play with -should be fairly easy to home-etch a simple breakout board for an even TINIER-GPS

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

charbot wrote:Actually I was going to ask to same thing about the init command- unfortunately, I only have a mac - currently no windows access and unable to run the mediatek configure tools. Any advice or where these commands should go? ( sorry, skill wise -Im in the same boat as Loosi, I can hang with arduino, but way over my head with the "big-boy"code. I tried looking thru tiny-gps, but had no idea where to even start)

You can probably use any kind of terminal program, but you have to connect your GPS unit to a level converter (and USB2Serial adaptor). I am not a Mac expert, but other might be :-)
(and since this has become a "wish list"....) Also gps status led would be cool!

Already implemented; just

Code: Select all

#define LED_FIX_INDICATOR 1
and add a LED to PD5 (pin 9); once the GPS indicates an OK fix, the LED will be switched on.

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

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Katch »

joining the party 4313 on its way.

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

OK, I just added the capability to send an init string to the GPS unit and switch the baud rate afterward:
https://github.com/wertarbyte/tiny-gps/
Since I do not have an appropiate GPS unit at hand, please test this new version; bug reports are welcome :-)

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

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by charbot »

great! Ill test it out later.

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

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Katch »

Just in the process of putting my 4313 board together and had a quick question.

The GPS, Sonar and Optical headers, is it ok to have Vcc and Gnd pinned out so all I have to do is power straight from the ATtiny breakout board? If this is the case am I correct it saying the GPS has 3 pins, Sonar 4 and Optical 5?

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

Yes, I think that should be OK. Depending on your GPS, you might also want to include the TX line to send data to the receiver - just in case you want to provide some kind of init command (which is supported by TInyGPS since yesterday).

The next version will be able to query multiple sonar devices; I'm waiting for them to be delivered :-)

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

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Katch »

Tommie wrote:Yes, I think that should be OK. Depending on your GPS, you might also want to include the TX line to send data to the receiver - just in case you want to provide some kind of init command (which is supported by TInyGPS since yesterday).

The next version will be able to query multiple sonar devices; I'm waiting for them to be delivered :-)


So pinout both Tx and Rx to GPS - do they need to be crossed?

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

They need to be crossed.

User avatar
Loosi
Posts: 63
Joined: Sat Aug 20, 2011 8:31 pm
Location: Germany (HSK)
Contact:

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Loosi »

i made a quick connection diagram for a friend that dont understand all this electronic´s stuff ;) maybe someone can make use of it.

tinygps.PNG


Tommie, are there news about the startup delay before sending the init string to the gps?

greetings
Daniel

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

Implemented 15 hours ago: https://github.com/wertarbyte/tiny-gps/ ... 1307ec606c

Thanks for the nice diagram :-)

User avatar
Loosi
Posts: 63
Joined: Sat Aug 20, 2011 8:31 pm
Location: Germany (HSK)
Contact:

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Loosi »

Thats great thank you, will try it tonight when i´am at home and report you :)

I will draw a better diagram at home, i have only powerpoint at work ;)

User avatar
Loosi
Posts: 63
Joined: Sat Aug 20, 2011 8:31 pm
Location: Germany (HSK)
Contact:

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Loosi »

tommie: same problem than yesterday, it doesen´t send the init string :-(

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

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by charbot »

make sure that you have all the init stuff un-commented in config.h. I missed it the first time I programed my attiny. Pretty sure it is working now, though I didnt fully test my gps to see if it reset to the default baud/refresh rates after removing the battery.

The problem Im having is that the GPS data (displayed in GUI) seems a bit erratic- the last 4-5 digits of LAN and LON are constantly jumping around and anytime I connect to more than 3 satellites the distance to home jumps from 0 to like 8064. Also no flashing donut when I have a 5+ satellite lock.
using the latest dev firmware and gui.

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

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Katch »

Ok think I have everything ready to test now. ATtiny breakout built and GPS and Sonar connected.

What's considered a stable version of multiwii to use to test this device with?

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

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Katch »

using latest dev and we have liftoff.... well on the bench and not connected to any motors... or frame.... but sort of lift off.

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

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Katch »

Quick pic of my hard work.

Image

I added two I2C headers to allow daisy-chaining of I2C devices to the main FC (for IMUs and LED rings etc).

Suppose I better crack on an sort out an optical sensor too.

Pyrofer
Posts: 180
Joined: Sat Apr 14, 2012 2:55 pm

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Pyrofer »

How did you connect that LED on the GPS board? What pins does it go to and did you add a limiting resistor to it as well?
I *hope* that is a "GPS FIX" indicator, as that's what I want too :)

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

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Katch »

Pyrofer wrote:How did you connect that LED on the GPS board? What pins does it go to and did you add a limiting resistor to it as well?
I *hope* that is a "GPS FIX" indicator, as that's what I want too :)


It's just soldered between 3d fix and ground.

Pyrofer
Posts: 180
Joined: Sat Apr 14, 2012 2:55 pm

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Pyrofer »

the 3D part of that worries me, I often only get 2d fix due to poor gps signal, does that mean it won't light?
Is it actually a 3D fix only led or a "GPS fix" led? Can you tell?

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

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Katch »

sorry, yes its a fix LED not 3d fix - it turns on when the GUI is reporting about 4 Sats I think.

If you look at the datasheet for the mediatek 3329 it should tell you all you need to know.

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

You can also connect an LED to the Tiny: the code was already present, I just added the configuration item.

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

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by charbot »

Katch, did you get to fly? How's it work? i still cant get a decent fix- the GPS values in the GUI are constantly jumping around (especially the last 5 digits of lat and lon) and there is no flashing donut, ever.
Against my better judgment, I did a test flight and it was all over the place. Any ideas? I thought I may of had clock set incorrectly, but i double checked and reflashed- still the same behavior.

BTW- I had previously used my GPS (mtk3339) with a promini as I2C-GPS and it works fine, so Im pretty sure that my module is good/accurate

Good news, Ive successfully etched and soldered up a tiny PCB for the surface mount 4314's- total size is 17mm x 19mm!

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

Can you post a line of the GPS data your receiver spits out?


I also would not rule out bugs in the Multiwii part that converts the I²C messages into its internal representation of coordinates;
If you spot one, feel free to report and/or fix :-)
https://github.com/wertarbyte/multiwii- ... S.ino#L491

/edit: OK, found it myself; sometimes its good to look at ones own code after a while

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

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Katch »

Not gonna get a chance to test fly for a few days - my guinea pig frame is out of action waiting for some replacement motor mounts. I don't like to risk development stuff on my Hoverthings 450 or FPV frames (not since the last time...)

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by Tommie »

If you refrain from using the development stuff, you can still only apply this small patch: https://github.com/wertarbyte/multiwii- ... a7c6bc9683
adding 3 lines and removing one should not be a task to hard or risky :-)

I as well get much more plausible readings with it, so I'm kind of glad you pointed me to this.

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

Re: Tiny-GPS integrated into Multiwii (GPS/Sonar/Optical to

Post by charbot »

Heres a like second or two worth of lines read using the arduino I2c read sketch posted on pg 7:

Code: Select all

Request: 3 13 6 12 0 0 0 40 41 38 3 73 55 118 18 244 255 4 1 5 0 0 0 0 255 255 255 255 255 255 
Request: 3 13 6 12 0 0 0 40 41 38 3 73 55 118 34 244 255 2 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 0 0 0 40 41 38 3 73 55 118 34 244 255 2 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 0 0 0 40 41 38 3 73 55 118 34 244 255 1 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 0 0 0 40 41 38 3 73 55 118 50 245 255 7 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 0 0 0 40 41 38 3 73 55 118 50 245 255 7 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 0 0 0 40 41 38 3 73 55 118 66 245 255 7 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 0 0 0 40 41 38 3 73 55 118 66 245 255 5 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 0 0 0 40 41 38 3 73 55 118 82 245 255 4 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 0 0 0 40 41 38 3 73 55 118 82 245 255 3 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 0 0 0 40 41 38 3 73 55 118 82 245 255 2 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 0 0 0 40 41 38 3 73 55 118 98 245 255 0 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 0 0 0 40 41 38 3 73 55 118 98 246 255 9 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 17 9 17 40 41 38 3 73 55 118 114 246 255 6 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 0 0 0 40 41 38 19 73 55 118 130 246 255 5 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 0 0 0 40 41 38 19 73 55 118 130 246 255 4 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 0 0 0 40 41 38 19 73 55 118 146 246 255 2 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 0 0 0 40 41 38 19 73 55 118 146 246 255 0 1 5 0 0 0 0 255 255 255 255 255 255
Request: 3 13 6 12 0 0 0 40 41 38 19 73 55 118 146 246 255 0 1 5 0 0 0 0 255 255 255 255 255 255


This is with GPS lock and tiny-gps LED "on" , though probably on 4 satellites (gps is hanging out my window)

Post Reply