Best way to set up ADSB for easy data access

Hello everyone. I am messing around with setting up a small ADSB receiving station and I have a few questions/goals. I currently have a working setup with a pi 4 running the most recent 64bit raspbian desktop OS. I am using readsb and tar1090/graphs1090. One if my goals with this project is to access the data on the pi and use it with other programs such as python or something I can mess with. I also would like to add a second RTL-SDR with 978 Mhz functionality and use it in the same way. I have messed around with trying to change the frequency of just the one SDR to 978 but I am not having much luck. I guess my overarching question is that is readsb the easiest way to run this setup while keeping the pi desktop intact? Other pi images such as ASDBx and Piaware seem to only run with just the terminal and are kind of locked down and are meant to just run the web server and just sit there. Again, my goal is to get the data from the SDR, decode it, and use the data in other programs. Thanks in advance

Using a Raspberry with Raspberry OS (including GUI) works the samee way.
You can install the feeder scripts on it, it will not interfere with the GUI.

Readsb already have an option to get the data exported, there are several scripts out there doing the job, e.g. this Python Snippet which goes directly into SQLite DB.

With some Python skills you might be able to modify it.
You can ignore that it says “dump1090-fa”. It works with readsb as well after adjusting the path. The scriptt is using the aircraft json which is produced by both.

http://cactusprojects.com/logging-dump1090-fa-to-local-database/

@foxhunter
I have been trying to get the Cactus Projects scripts working on my system. There are some naming inconsistencies that were easy enough to fix, and the logging to a database works. However the second script that copies the database to a .csv file has a problem with line 6:

File "/home/pi/flightlogger/db_flight_to_csv.py", line 6, in <module>
    from dotenv import load_dotenv
ModuleNotFoundError: No module named 'dotenv'

I have installed dotenv but still get that error.
Have you had any problem with that? TIA

Edit to add:
Ok was able to get beyond the dotenv module problem by uninstalling and reinstalling dotenv.
Now able to run the flightlogger/db_flight_to_csv.py
script successfully.
Next question is – the Cactus Project instructions say to create an html file at /var/www/html/index.html however there is already a file at that location for the PiAware Info page. How to handle that – what is the significance of the file name index.html ? Thx.

Additional edit:
I temporarily set aside the index.html file for the PiAware Info page and created an index.html file for this project. However the csv table would not show in the browser. Then found out there’s a JavaScript file that’s also needed called d3.min.js. It can be downloaded from the web (about 143 kB). Place it in /var/www/html. Also there’s a mis-naming of the JavaScript file in the index.html file. The line in the index.html file should be:
<script src="d3.min.js"></script>
rather than:
<script src="d3.v3.min.js"></script>
With those changes I can see the csv table in the web browser (Safari). Probably works in other browsers also.

Probem is that it installs dotenv in your profie, but it should be under /usr/bin
Simply copy it over

To the question regarding the index.html i cannot answer as i am not using it.

I got around using /var/www/html/index.html by creating another Virtual host directory. See the other thread on this subject:
https://discussions.flightaware.com/t/assign-a-new-virtual-host-directory/88330

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.