備忘録

備忘録以外の何物でもない

Airspy用のADS-B feeder設定

使用機材

FlightawareのPiawareをインストール

  • いくつか導入するfeederのうち、Piawareが中核となるよう導入する。
  • しかし、Piawareは現時点では32bit版しかリリースされていないため、Flightawareのフォーラムを参考にして、abcd567a氏が64bit用にコンパイルしたPiaware 7.2を利用する。
$ sudo wget -O /etc/apt/sources.list.d/abcd567a.list   https://abcd567a.github.io/rpi/abcd567a.list
$ sudo wget -O /etc/apt/trusted.gpg.d/abcd567a-key.gpg https://abcd567a.github.io/rpi/KEY2.gpg
$ sudo apt update
$ sudo apt install piaware
$ sudo apt install dump1090-fa
$ sudo apt install piaware-web
$ sudo piaware-config feeder-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
$ sudo reboot

64bit版Raspberry Pi OSに32bit版のパッケージを導入できるようにする

$ sudo dpkg --add-architecture armhf
$ sudo apt update
$ sudo dpkg --print-architecture
arm64
$ sudo dpkg --print-foreign-architectures
armhf

Flightradar24のfeederをインストール

  • なんだかんだで、webサービスはFlightradar24が使いやすいので導入してfeedしておく
$ sudo bash -c "$(wget -O - https://repo-feed.flightradar24.com/install_fr24_rpi.sh)"
______  _  _         _      _                    _              _____    ___
|  ___|| |(_)       | |    | |                  | |            / __  \  /   |
| |_   | | _   __ _ | |__  | |_  _ __  __ _   __| |  __ _  _ __`' / /' / /| |
|  _|  | || | / _` || '_ \ | __|| '__|/ _` | / _` | / _` || '__| / /  / /_| |
| |    | || || (_| || | | || |_ | |  | (_| || (_| || (_| || |  ./ /___\___  |
\_|    |_||_| \__, ||_| |_| \__||_|   \__,_| \__,_| \__,_||_|  \_____/    |_/
               __/ |
              |___/
[main][i]FR24 Feeder/Decoder
[main][i]Version: 1.0.30-3/generic
[main][i]Built on Sep  1 2022 09:40:07 (HEAD-00021a4.git/Linux/static_armel)
[main][i]Running on: debian11
[main][i]Local IP(s): 192.168.xxx.xxx,xxxx::xxxx:xxxx:xxxx:xxxx
[main][i]Copyright 2012-2022 Flightradar24 AB
[main][i]https://www.flightradar24.com
[main][i]DNS mode: PING

Welcome to the FR24 Decoder/Feeder sign up wizard!

Before you continue please make sure that:

 1 - Your ADS-B receiver is connected to this computer or is accessible over network
 2 - You know your antenna's latitude/longitude up to 4 decimal points and the altitude in feet
 3 - You have a working email address that will be used to contact you
 4 - fr24feed service is stopped. If not, please run: sudo systemctl stop fr24feed

To terminate - press Ctrl+C at any point


Step 1.1 - Enter your email address (username@domain.tld)
$:example@example.com

Step 1.2 - If you used to feed FR24 with ADS-B data before, enter your sharing key.
If you don't remember your sharing key, you can find it in your account on the website under "My data sharing".
https://www.flightradar24.com/account/data-sharing

Otherwise leave this field empty and continue.
$:xxxxxxxxxxxxxxxx

Verifying sharing key...OK

Step 1.3 - Would you like to participate in MLAT calculations? (yes/no)$:

IMPORTANT: For MLAT calculations the antenna's location should be entered very precise!

Step 3.A - Enter antenna's latitude (DD.DDDD)
$:35.xxxxxx

Step 3.B - Enter antenna's longitude (DDD.DDDD)
$:139.xxxxxx

Step 3.C - Enter antenna's altitude above the sea level (in feet)
$:xxx

Using latitude: xx.xxxx, longitude: xxx.xxxx, altitude: xxxft above sea level

We have detected that you already have a PiAware application installed. We can therefore try to automatically configure the FR24 feeder to use existing receiver configuration, or you can manually configure all the parameters.

Would you like to use autoconfig (*yes*/no)$:yes

Step 6 - Please select desired logfile mode:
 0 -  Disabled
 1 -  48 hour, 24h rotation
 2 -  72 hour, 24h rotation
Select logfile mode (0-2)$:2

Saving settings to /etc/fr24feed.ini...OK
Settings saved, please run "sudo systemctl restart fr24feed" to use new configuration.
Installation and configuration completed!

ADS-B Exchangeのfeederをインストール

  • Flightradar24やFlightaware、Radarboxなどのように有料サービスを売るのが目的ではなく、多くの機能を利用料不要で運営している(好き!)
  • プライベート機も国有機も軍用機も一切の忖度せずフィルタリングしない男気あるサービス(好き!)
  • Flightradar24などのログは補完処理などが施されるが、ADS-B Exchangeは基本的には受信した生データを保存・公開しているとのこと(好き!)
$ sudo bash -c "$(wget -O - wget https://adsbexchange.com/feed.sh)"
Thanks for choosing to share your data with ADS-B Exchange!

ADSBexchange.com is a co-op of ADS-B/Mode S/MLAT feeders from around the
world. This script will configure your current your ADS-B receiver to
share your feeders data with ADS-B Exchange.

Would you like to continue setup?
Please enter a unique name to be shown on the MLAT map
(map.adsbexchange.com/mlat-map)(the pin will be offset for privacy)

Example: "william34-london", "william34-jersey", etc.
Disable MLAT: enter a zero: 0
For MLAT the precise location of your antenna is required.

A small error of 15m/45ft will cause issues with MLAT!

To get your location, use any online map service or this website:
https://www.mapcoordinates.net/en

Enter your receivers precise latitude in degrees with 5 decimal places.
(Example: 32.36291)

Enter your receivers longitude in degrees with 5 decimal places.
(Example: -64.71492)

Enter your receivers altitude above sea level including the unit, no
spaces:
in feet like this: 255ft
or in meters like this: 78m

We are now ready to begin setting up your receiver to feed ADS-B Exchange.

Do you wish to proceed?

New UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

feederだけであればこれで完了。アップロードした統計が見たい場合はstatsもインストールする。

$ sudo bash -c "$(wget -O - wget https://raw.githubusercontent.com/adsbxchange/adsbexchange-stats/master/stats.sh)"
Using existing valid UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) from /usr/local/share/adsbexchange/adsbx-uuid
#####################################
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
#####################################
https://www.adsbexchange.com/api/feeders/?feed=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
#####################################

Radarboxのfeederをインストール

  • 軍用機のフィルタリングがFlightradar24より甘いので、軍用機マニアにはわりと重宝されているらしい
  • 地図プロットの使いやすさは、Flightradar24 > Radarbox > ADS-B Exchange > Flightawareという感じなので入れておく
$ sudo bash -c "$(wget -O - wget http://apt.rb24.com/inst_rbfeeder.sh)"
!!!! IMPORTANT !!!!

By default, RBFeeder is configured to connect to your local dump1090 instance (localhost,
port 30005). If you want to use a USB RTL-SDR dongle instead, please run this command:

sudo rbfeeder --set-network-mode off --no-start

Then, restart the daemon:

sudo systemctl restart rbfeeder

After a few seconds, RBFeeder will connect to the AirNav servers and you can view your
sharing-key with this command:

sudo rbfeeder --showkey

If you already have a sharing-key from previous a installation, you can set the same
key using this command:

sudo rbfeeder --setkey ?your sharing key?

既存の共有キーを入力しておく

$ sudo rbfeeder --setkey ********************************

これだけだとMLAT演算に協力できないので、MLAT用のソフトも導入しておく。

$ sudo apt install mlat-client
Installation finished.

MALT用に設定を書き換える

  • MLAT演算用の座標
    • lat: 緯度(小数点以下6桁以上)
    • lon: 経度(小数点以下6桁以上)
    • alt: 標高(海抜何mか。整数
  • MLATプログラム起動用
    • mlat_cmd: コメント解除する
$ sudo vi /etc/rbfeeder.ini
[client]
network_mode=true
log_file=/var/log/rbfeeder.log

key=********************************

sn=EXTRPI******

# Add these information
# 'alt' key accepts integer value only. Floating-point causes error.
lat=**.******
lon=***.******
alt=**

[network]
mode=beast
external_port=30005
external_host=127.0.0.1

[mlat]
autostart_mlat=true
# uncomment this line
mlat_cmd=/usr/bin/python3.9 /usr/bin/mlat-client

[dump978]
#dump978_enabled=true

Airspy専用のADS-Bデコーダーの導入

  • Airspyにはメーカー製の専用ADS-Bデコーダーが公開されており、性能が良いらしい
  • 公式サイトでは実行バイナリだけの公開なので、インストールにはサポーターが作成したスクリプトを利用する
$ sudo bash -c "$(wget -O - https://raw.githubusercontent.com/wiedehopf/airspy-conf/master/install.sh)"

ADS-B受信状況の統計情報収集ツールの導入

  • 最近はGrafanaで可視化する見た目のかっこいいツールもあるようだが、セットアップの簡単な古典的なものを導入する
$ sudo bash -c "$(wget -q -O - https://raw.githubusercontent.com/wiedehopf/graphs1090/master/install.sh)"
All done! Graphs available at http://192.168.xxx.xxx/graphs1090
It may take up to 10 minutes until the first data is displayed