Skip to content

Helpful things with ADS-B, mostly written for having a good time with the Wingbits project.

License

Notifications You must be signed in to change notification settings

gristlekinginc/adsb-accessories

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The scripts in here serve to help you understand more about your ADS-B setup. I'm mostly interested in analyzing data for Wingbits, as it's a fun project, but this can apply to any of the Wiedehopf's ADS-B setups.

ADS-B Unique Aircraft Tracker

This Python script analyzes data from an ADS-B receiver tracking aircraft, specifically focusing on identifying unique aircraft within a specified time period. The script reads aircraft data from a JSON file, filters the data based on the 'seen' time, and then identifies unique aircraft based on their hexadecimal identifiers ('hex' codes).

Features

  • Read and Parse JSON Data: The script reads data from aircraft.json, which contains information about aircraft tracked by the ADS-B receiver.
  • Time Period Filtering: Aircraft data is filtered to focus on a specific time period, such as the last 15 minutes.
  • Unique Aircraft Identification: The script identifies unique aircraft based on their 'hex' codes within the specified time frame.

How to Use

  1. Set Up the Data Source: Ensure aircraft.json is available at /run/readsb/aircraft.json with current aircraft data from your ADS-B receiver.

  2. Run the Script: Execute the script to analyze the data. By default, it processes data from the last 15 minutes. Modify the minutes parameter in filter_data_by_time function to change this duration.

  3. View Results: The script outputs the number of unique aircraft detected in the specified time frame.

Requirements

  • Python 3
  • Access to aircraft.json generated by an ADS-B receiver.

Example Output

Unique aircraft in the last 15 minutes: 99
Maximum range seen: 115.8 nautical miles
Average range seen: 51.0 nautical miles

Customization

  • Time Frame Adjustment: Change the minutes argument in the filter_data_by_time function to analyze a different time period.
  • File Path: Update the file_path variable in the main function if your aircraft.json is located elsewhere.

ADS-B Average Time to Receive XX Messages (not fully functional)

This Python script is designed to analyze data from Automatic Dependent Surveillance-Broadcast (ADS-B) receivers. It calculates the average time period required to receive at least two messages from a specified number of unique aircraft. The script reads data from an aircraft.json file, which contains information about aircraft detected by the ADS-B receiver.

Features

  • Read ADS-B Data: The script reads aircraft data from a JSON file (aircraft.json).
  • Unique Aircraft Identification: Identifies unique aircraft based on their hexadecimal identifiers ('hex' codes).
  • Average Time Calculation: Calculates the average time period to receive at least two messages from a specified number of unique aircraft.
  • Diagnostic Information: Provides details such as total aircraft processed, number of unique aircraft, minimum and maximum 'seen' values, and the length of the time period analyzed.

Limitation

  • The script relies on reading the aircraft.json file, which updates every 5 seconds. Without some cron jobbing, you'll get incorrect readings. This means the script might not capture every aircraft detected within the specified time frame, especially if the script's execution coincides with an update to aircraft.json.

How to Use

  1. Ensure aircraft.json is Available: The script reads data from aircraft.json, typically located at /run/readsb/aircraft.json. Ensure this file is present and being updated by your ADS-B receiver.

  2. Run the Script: Execute the script using Python. By default, it analyzes data for 100 unique aircraft but can be customized for a different number.

    python3 path_to_script.py
  3. View Results: The script outputs diagnostic information and the average time period for receiving at least two messages from the specified number of unique aircraft.

Customization

  • Target Flights: Change the target_flights parameter in the calculate_average_period function to analyze a different number of unique aircraft.

Requirements

  • Python 3
  • Access to aircraft.json generated by an ADS-B receiver.

Example Output

Total aircraft processed: [Number]
Time period: [Start Time] to [End Time]
Length of time period: [X.XXX] minutes
Number of unique aircraft: [Number]
Minimum 'seen' value: [X] seconds
Maximum 'seen' value: [X] seconds
Average time period for receiving at least 2 messages from 100 unique flights: [X.X] minutes

License

This project is licensed under the MIT License.

About

Helpful things with ADS-B, mostly written for having a good time with the Wingbits project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages