Skip to main content

NautiPy

CI PyPI Python Typing License Docs

Easy coordinate handling, trustworthy WGS84 navigation, and diagnosed position fixes in one Python package.

Explore the educational guide and interactive Fix Lab for visual explanations and worked examples.

NautiPy accepts the coordinate formats people commonly paste or type, converts them into a validated Position, and provides navigation and position-fixing tools without silently guessing when an input is ambiguous.

Install

Use a Python version accepted by the requires-python setting, then install the complete package from PyPI:

python -m pip install nautipy

The installation includes GeographicLib, NumPy, and SciPy, so every feature is available immediately.

Quick start

Parse, inspect, and convert coordinates

from nautipy import convert_position, inspect_positions, parse_position

p1 = parse_position("50.12257, 8.66570")
p2 = parse_position("50° 7.3542' N; 8° 39.942' E")
p3 = parse_position("+50.12257+008.66570/")

assert p1 == p2 == p3
assert convert_position(
    "50.12257, 8.66570",
    to="dms",
) == "50° 7′ 21.25″ N; 8° 39′ 56.52″ E"

batch = inspect_positions(
    [
        "50.12257 N; 8.66570 E",
        "50, 8",
        "not a position",
    ],
    order="auto",
)
assert (
    batch.total_count,
    batch.parsed_count,
    batch.ambiguous_count,
    batch.invalid_count,
) == (3, 1, 1, 1)

Detection covers decimal degrees (DD), degrees and decimal minutes (DDM), degrees/minutes/seconds (DMS), two-dimensional ISO 6709, and NMEA coordinate field pairs. Use order="lonlat" for unmarked longitude-first input. order="auto" accepts hard axis evidence or equivalent source orders; otherwise it raises AmbiguousCoordinateError. Batch inspection preserves every yielded record's zero-based index and either its ParseResult or its structured coordinate failure.

Calculate WGS84 navigation values

from nautipy import destination, distance, inverse

start = "50.12257, 8.66570"
end = destination(start, bearing=90, distance=12_000)

assert abs(distance(start, end) - 12_000) < 1e-6

result = inverse(start, end)
print(result.initial_bearing)
print(result.final_bearing)

Distances are in metres and bearings are true degrees clockwise from north. Calculations use WGS84 ellipsoidal geodesics through GeographicLib.

Estimate a position from observations

from nautipy import Position, RangeObservation, solve_fix

references = (
    Position(50.116135, 8.670277),
    Position(50.112836, 8.666753),
    Position(50.110347, 8.659873),
)
ranges = tuple(
    RangeObservation(reference, measured, uncertainty=2.0)
    for reference, measured in zip(
        references,
        (1_275.251, 1_599.237, 1_917.145),
    )
)

result = solve_fix(ranges=ranges)
if result.success:
    print(result.position)
else:
    print(result.status, result.competing_positions)

Bearing, range, and mixed-observation fixes report residuals, convergence, and geometry diagnostics. A successful optimization does not by itself guarantee good observation geometry, so callers should inspect the complete result.

Use the command line

$ nautipy convert "50° 7.3542' N; 8° 39.942' E" --to dd
50.122570, 8.665700

$ nautipy inspect "+50.12257+008.66570/"

inspect writes deterministic JSON describing the detected format, normalizations, resolution, and candidate interpretations. python -m nautipy provides the same interface.

What is included

  • coordinate parsing, scalar and batch inspection, formatting, and conversion;
  • an immutable, validated Position model;
  • WGS84 distance, bearing, destination, interpolation, and nearest-position calculations;
  • diagnosed bearing, range, and mixed-observation fixes;
  • GeoJSON Point and FeatureCollection interchange; and
  • offline convert and inspect commands.

NautiPy is deliberately not a general GIS framework, charting application, route planner, live-data client, or certified navigation system.

Documentation

The NautiPy educational guide explains coordinate notation, ellipsoidal navigation, bearing and range fixes, uncertainty, and how the package fits those ideas together. It includes original diagrams and an interactive Fix Lab.

The exact behavior specifications remain in the repository:

For contributing and maintaining the project:

Please report ordinary bugs through the issue tracker. Report suspected security problems through the security policy. Participation is governed by the Code of Conduct.

NautiPy is available under the MIT License.

Metadata

Release files for nautipy 0.2.0

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

Source distribution (sdist)

Source distribution for nautipy 0.2.0
File Size Uploaded Provenance Actions
nautipy-0.2.0.tar.gz 129.5 kB With provenance Details for nautipy-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nautipy 0.2.0
File Interpreter ABI Platform Actions
nautipy-0.2.0-py3-none-any.whl Python 3 none any Details for nautipy-0.2.0-py3-none-any.whl

Total release size: 181.7 kB

Release files / nautipy-0.2.0.tar.gz

Download URL nautipy-0.2.0.tar.gz
Size 129.5 kB
Tags Source
SHA-256 checksum
How to use checksums
032a3210af9131564d343b5007fe4a365f3a8b844c0904ecc1e1de6975d87518
BLAKE2b-256 checksum
How to use checksums
17beed2fed2584c88b7484c7f386eb857881fd9bb1a8becd14ed658e2e7c5521
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jul 27, 2026.

Transparency log

Release files / nautipy-0.2.0-py3-none-any.whl

Download URL nautipy-0.2.0-py3-none-any.whl
Size 52.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9cafdecf1245aebc1995f8021b2ea04bb0a81d995ebe8a9031169f6a3ba3429e
BLAKE2b-256 checksum
How to use checksums
f236a89b7a30bb7dd8e2cdb2cd004cce659a90eb8e67a56fd75ed5ef7e193f0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jul 27, 2026.

Transparency log

Security for nautipy 0.2.0

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 nautipy-0.2.0.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 Jul 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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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