Welcome to PhantomPilots.com

Sign up for a weekly email of the latest drone news & information

How to access flight data (drone GPS location, altitude etc)

Discussion in 'Phantom 2 Vision + Discussion' started by gogowanda, May 27, 2014.

  1. gogowanda

    Joined:
    Apr 10, 2014
    Messages:
    82
    Likes Received:
    20
    Hi,

    I'm thinking of writing an app to help aim the range extending antennas to the drone but would need to be able to access the "coordinates" of the drone. Those info are displayed on the DJI app and I'm wondering if it's accessible for other apps too. I can deal with programming but do not have much knowledge on how phantom v+ feed the data. Can someone please explain?

    thanks

    Daz
     
  2. kgarrison

    Joined:
    May 5, 2014
    Messages:
    126
    Likes Received:
    0
    Re: How to access flight data (drone GPS location, altitude

    There is absolutely zero documentation available on how the systems communicate. DJI so far has not wanted to be open to developers.
     
  3. varmint

    Joined:
    Feb 5, 2014
    Messages:
    390
    Likes Received:
    6
    Location:
    Hillsboro, OR
    Re: How to access flight data (drone GPS location, altitude

    I hear ya brother, I've been down this road myself. Unfortunately I'm much better at hardware and high-level software development than low-level network snooping and packet exposure. The data is part of the wifi stream. It's in a proprietary format, although it's not encrypted. Aiming an antenna tracker based solely on the data from the repeater can be done easily, but only after it's exposed. The idea would be to peel apart the stream with wireshark in order to find the correct port(s), and then decode the stream in order to extract the necessary data. Once that's done, it's just a matter of tapping into it with an Arduino or a Pi via wifi, and using it do drive the pan/tilt servos. The hardware and and C++ is easy, but the packet snooping just isn't my area.

    This could also function as a free (no flight-end equipment required) GPS tracker in case the signal was lost, and could also provide logging via SD card. Think antenna tracker, GPS locator, and Flytrex (but without the weight or expense), all rolled into one simple ground-end device. But then there's just that one issue of getting at the data stream again:)

    I tried enticing PVFlyer's crew into exposing some of that data with their Wifi booster App: viewtopic.php?f=27&t=13496 (which is operating along similar lines), but they appear not to be interested, at least not for the time being. Again, I'd appeal to anyone with skills in packet snooping to expose the telemetry data, for wider applications. The things some of us could do with this would be very useful.
     
  4. kgarrison

    Joined:
    May 5, 2014
    Messages:
    126
    Likes Received:
    0
    Re: How to access flight data (drone GPS location, altitude

    Useful possibly, legal, probably not. AMa guidelines and very likely FAA rules require visual line of sight.
     
  5. varmint

    Joined:
    Feb 5, 2014
    Messages:
    390
    Likes Received:
    6
    Location:
    Hillsboro, OR
    Re: How to access flight data (drone GPS location, altitude

    What on earth are you talking about, and how does LOS in any way apply to obtaining telemetry data? I don't mind people contributing to a topic, but at least try to be somewhat useful if you're going to post.
     
  6. gogowanda

    Joined:
    Apr 10, 2014
    Messages:
    82
    Likes Received:
    20
    Re: How to access flight data (drone GPS location, altitude

    That's exactly where I'm at! I can do programming and hardware stuff but not network sniffing. I may need to call up some of my college buds (MSEE, Ga Tech) see if any of those smart kid can help. Given it's a "closed" wifi network it should be doable.

    I have an app called "skyview" on my android phone and it'll line up the screen against the stars in the sky. I thought of that when I lost sight of my drone - When it's 600 ft above and 2000 ft away it's nearly impossible to spot the drone if you ever lost sight on it (for example look at your phone to snap a shot). So if there could be another phone running this app and will help you to locate the drone in the sky then we'd be able to aim the antennas.
     
  7. kgarrison

    Joined:
    May 5, 2014
    Messages:
    126
    Likes Received:
    0
    Re: How to access flight data (drone GPS location, altitude

    Sounds like one of the purposes would be for long range flight.
     
  8. ubergeo

    Joined:
    May 8, 2014
    Messages:
    3
    Likes Received:
    0
    Re: How to access flight data (drone GPS location, altitude



    I thought I was just being dense because I couldn't figure out how to grab the telemetry. I grabbed a raspberrypi, bought a gps module, installed gpsd. Tapped into the gimbal power to power the Rpi, strapped it to the P2 vision and record GPS info from the Pi's GPS. Not the same and kind of awkward, but a fun project. Would still rather capture it directly from the Vision and not waste the weight and power. I hope some brilliant hacker will share.. :D
     
  9. Hovtech

    Joined:
    Mar 27, 2014
    Messages:
    502
    Likes Received:
    151
    Re: How to access flight data (drone GPS location, altitude

    Wow, you are smart :idea:
     
  10. varmint

    Joined:
    Feb 5, 2014
    Messages:
    390
    Likes Received:
    6
    Location:
    Hillsboro, OR
    Re: How to access flight data (drone GPS location, altitude

    Kinda like 800m stock ranges, and FPV in general? Sounds like Minority Report now.
     
  11. AnselA

    Joined:
    Jan 2, 2014
    Messages:
    896
    Likes Received:
    1
    Location:
    Declination +8° 11'
    Re: How to access flight data (drone GPS location, altitude

    There's rumors that DJI is working on firmware update to implement a kind of "flight data black box". They already released a viewer to interprete collected data, but took it away from the DJI website. Let's see if it ever becomes a reality.
     
  12. gogowanda

    Joined:
    Apr 10, 2014
    Messages:
    82
    Likes Received:
    20
    Re: How to access flight data (drone GPS location, altitude

    I thought I was just being dense because I couldn't figure out how to grab the telemetry. I grabbed a raspberrypi, bought a gps module, installed gpsd. Tapped into the gimbal power to power the Rpi, strapped it to the P2 vision and record GPS info from the Pi's GPS. Not the same and kind of awkward, but a fun project. Would still rather capture it directly from the Vision and not waste the weight and power. I hope some brilliant hacker will share.. :D[/quote]

    Thats really brilliant. I saw Martin on raspberry did a helmet GPS project that was pretty cool. is your setup similar? mind to share pics?

    So far people have been using additional hardware like yours to send in telemetry data. But if it's all there in the wifi network there must be a way to sniff them out.

    That network specialist please stand up, please stand up...
     
  13. varmint

    Joined:
    Feb 5, 2014
    Messages:
    390
    Likes Received:
    6
    Location:
    Hillsboro, OR
    Re: How to access flight data (drone GPS location, altitude

    You don't actually need to fly a GPS, and in fact you shouldn't, because the position will never be the same as the ublox on the Phantom itself. What you want to do is use serial on the Rpi or Arduino to read the Phantom's GPS directly. There are 4 lines coming from the GPS: V+, V-, TX, RX. The GPS cable is a Molex. Just tap into it in parallel with the Micro and hook it into serial. It operates at 115,200 baud and there's already a library out there to read/parse the data.

    Like I said, been there, done that:) My antenna tracker uses 900Mhz Xbees and Arduino nanos on both ends, and works perfectly, but ditching the radio link and flight-end altogether would be the ideal solution.
     
  14. gogowanda

    Joined:
    Apr 10, 2014
    Messages:
    82
    Likes Received:
    20
    Re: How to access flight data (drone GPS location, altitude

    You don't actually need to fly a GPS, and in fact you shouldn't, because the position will never be the same as the ublox on the Phantom itself. What you want to do is use serial on the Rpi or Arduino to read the Phantom's GPS directly. There are 4 lines coming from the GPS: V+, V-, TX, RX. The GPS cable is a Molex. Just tap into it in parallel with the Micro and hook it into serial. It operates at 115,200 baud and there's already a library out there to read/parse the data.

    Like I said, been there, done that:) My antenna tracker uses 900Mhz Xbees and Arduino nanos on both ends, and works perfectly, but ditching the radio link and flight-end altogether would be the ideal solution.[/quote]

    I'm calling my IT buddies see if anyone can help with the sniffer.

    Have you ever thought of "drone tracking"? Theoretically we can feed the drone with continuous GPS locations from a device and the drone will just follow that, like way-points flying. It'd be very gnarly. V+ doesn't have the waypoint flying available from DJI yet, has it been done on other phantoms?
     
  15. AnselA

    Joined:
    Jan 2, 2014
    Messages:
    896
    Likes Received:
    1
    Location:
    Declination +8° 11'
    Re: How to access flight data (drone GPS location, altitude

    ;)
     
  16. gogowanda

    Joined:
    Apr 10, 2014
    Messages:
    82
    Likes Received:
    20
    Re: How to access flight data (drone GPS location, altitude

    can you shed more light on the "viewer"? please...
     
  17. AnselA

    Joined:
    Jan 2, 2014
    Messages:
    896
    Likes Received:
    1
    Location:
    Declination +8° 11'
    Re: How to access flight data (drone GPS location, altitude

    On 21.5.2014 I downloaded from DJI website. But I don't have any sample of the data file to be viewed.
     

    Attached Files:

  18. D_Tshudy

    Joined:
    Apr 30, 2014
    Messages:
    264
    Likes Received:
    0
    Location:
    Philly
    Re: How to access flight data (drone GPS location, altitude

    varmint,
    Do you have any sample unencrypted ethernet packet captures. I'm pretty good at bit busting. I'd be willing to try. What I'm not great at is recording that WiFi data so I can look at it in Wireshark.
     
  19. varmint

    Joined:
    Feb 5, 2014
    Messages:
    390
    Likes Received:
    6
    Location:
    Hillsboro, OR
    Re: How to access flight data (drone GPS location, altitude

    Thanks much for the offer. I'm not very familliar (understatement) with Wireshark, but I'll see what I can do about that. It would probably be much more effective to try locally, though, since it's just a matter of connecting to the repeater with a mobile device and then listening on the same network with a wifi adapter on the host computer. I was able to see the traffic this way, but of course I had no clue how to begin to parse it.
     
  20. gogowanda

    Joined:
    Apr 10, 2014
    Messages:
    82
    Likes Received:
    20
    Re: How to access flight data (drone GPS location, altitude

    pm me your email. I'll send you some packets I captured. I tried it with wireshark but couldn't make any sense out of it.