Skip to main content

APRSD GPSD Extension to provide active GPS

Project description

APRSD GPSD Extension

PyPI Status Python Version [License](https://opensource.org/licenses/Apache Software License 2.0)

Read the documentation at https://aprsd-gps-extension.readthedocs.io/ Tests Codecov

pre-commit


[!WARNING] Legal operation of this software requires an amateur radio license and a valid call sign.

[!NOTE] Star this repo to follow our progress! This code is under active development, and contributions are both welcomed and appreciated. See CONTRIBUTING.md for details.

Features

  • Connect to GPSD (GPS daemon) to retrieve GPS coordinates
  • Support for local and remote GPSD servers
  • Automatic APRS beaconing based on GPS position
  • Smart beaconing that sends beacons when the device moves a certain distance
  • Interval-based beaconing for regular position updates
  • Real-time GPS data polling and processing

Requirements

  • aprsd >= 4.2.4
  • A running GPSD daemon (either local or remote)
  • GPSD must be accessible via TCP/IP on the configured host and port

Installation

You can install APRSD GPSD Extension via pip from PyPI:

$ pip install aprsd-gps-extension

Or using uv:

$ uv pip install aprsd-gps-extension

Configuration

Before using the GPS extension, you need to configure it in your APRSD configuration file. Generate a sample configuration file if you haven't already:

$ aprsd sample-config

This will create a configuration file at ~/.config/aprsd/aprsd.conf (or aprsd.yml).

GPSD Connection Settings

Add the following section to your APRSD configuration file to configure the GPS extension:

[aprsd_gps_extension]
# Enable the GPS extension (default: True)
enabled = True

# GPSD host to connect to (default: localhost)
# For remote GPSD, specify the IP address or hostname
gpsd_host = localhost

# GPSD port to connect to (default: 2947)
gpsd_port = 2947

# Polling interval in seconds to get GPS data (default: 2)
polling_interval = 2

# Enable debug logging (default: False)
debug = False

Connecting to a Remote GPSD Server

To connect to a remote GPSD server, simply set the gpsd_host to the IP address or hostname of the remote server:

[aprsd_gps_extension]
enabled = True
gpsd_host = 192.168.1.100  # Remote GPSD server IP
gpsd_port = 2947            # Default GPSD port
polling_interval = 2

Important: Ensure that:

  1. The remote GPSD server is running and accessible
  2. The GPSD port (default 2947) is not blocked by a firewall
  3. Your GPS device is connected and providing data to GPSD on the remote server

Beacon Configuration

The GPS extension supports three beaconing modes:

No Beaconing (none)

The extension will fetch GPS data but won't send any beacons. This is useful if you only want to track GPS position without broadcasting it.

[aprsd_gps_extension]
beacon_type = none

Interval Beaconing (interval)

Sends a beacon at regular intervals regardless of movement.

[aprsd_gps_extension]
beacon_type = interval
beacon_interval = 1800  # Send beacon every 1800 seconds (30 minutes)

Smart Beaconing (smart)

Sends beacons only when the device has moved a certain distance or after a time window. This is more efficient and reduces unnecessary beacons when stationary.

[aprsd_gps_extension]
beacon_type = smart
smart_beacon_distance_threshold = 50   # Send beacon after moving 50 meters
smart_beacon_time_window = 60           # Send beacon if stationary for 60 seconds

Complete Configuration Example

Here's a complete example configuration for connecting to a remote GPSD server with smart beaconing:

[aprsd_gps_extension]
enabled = True
gpsd_host = 192.168.1.100
gpsd_port = 2947
polling_interval = 2
debug = False
beacon_type = smart
beacon_interval = 1800
smart_beacon_distance_threshold = 50
smart_beacon_time_window = 60

Enabling Beaconing

The GPS extension requires that APRSD beaconing is enabled in the main configuration:

[DEFAULT]
enable_beacon = True
beacon_interval = 1800
beacon_symbol = /

Usage

Once installed and configured, the GPS extension will automatically start when you run aprsd server or aprsd webchat (if the webchat extension is installed).

The extension will:

  1. Connect to the configured GPSD server
  2. Poll GPS data at the specified interval
  3. Send beacons according to the configured beacon type
  4. Provide GPS statistics via the APRSD stats system

You can verify the GPS extension is working by checking the logs for messages like:

INFO: Connecting to GPS daemon: 192.168.1.100:2947
INFO: Connected to GPS daemon
INFO: GPS fix acquired

For more details, see the Command-line Reference.

Contributing

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

License

Distributed under the terms of the [Apache Software License 2.0 license](https://opensource.org/licenses/Apache Software License 2.0), APRSD GPSD Extension 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 Extension Python Cookiecutter template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aprsd_gps_extension-1.0.0.tar.gz (38.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aprsd_gps_extension-1.0.0-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file aprsd_gps_extension-1.0.0.tar.gz.

File metadata

  • Download URL: aprsd_gps_extension-1.0.0.tar.gz
  • Upload date:
  • Size: 38.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.9

File hashes

Hashes for aprsd_gps_extension-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b6fd7d251a0bf260f19a5033ff659861be8a28d8e1417fbe557f775879bb995c
MD5 e537201242876621fe5af99b86159126
BLAKE2b-256 a5cac9e92416041ebbcc2e47322f276edd0e65b3dbf0980660ad81ec13cf9df2

See more details on using hashes here.

File details

Details for the file aprsd_gps_extension-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aprsd_gps_extension-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a1e6675d07b765223341a0410bc900843bc556352e28a590dc0429f64d75c63
MD5 fdc87fcb520725058b0b8b7c7bd4a447
BLAKE2b-256 9045b6c858dbcfc1a12ac44f9016a5b877a4e699ada1d115ac6d318f2d99a62f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page