ADS-Bを見る
RasPiじゃおもしろくないからVM上でやってみよう。
とりあえずVMWareのゲストOSにUSBコントローラとパススルーを追加した状態で。
$ lsusb
Bus 001 Device 002: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
$
認識OK、rtl-sdrのインストール
$ sudo apt-get install git cmake libusb-1.0-0.dev build-essential pkg-config
$ git clone git://git.osmocom.org/rtl-sdr.git
$ cd rtl-sdr/
$ mkdir build && cd build
$ cmake -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON ..
$ make
$ sudo make install
$ sudo ldconfig
おっけー。
$ sudo nano /etc/modprobe.d/rtlsdr-blacklist.conf
$ sudo rebootblacklist dvb_usb_rtl28xxu
blacklist rtl2830
blacklist dvb_usb_v2
blacklist dvb_core
xDecoからModeSDeco2をダウンロードして展開
$ tar xf modesdeco2_x86_64_20150815.tgz
ディレクトリに入って
http://www.kinetic.co.uk/resourcesdownloads.php
からLogos -> Silhouette LogosとSQB Files -> SBS Resourcesをダウンロードして解凍
Silhouette LogosのフォルダをLogosにして、BaseStation.sqbをmodesdeco2のフォルダに入れる。
[Unit]
Description=ModeSDeco2
After=network.target[Service]
Type=simple
ExecStart=[fullpath-modesdeco2] --beast 30005 --sbs10001 30003 --web 8080 --db [fullpath-BaseStation.sqb] --metric --silhouettes [full-path-logos] --location [lat]:[lon][Install]
WantedBy=multi-user.target
として/etc/systemd/system/modesdeco2.serviceを作る。
$ sudo systemctl enable modesdeco2
$ sudo systemctl start modesdeco2
$ systemctl modesdeco2
● modesdeco2.service - ModeSDeco2
Loaded: loaded (/etc/systemd/system/modesdeco2.service; enabled; vendor prese
Active: active (running) since Mon 2016-09-19 00:38:59 JST; 6s ago
Main PID: 12781 (modesdeco2)
CGroup: /system.slice/modesdeco2.service
よきかな。
flightrader24のFeed Binaryを公式サイトから持ってきて展開する
$ cd fr24feed_amd64
$ sudo nano /etc/fr24feed.ini
receiver="beast-tcp"
fr24key="[KeyString]"
host="127.0.0.1:30005"
bs="no"
raw="no"
logmode="0"
mlat="yes"
mlat-without-gps="yes"$ sudo chmod 644 /etc/fr24feed.ini
$ sudo nano /etc/systemd/system/fr24feed.service
[Unit]Description=Flightrader24 Feed
After=network.target[Service]
Type=simple
ExecStart=[full-path-fr24feed][Install]
WantedBy=multi-user.target$ sudo systemctl enable fr24feed
$ sudo systemctl start fr24feed
$ systemctl status fr24feed
● fr24feed.service - Flightrader24 Feed
Loaded: loaded (/etc/systemd/system/fr24feed.service; enabled; vendor preset:
Active: active (running) since Mon 2016-09-19 00:46:25 JST; 9s ago
Main PID: 12838 (fr24feed)
CGroup: /system.slice/fr24feed.service
よい。