GithubHelp home page GithubHelp logo

9a4db / sdr-java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bertjan/sdr-java

0.0 1.0 0.0 290 KB

Simple Software Defined Radio receiver for ADS-B and AIS in Java and JavaScript, using the Google maps API.

Java 81.70% JavaScript 11.86% CSS 0.19% HTML 6.24%

sdr-java's Introduction

sdr-java

Simple Software Defined Radio receiver for ADS-B and AIS in Java and JavaScript, using the Google maps API. This project depends on:

Background

Using a compatible RTL-SDR usb stick (cost < $10) and this project, you'll be able to receive and decode signals from ADS-B transponders installed in commercial airliners and from AIS transponders installed in ships, and plot flight/ship paths on Google maps. and plot flight paths on Google maps.

For a more in-depth introduction, see the following presentation:

Dependencies

  • Java 8, maven 3
  • MongoDB
  • For ADS-B: Running dump1090 client on the network. Preferably: tailor-made ADS-B antenna connected to the RTL-SDR device (see https://github.com/antirez/dump1090#antenna)
  • For AIS: Running aisdecoder on the network. Preferably: tailor-made AIS antenna
  • Compatible RTL-SDR device

RTL-SDR devices

I have used these two:

In general, when finding an RTL-SDR compatible device, just look for the best selling Realtek / RTL-SDR usb DVB-T stick.

Database setup

Install and start MongoDB. Database 'sdr' and collection 'positionData' will be created automatically. Create the following index to speed up queries over lots of data:

db.positionData.ensureIndex({"timestamp": 1, "_id": 1, "heading" : 1, "latitude" : 1, "objectId" : 1, "objectType" : 1, "longitude" : 1}, {"background": true});

Create the following index to enable automatic cleanup of data older than a 7 days:

db.positionData.createIndex({ "createdAt": 1 }, { expireAfterSeconds: 604800 });

Maven module structure

  • connectors: contains input sources for AIS and ADS-B that write to MongoDB
  • frontend: web frontend and API to display data written by the connectors
  • services: shared services used by multiple modules (configuration and MongoDB services)

Setting up a Raspberry Pi as a remote ADS-B / AIS receiver

Prerequisite: install the latest Raspbian Linux release on the Pi. Instructions below have been tested on a Raspberry Pi model B+.

Update the system

sudo su -
apt-get update && apt-get upgrade
apt-get install raspi-copies-and-fills

Install RTL-SDR

apt-get install git cmake libusb-1.0-0-dev build-essential
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/
mkdir build && cd build
cmake ../
make
make install
ldconfig

Blacklist the stock libusb driver so rtl-sdr can do its magic

vi /etc/modprobe.d/raspi-blacklist.conf

Add the following lines:

blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830

Reboot to activate the blacklisting

reboot

Install aisdecoder

apt-get install libasound2-dev libpulse-dev
wget http://www.aishub.net/downloads/aisdecoder-1.0.0.tar.gz
tar xfvz aisdecoder-1.0.0.tar.gz
cd aisdecoder-1.0.0
mkdir build && cd build
cmake ../ -DCMAKE_BUILD_TYPE=RELEASE
make
cp aisdecoder /usr/local/bin/
cp -a lib* /usr/local/lib/
ldconfig

Try out aisdecoder

rtl_fm -g 9999 -f 161975000 -p 10 -s 48k -r 48k | aisdecoder -h <ip-of-receiving-end> -p 1234 -a file -c mono -d -f /dev/stdin

Fiddle with value of '-p' to enable/maximize reception

Install dump1090

git clone git://github.com/MalcolmRobb/dump1090.git
cd dump1090
make

Start dump1090

./dump1090 --interactive --net --aggressive --metric --interactive-ttl 5

Bonus 1: decoding POCSAG pager messages

Install multimon-ng:

apt-get install qt4-qmake
git clone https://github.com/EliasOenal/multimon-ng.git
cd multimon-ng

# Skip X11 support, configure raw input only
cat multimon-ng.pro | sed 's@-lX11@@g' > multimon-ng.tmp && mv multimon-ng.tmp multimon-ng.pro
echo 'DEFINES += NO_X11' >> multimon-ng.pro 
echo 'DEFINES += ONLY_RAW' >> multimon-ng.pro 

mkdir build && cd build
qmake ../multimon-ng.pro
make && make install

Fire up rtl_fm and pipe the output throuh multimon:

rtl_fm -f 172446000 -s 22050 -M fm -F 0 -E dc -g 100 | multimon-ng -q -t raw -a POCSAG1200 -a POCSAG512 -a POCSAG2400 -e -p -v1 /dev/stdin

Bonus 2: decoding FLEX pager messages (used for P2000 in the Netherlands)

Install gnuradio and gr-osmosdr.

echo 'deb http://archive.raspbian.org/raspbian jessie main' >> /etc/apt/sources.list
apt-get update && apt-get upgrade
apt-get install gnuradio gnuradio-dev libboost-all-dev gr-osmosdr

Apply a patch to fix an issue in volk (part of gnuradio 3.7.5), as described on https://batilanblog.wordpress.com/2015/02/17/using-ec3k-with-raspberry-pi/:

wget http://gnuradio.org/releases/gnuradio/gnuradio-3.7.5.tar.gz
tar xvzf gnuradio-3.7.5.tar.gz 
cd gnuradio-3.7.5/
wget http://gnuradio.org/redmine/attachments/download/821/0001-volk-Fix-volk_malloc-when-alignment-is-1.patch
patch -p1 < *volk*.patch
mkdir build && cd build
cmake -DENABLE_DEFAULT=Off -DENABLE_VOLK=True -Dhave_mfpu_neon=0 ..
make
cp volk/lib/libvolk.so.0.0.0 /usr/lib/arm-linux-gnueabihf/
ldconfig

Install and run the flex decoder:

git clone https://github.com/zarya/sdr
cd sdr/receivers/flex/
chmod +x rtl_flex_noX.py 
./rtl_flex_noX.py -f 169.645M --rx-gain=37.2 --device=rtl=0

sdr-java's People

Contributors

bertjan avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.