Skip to main content

Advanced Navigation Python SDK

Welcome to the Advanced Navigation Python SDK!

This SDK provides a comprehensive suite of tools for interfacing with Advanced Navigation Inertial Navigation Systems (INS). It simplifies the process of establishing communication over Serial, TCP, or UDP, decoding Advanced Navigation Packet Protocol (ANPP) packets, and programmatically configuring Advanced Navigation devices.

Features

  • ANPP Protocol Support: Complete implementation of the Advanced Navigation Packet Protocol (ANPP) for encoding and decoding binary data streams.
  • Asynchronous & Synchronous I/O: Supports both asyncio for high-performance concurrent applications, and synchronous serial/TCP communication for simpler scripts.
  • Device Management: Easily configure sensors, offsets, baud rates, and request state variables.
  • Cross-Platform: Works on Linux, Windows, and macOS.

Installation

The SDK is available on PyPI and can be installed via pip:

pip install advanced-navigation

(Note: Requires Python 3.10+)


Quickstart

Here is a quick example of how to connect to an Advanced Navigation device (such as Certus or Spatial) over a serial port, read the device information, and continuously listen to the system state asynchronously using the AnDevice interface:

import asyncio
from datetime import datetime, timezone
from advanced_navigation.an_devices.an_device_async import AnDevice
from advanced_navigation.anpp_packets.an_packet_3 import DeviceInformationPacket
from advanced_navigation.anpp_packets.an_packet_20 import SystemStatePacket

async def handle_state_packet(state: SystemStatePacket):
    """Callback function triggered every time a SystemStatePacket is received."""
    device_time = datetime.fromtimestamp(
        state.unix_time_seconds + (state.microseconds / 1000000), 
        tz=timezone.utc
    )
    print(f"[{device_time}] Lat: {state.latitude:.6f}, Lon: {state.longitude:.6f}, Height: {state.height:.2f}m")

async def main():
    # Initialize the device
    device = AnDevice()
    
    # Connect via Serial Port (replace with your port, e.g. COM3 or /dev/ttyUSB0)
    await device.connect_serial(port="/dev/ttyUSB0", baud_rate=115200)
    
    print("Connecting to device...")
    await device.wait_online()
    
    # Request Device Information (Packet 3)
    info = await device.request(DeviceInformationPacket)
    if info:
        print(f"Connected! Device ID {info.device_id} | Hardware v{info.hardware_revision/1000} | Software v{info.software_version/1000}")

    # Register a callback to listen to the continuous System State stream (Packet 20)
    device.register_callback(SystemStatePacket, handle_state_packet)
    
    print("Listening for state updates... (Press Ctrl+C to stop)")
    try:
        # Keep the event loop running
        await asyncio.Future()
    except asyncio.CancelledError:
        pass
    finally:
        device.close()

if __name__ == "__main__":
    asyncio.run(main())

For more comprehensive examples—including synchronous operations, TCP logging, firmware updating, and specific device configurations—check out the examples/ directory in this repository.


Product Manuals

The Advanced Navigation SDK supports all INS devices using the ANPP protocol. For further detail on specific product configurations, mounting instructions, and operational capabilities, please see the following documentation:


Contributing

We welcome contributions to the Advanced Navigation Python SDK!

If you are developing a new feature, or addressing a bug:

  1. Fork the repository and create a feature branch.
  2. Implement your changes.
  3. Run the tests locally to verify that your changes pass successfully without breaking existing logic:
    pip install pytest
    pytest tests/
    
  4. Format and lint your code (we use standard Python linting like ruff).
  5. Open a Pull Request describing your changes.

For deeper insights into how the testing suite operates, refer to tests/README.md.

Metadata

Release files for advanced-navigation 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for advanced-navigation 0.2.4
File Size Uploaded Provenance Actions
advanced_navigation-0.2.4.tar.gz 68.7 kB With provenance Details for advanced_navigation-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for advanced-navigation 0.2.4
File Interpreter ABI Platform Actions
advanced_navigation-0.2.4-py3-none-any.whl Python 3 none any Details for advanced_navigation-0.2.4-py3-none-any.whl

Total release size: 247.3 kB

Release files / advanced_navigation-0.2.4.tar.gz

Download URL advanced_navigation-0.2.4.tar.gz
Size 68.7 kB
Tags Source
SHA-256 checksum
How to use checksums
038cfc5c256767a89dc256dc7c1522b7426d565ca4a0a5e75196fd2d8b7d6d7a
BLAKE2b-256 checksum
How to use checksums
d7da51ca24c61980880c4ed420a73c87550ce83337fcdf111876b96b2d943863
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / advanced_navigation-0.2.4-py3-none-any.whl

Download URL advanced_navigation-0.2.4-py3-none-any.whl
Size 178.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f58780941e58fc548c20b7efe229f52076ff135c065c2833e7f20734bd730c93
BLAKE2b-256 checksum
How to use checksums
08d9eaf42b35dec1ece4429763e58eec6b15e2a0dccd56f0dccc084a69292f50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for advanced-navigation 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for advanced_navigation-0.2.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page