Skip to main content

A library that models units for navigation on Earth.

Project description

CircleCI Sonarcloud Status Sonarcloud Status Sonarcloud Status Sonarcloud Status Sonarcloud Status Sonarcloud Status Sonarcloud Status

Navigation

This module provides units of measurement and associated functions required for navigating.

Applications

There are many use-cases for this module including the original reason for developing it - Search and Rescue. It's also useful if you are developing a GPS application, or anything that needs to work with Latitude, Longitude, Routes and Waypoints.

Units

The following navigation units are provided:

  • Speed

  • Distance

  • Time

  • CompassBearing

  • Coordinate (Latitude/Longitude)

  • Waypoint

  • Leg

  • Route

Install

$pip install pynavigation

Example

from pynavigation.units import Speed
from pynavigation.units import Distance
from pynavigation.units import SpeedDistanceTime
from pynavigation.units import CompassBearing
from pynavigation.units import Coordinate
from pynavigation.units import Waypoint

# Basic Units
speed = Speed(10)
distance = Distance(100)
sdt = SpeedDistanceTime(speed=speed, distance=distance)
bearing = CompassBearing(83)

# Positioning Units
latitude = Coordinate(56, 12, 34, "N")
longitude = Coordinate(2, 54, 19, "W")
waypoint = Waypoint(latitude, longitude)

# Routing Units
leg = Leg(sdt, waypoint, bearing)
legs = [leg]

route = Route(legs)

# Example methods

knots = speed.in_knots
time = sdt.time
latitude_in_decimal_format = latitude.as_decimal
longitude_from_decimal = Coordinate.from_decimal(-2.76543)

end_wpt = leg.end_waypoint
number_of_legs = route.number_of_legs
starting_point = route.start_waypoint


for leg in range(number_of_legs):
    current_leg = route.current_leg(leg)
    next_leg = route.next_leg(leg)
    previous_leg = route.previous_leg(leg)

Contributing

See the Contributing Guide

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

pynavigation-0.1.0b0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

pynavigation-0.1.0b0-py2.py3-none-any.whl (6.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pynavigation-0.1.0b0.tar.gz.

File metadata

  • Download URL: pynavigation-0.1.0b0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.2

File hashes

Hashes for pynavigation-0.1.0b0.tar.gz
Algorithm Hash digest
SHA256 f43fee6cdec9aad216e22c964519956a851875cb539a14a680d44d5ad8760ce9
MD5 e1589fcc3d19bd4cd699f25d859d6c54
BLAKE2b-256 8a743835db96cfe9da8a95504640277afa352cbee74167d6eca1ed80207b74ec

See more details on using hashes here.

File details

Details for the file pynavigation-0.1.0b0-py2.py3-none-any.whl.

File metadata

  • Download URL: pynavigation-0.1.0b0-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.2

File hashes

Hashes for pynavigation-0.1.0b0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 202f0a925769181ccee25cd60bff488713e0587cdd1e69630867fd7c8a3e8ef0
MD5 f3f1a3d6f4936d31cc3ae7ce2c08d992
BLAKE2b-256 c01852aa84fefcd927073843a6e57afaeea5a4ecc65d7df413d7095d1383d3a8

See more details on using hashes here.

Supported by

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