Skip to content

hemna/aprsd-locationdata-plugin

Repository files navigation

aprsd locationdata plugin

PyPI Status Python Version License

Read the Docs Tests Codecov

pre-commit

Features

  • Query location data from aprs.fi for any callsign
  • Returns formatted location data including coordinates, altitude, course, speed, and timestamp
  • Supports querying your own location or any other callsign
  • Simple command interface via APRS messaging

Requirements

  • APRSD (APRS daemon)
  • aprs.fi API key
  • Python 3.x

Installation

You can install aprsd locationdata plugin via pip from PyPI:

$ pip install aprsd-locationdata-plugin

Configuration

  1. Enable the plugin in your APRSD configuration file:
[aprsd_locationdata_plugin]
enabled = True
  1. Ensure you have an aprs.fi API key configured in your APRSD config:
[aprs_fi]
apiKey = YOUR_APRS_FI_API_KEY

Usage

The plugin responds to commands starting with l or d (case-insensitive). You can query location data via APRS messaging.

Example Interactions

Query your own location

Send a message to the APRSD bot with just l or d:

l

or

d

Response:

^ld^YOURCALL:37.77493,-122.41942,52,180,0.0,1706123456

Format: ^ld^CALLSIGN:latitude,longitude,altitude,course,speed,timestamp

Query another station's location

Send a message with l or d followed by a callsign:

l N0CALL

or

d KD0ABC

Response:

^ld^N0CALL:40.71278,-74.00594,100,270,5.5,1706123456

Response Format

The plugin returns location data in the following format:

^ld^CALLSIGN:latitude,longitude,altitude,course,speed,timestamp

Where:

  • CALLSIGN: The callsign queried
  • latitude: Decimal degrees (5 decimal places)
  • longitude: Decimal degrees (5 decimal places)
  • altitude: Meters above sea level (integer)
  • course: Direction in degrees (0-360)
  • speed: Speed in knots (1 decimal place)
  • timestamp: Unix timestamp of last position update

Error Handling

If the callsign is not found on aprs.fi, the plugin returns a null message to prevent issues with webchat interfaces.

If the aprs.fi API request fails, the plugin returns:

Failed to fetch aprs.fi location

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, aprsd locationdata plugin is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from @hemna's APRSD Plugin Python Cookiecutter template.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors