DIY Open Source traffic

Discussion in 'Technical Corner' started by zaitcev, Nov 23, 2013.

  1. zaitcev

    zaitcev En-Route

    Joined:
    Sep 30, 2010
    Messages:
    3,254

    Display name:
    Pete Zaitcev
    I started tinkering with a traffic system, which I intend to test in flight eventually. The basic idea is to have 2 inputs: ADS-B and GPS, and 1 output: traffic picture.

    Initially, ADS-B is taken from 1090ES received based on RTL-SDR. The first RTL dongle that I bought used the classic Elonics tuner with a gap, but the other one has R820T and works at 1090 MHz. I made a little monopole antenna for it, which works quite well.

    I am looking for a cheap UAT receiver, but so far I was unable to repurpose RTL-SDR for it: the data rate is too high for the available sampling rate, apparently. RTL's 2.8 s/s ought to cover ~1 megabit that UAT uses, but in practice it just doesn't work. Most likely I'll have to build a semi-hardware 987 MHz receiver and decoder.

    GPS could be anything with NMEA, I'm using an AV8OR that I have available.

    For the output, I'm going to provide a WiFi access point (by way of hostapd -- I did it before), DHCP service, and a webserver that only serves one page with the situation picture. Should work with any tablet for a display, even crippled devices like Amazon Kindle or any smartphone.

    The software is here:
    https://github.com/zaitcev/glie
     

    Attached Files:

  2. CJones

    CJones Final Approach

    Joined:
    Mar 14, 2005
    Messages:
    5,560
    Location:
    Jawjuh

    Display name:
    uHaveNoIdea
    Have you looked at the Arduino stuff to see if any of the out-of-the-box RF type receivers will do what you need?

    I had thought about tinkering with something similar with a combination of Raspberry Pi + Arduino + Arduino components.
     
  3. JoseCuervo

    JoseCuervo En-Route

    Joined:
    Mar 11, 2012
    Messages:
    2,868

    Display name:
    JoseCuervo
    I have no idea what you typed in your original post.


    But I applaud you doing the effort. Best of luck with your endeavor.
     
  4. denverpilot

    denverpilot Tied Down

    Joined:
    Nov 8, 2009
    Messages:
    55,440
    Location:
    Denver, CO

    Display name:
    DenverPilot
    Cool project. Any other SDR devices with better bandwidth?
     
  5. zaitcev

    zaitcev En-Route

    Joined:
    Sep 30, 2010
    Messages:
    3,254

    Display name:
    Pete Zaitcev
    Ettus will work for sure, with a correct daughterboard, but that's $800 at minimum. I'll look into that when I get the core working with 1090ES.

    Update: They have a new product, B200, which requires no daughterboards and sells in board-only form for $675. Still kinda expensive if you ask me, but cheaper than just about anything else on the market.
     
    Last edited: Jan 5, 2014
  6. zaitcev

    zaitcev En-Route

    Joined:
    Sep 30, 2010
    Messages:
    3,254

    Display name:
    Pete Zaitcev
    Over the Christmas break, I made Glie to display a rudimentary picture. Since it's served with a mini-webserver, anything can show it, as I mentioned. So I grabbed my Kindle Fire and went outside to confirm that it actually shows real airplanes. Imagine my disappointment when it turned out that it only shows 1/5th of nearby aircraft at best. Those blasted Part 121 operators, always so cheap with upgrades. Oh well, come 2020...

    First picture attached. It also shows some weird sequencing for landing on rwy 8 (north is up).
     

    Attached Files:

  7. CJones

    CJones Final Approach

    Joined:
    Mar 14, 2005
    Messages:
    5,560
    Location:
    Jawjuh

    Display name:
    uHaveNoIdea
    Is there an API of some sort that you use to decode the ADS-B signal?
     
  8. zaitcev

    zaitcev En-Route

    Joined:
    Sep 30, 2010
    Messages:
    3,254

    Display name:
    Pete Zaitcev
    The common API for Extended Squitter receivers, if you can call it that, is a stream of packets in hexadecimal, each on its own line, starting with an asterisk and ending with a semicolon. I saw 2 software receivers and one or two hardware receivers supporting it. They differed a little in format since software receivers use system newline and the exact stream was the standard out, while hardware receiver had CR-LF newline and physical serial interface. Also, hex digits were uppercase. Otherwise you can call it a standard API if you want.

    So you read lines like these:

    *8dac154758c3878ad450e74b2088;
    *2000043212c437;
     
  9. zaitcev

    zaitcev En-Route

    Joined:
    Sep 30, 2010
    Messages:
    3,254

    Display name:
    Pete Zaitcev
    I got side-tracked a bit trying to decode UAT signal. So far result is negative, or an absence of any signal whatsoever. It would be interesting if anyone could confirm. Basically I need a volunteer who:

    - has an aircraft or portable like GDL 39 that receives FIS-B
    - has a Linux x86 computer and can build software from git, tarballs, etc.
    - has an RTL dongle with an antenna

    The code is here:
    https://github.com/zaitcev/ruat

    What is needed is to build and install rtlsdr and ruat, run UAT receiver to confirm the signal, and run ruat to see if it gets any consequent bits detected (in my case it gets about 9 to 12 bits, which is random noise).
     
  10. ssokol

    ssokol Filing Flight Plan

    Joined:
    Jul 29, 2013
    Messages:
    21
    Location:
    Kansas City

    Display name:
    ssokol
    Pete - I just found this post. Hope you're still working on this project. I've been looking for a cost-effective UAT receiver for a project and thus far have not found anything.

    I have a Cherokee 140, a Stratus receiver and a boat-load of Raspberry Pi and similar SBCs. I don't have an RTL dongle, but I can order one. I would be happy to help test as soon as the weather here in the midwest gets better.

    Let me know if you're still looking for help and I'll order the dongle.
     
  11. zaitcev

    zaitcev En-Route

    Joined:
    Sep 30, 2010
    Messages:
    3,254

    Display name:
    Pete Zaitcev
  12. flyingron

    flyingron Administrator Management Council Member PoA Supporter

    Joined:
    Jul 31, 2007
    Messages:
    22,877
    Location:
    Catawba, NC

    Display name:
    FlyingRon
    I pretty much bought one of the RTL dongles off Amazon (came from china) and only being a couple of miles from IAD I was able to see a few planes with just the little antenna that came with it. I'll get around to making a better one sooner or later.

    What I really want to figure out is how to get the uplink data.
     
  13. zaitcev

    zaitcev En-Route

    Joined:
    Sep 30, 2010
    Messages:
    3,254

    Display name:
    Pete Zaitcev
    Ron, if you scroll back to my post of December 30, you'll see that 1090ES works fine with RTL (using either rtl_adsb or dumb1090). It's the UAT at 978MHz that is a problem. That one contains FIS-B that is the real prize. Uplink for 1090 is nothing interesting. Well... in theory an FAA ground station should re-broadcast what it receives over UAT, so that airliners could get TCAS working against UAT-only spam cans. I have not seen even one transmission like that yet, although perhaps I wasn't decoding the right thing.
     
  14. zaitcev

    zaitcev En-Route

    Joined:
    Sep 30, 2010
    Messages:
    3,254

    Display name:
    Pete Zaitcev
    Guys, guess what. I managed to receive UAT signals with an RTL dongle after all. As it turned out, I used the function atan() where atan2() was called for. With that fix in place, everything works -- very poorly, of course.
    http://zaitcev.livejournal.com/226449.html

    I did not expect a success here, so I ordered an AirSpy (airspy.com), which is the cheapest receiver that is virtually guaranteed to work. It only costs $200. The AirSpy has a better RF front-end, so most likely I'll switch to it and away from RTL, for now at least. But if someone else wants to continue tinkering with UAT on RTL, at least I have proven that it's possible to an extent, and you have my code if you want it.
     
  15. John Collins

    John Collins En-Route

    Joined:
    Feb 29, 2008
    Messages:
    2,748
    Location:
    Charlotte, NC

    Display name:
    John
    The basic specification for decoding the UAT is contained in RTCA DO282B. It is available to the public for $670. It is not free, but if someone was serious about developing a receiver, it is available from RTCA.
     
  16. RotorDude

    RotorDude Pattern Altitude

    Joined:
    Aug 31, 2014
    Messages:
    2,321

    Display name:
    GliderDude
    Or get the free (final draft) version here, which is probably 99% the same (but no guarantees).

    Reed-Solomon encoding (used for UAT data blocks) is described in many places online, e.g. here.
     
    Last edited: Jan 31, 2015
  17. zaitcev

    zaitcev En-Route

    Joined:
    Sep 30, 2010
    Messages:
    3,254

    Display name:
    Pete Zaitcev
    Heh. I rely on Annex 10 Volume III and Doc.9861 that provide the same information, only from an international angle.

    I'm taking a high road with Lin and Costello textbook.
     
  18. RotorDude

    RotorDude Pattern Altitude

    Joined:
    Aug 31, 2014
    Messages:
    2,321

    Display name:
    GliderDude
    Peter, if it's of any help to you, I have the UAT ADSB data blocks (basic and long) decoded (in python) using the links I posted as starting point, with some additional elbow grease. :)
     
    Last edited: Feb 1, 2015