airtraffic

Author Topic: Military Mode-S Logger - I've been playing with my Raspberry Pi Again!  (Read 10129 times)

Offline av8tor172

  • Full Member
  • ***
  • Posts: 115
    • Military Air Communication Frequenices, Live MilAir Streaming, Recorded MilAir Comms.
I've been experimenting with some custom software for the Raspberry Pi. It decodes Mode-S messages from a 'cheap' RTL-SDR dongle.  Yes, there is software out there that does the same thing, nothing new BUT other Raspberry Pi software just decodes the Mode-S message and sends every message it receives to the various mode-s websites/servers.  At message rates of 100's of messages per second, that  can slow down the receiving website.

I am having the Raspberry Pi computer doing most of the work in determining if the new Mode-S message has anything different regarding a hex-code already submitted to the website. Most Mode-S messages that are sent several times per second from an aircraft have the very same pieces of data, no change, so why send it to the website? This is where the Raspberry Pi takes up the workload while the website can then handle more receiver sources.

This is still in the experimental stages, so if you see some funny data, that means I'm working on code!  Everything on the Raspberry Pi is written in "C", the webpage is a mix of HTML, PHP, Javascript and uses an SQL database.

You can check it out here:
http://www.milaircomms.com/mil_air_modes_logger.html

Any comments or suggestions are always welcome
George
www.MilAirComms.com



Offline RonR

  • Moderator
  • Hero Member
  • *****
  • Posts: 1189
That is incredibly cool George!  I assume the software is using the known military aircraft database to filter out the commercial stuff...

Offline Marty Becker

  • Full Member
  • ***
  • Posts: 208
Very cool, George!

Offline av8tor172

  • Full Member
  • ***
  • Posts: 115
    • Military Air Communication Frequenices, Live MilAir Streaming, Recorded MilAir Comms.
That is incredibly cool George!  I assume the software is using the known military aircraft database to filter out the commercial stuff...

Yes, and that is done on the Pi as to not bog down the web-server.  I'm trying to distribute most of the work load to the Pi since it has only 1 task to do where as the web-server will have many tasks once I start to allow other to share data to the website.  As it stands now my mode-s program on the Pi is consuming about 25% of CPU time.  Also, the database which is stored on the Pi is copied to a RAM disk upon boot-up.  This way there is very little "file" activity with the SD-Card.  That has 2 advantages: 1) speed 2) increased SD-Card life.  The best I can determine the Pi is currently handling an average of 300 - 400 mode-s messages per second and has been weeding out the commerical / General Aviation messages just fine while not missing military messages...

Just added a few neat features not on other Mode-S Military pages.  Now I display info regarding the Home Airport of the aircraft, display Up and Down arrows to indicate altitude changes since last update, and display Up and Down arrows to indicate signal strength changes since last update.  I have one other person feeding data who's about 40 miles away and its been very interesting watching when we both see the same airplane, but when paying attention to each of our signal strength changes you can get a visual picture of direction of flight....

Its been a fun project, All the Pi code is written in "C" while the web-server code is HTML, PHP, a little Javascript and using an SQL database....So far on the Pi I've written about 3,000 lines of "C" code....my fingers hurt!

Enjoy,
George
www.MilAirComms.com

Offline av8tor172

  • Full Member
  • ***
  • Posts: 115
    • Military Air Communication Frequenices, Live MilAir Streaming, Recorded MilAir Comms.
One of my next little features I want to ad is to have the Pi watch for 7500, 7600, 7700, and 7777 squawk codes from all aircraft, not just Military.  When it sees one of the emergency codes it will still send the info to the webserver and display it in red-highlighted text, military or not.

Also I'm going to have the web-server send to my iPhone (any cell phone w/texting would work) a text message alerting my when there is a Military aircraft in range.  I've done texting from websites before, that is pretty easy....but I could set it up that anyone feeding the site can receive a text msg on their cell phone any time their mode-s receiver detects a Military Aircraft and include all known details (Altitude, Call, Type etc.) .....just don't read it while driving LOL

George
www.MilAirComms.com

Offline Marty Becker

  • Full Member
  • ***
  • Posts: 208
George,

Your aircraft database of hexcodes (commercial or military), did you compile the list over time or is there a list publicly available on the web?

Offline av8tor172

  • Full Member
  • ***
  • Posts: 115
    • Military Air Communication Frequenices, Live MilAir Streaming, Recorded MilAir Comms.
George,

Your aircraft database of hexcodes (commercial or military), did you compile the list over time or is there a list publicly available on the web?

Yes and Yes.  Here is a good look up for hexcodes, both mil and civil: http://www.gatwickaviationsociety.org.uk/modeslookup.asp

George
www.MilAirComms.com