Telemetry via mobile en-masse

Started by krikey, April 19, 2013, 03:47:15 PM

Previous topic - Next topic

krikey

I've started a new project over at http://www.fpvhub.com/index.php/topic,12297.msg104950.html#msg104950 to try to get GPS telemetry out of a flying aircraft and down to a base station that can display a map of all craft on a map. Think of this as a kind of Air Traffic Control system for RC.

As a parallel project, I also wanted to find out how feasible it would be to put a smartphone (or at least a phone capable of receiving GPS data and connecting to the internet) into a craft and having the smartphone send back its positional data via GPRS/3G etc. It is possible to get hold of a brand smartphone on pay-as-you-go for under £100 these days (Sony Xperia Tipo).

The BATCS project here http://www.fpvhub.com/index.php/topic,12297.msg104950.html#msg104950 relies heavily on your own infrastructure and multiple pieces of hardware to function correctly, whereas the smartphone approach requires a smartphone and a server PC, both of which will need Internet access.

The initial tests I'm developing are to find out how accurate GPS data is on one smartphone and whether it could be used in multiple craft concurrently to create a snapshot of where each craft is in an area at any one time. I would suspect that smoothing algorhythms will be used to stop the occasional jumping around of the GPS data.

This initial test consists of a webapp (HTML5, Javascript) that can read the GPS position of the smartphone every half a second and then using an AJAX response, push the GPS data to a waiting webserver for the server to store the data or map the position on a Google map for example.

None of the above is new; there are plenty of native apps that track etc. but none of them do it every half a second and none of them can currently track and show more than one device at any one time at least not in consumerspace.

Issues I know that I'll confront:

Webapps tend to go to sleep after a period of time, rendering the smartphone dumb, so if the webapp works, I'll be looking at Phonegap or similar to make it native.
A half decent mobile signal will be hard to come by in many areas.
Bandwidth may be a problem, although its only a very small amount of data, its pretty constant.
Latency with network connection may render the data almost useless in a live sense and for ATC and avoidance.
Battery life when sending data continuously.

What this project will also answer (and its been used or discussed before) is a simple lost plane system whereby the smartphone simply continues to pump out a GPS signal to a waiting server no matter the range but hopefully within mobile signal. This can be used to find a downed plane even if its miles away.

I'd love your feedback on this and whether you've heard of something similar that I can either adopt or draw from.

Krikey

CurryKitten

If the Webapp might be rendered dumb if it times out in some way - is an alternative to write a small Android app (I'm assuming cheap Android phone) that just attempts to keep broadcasting it's GPS position to a server.  I'm assuming there's settings you can have (a bit like google lattitude) so it would keep doing this even in sleep mode

krikey

Yes there are settings on android and iOS that you can set to keep certain bits alive even if the screen is turned off.

Anothr option is to jailbreak an iOS device to bypass all that and write a simple script there or possibly the equivalent on android.
Krikey

drubug

What about putting a raspberry PI with a 3g dongle in and a gps receiver.... Would save putting a whole phone in the plane...

Ardupilot has a project which using 3G telemetry back to ground station. Added bonus you can update setting in the plane realtime.

krikey

I would suspect that a Raspi and 3g dongle might be quite large, albeit possibly lighter as there'll be no glass and no internal battery but its a distinct possibility at least as a trial. To be honest a smartphone or a Raspi is really overkill for just getting GPS data, but its possibly the quickest/easiest way of getting a platform up in a plane right now.

Krikey

hase2

does a raspi come with serial ports? otherwise you need to count that in as well.
i think the lightest way woul dbe a dronecell or similar GPRS/3G modem, small arduino and a small GPS board. Shouldn't set you back more than 100£.

Zeeflyboy

Cool project and good luck, but I can't help but wonder what the real goal is?

The lost plane aspect can be achieved with a simple GPRS enabled GPS module... It will text you back with its location if it is within range of a mobile signal.

So apart from just the challenge (which is a perfectly valid reason on its own) I'm just wondering what your driving ambitions are and what need you see it filling?

krikey

The main aim is to project multiple GPS signals on a screen at once providing a poor mans Air Traffic Control in a way.
Krikey

Zeeflyboy

Yeah I get that, but to what end?

Just wondered if you had a purpose in mind or if its just for fun.

Don't take this as negative in any way btw - I'm just genuinely interested!

lrosm

Hi there, has there been any movement on this project?  I like the sound of it?

DaveyLC

#10
Quote from: CurryKitten on April 19, 2013, 03:56:02 PM
If the Webapp might be rendered dumb if it times out in some way - is an alternative to write a small Android app (I'm assuming cheap Android phone) that just attempts to keep broadcasting it's GPS position to a server.  I'm assuming there's settings you can have (a bit like google lattitude) so it would keep doing this even in sleep mode

A web app would be perfectly fine, its not going to be navigating away from a page and you can manage any calls to web services with the jQuery wrapper so it doesn't break :)

Plus I'm sure some form of web-based mapping will be used anyway (such as google) so a data connection is going to be required anyway.

The part that concerns me would be having a 3G device on the plane, its another transceiver that could play havoc with everything else.

My personal opinion is it would be easier to build a service that supports the 'cheapy' 3G/GPS trackers available on ebay.. The protocol is very simple and you can point them at an ip/domain you just need to parse the NMEA strings.

I used to run a site ( www.car-dar.co.uk ) that provided a free portal for these trackers so I'd be well up for helping if anyone else wanted to get together to produce something similar for FPV/RC? :)

Also I work with Hybrid apps for a living so happy to lend a hand there :)
Proud ImmersionRC & DJI WHORE!
..Oh and recent 250 convert!

YouTube channel: http://www.youtube.com/

lrosm

in my industry we have the AIS which is now available via the internet.
could it use the same.

but yes something to tx the NMEA strings, translate them & put them onto a google style map. would be great to zoom out over the UK & see who & where everyone is flying!

I was actually toying with the idea of putting my old iPhone 3 onto my plane then using my 3G iPad & "wheres my iPhone" via itunes log in to track my FPV when out of sight, just to have a reference point if required.  & if it does go down, touch wood the iPhone would still be connected to 3G & I could find.  the same worry I had was the interference with the 3G & the TX of the AV?  I guess a flight test is the only way to go on that??

but I think this idea has legs.

skyscraper

#12
From memory NMEA is a very inefficient protocol. 

I have as it happens been working on a binary protocol for my tracker ( Lat, Lon, Alt) so here is where I am at with this, since it seems relevant:

The algorithm treats the binary data structure as an array of bytes.

Bytes are sent either periodically( in a round robin) or if they are changed unless more than a certain number of bytes are changed where it becomes more efficient to just send the whole data structure. If you think about a GPS coordinate or an altitude, then typically only the least significant bits change usually so I hope the algorithm is quite relevent.

The packet to be sent is encoded using COBS. which uses zero bytes as a frame separator. The wikipedia link I think covers the benefits of this protocol

Here is my Alpha code for it https://github.com/kwikius/quantracker_sim/blob/master/cobs.cpp

regards
Andy

lrosm

Andy,  where are you thinking of pushing this data too?  google maps or an app?

lrosm

Going forward with this.....thinking ahead etc.
what are the thoughts on callsigns for each plane (or designated to the flyer) being displayed too?
maybe Callsigns issued via FPVHUB when you purchase insurance.  Some sort of indication that we are paid up members & flying safely?  just a fleeting thought, I dont want to open any can of worms!