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.0a0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

pynavigation-0.1.0a0-py2.py3-none-any.whl (6.2 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: pynavigation-0.1.0a0.tar.gz
  • Upload date:
  • Size: 5.7 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.2 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.8

File hashes

Hashes for pynavigation-0.1.0a0.tar.gz
Algorithm Hash digest
SHA256 43618291b5ec105eb8707363ac9e8145414df5b67799e8ae25dd0c0ca0dfb73b
MD5 676f71fe004998035f18d73ea34d0b6d
BLAKE2b-256 bc9b099e88b3fd33c79f50b3c3ee23711bae5ee7f574827e8f64dcf167ad43ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pynavigation-0.1.0a0-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.2 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.2 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.8

File hashes

Hashes for pynavigation-0.1.0a0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8fb98be33136b55d7dbe9af0e7f4b71fd9cb6f7684e6e5ab631c204c92037444
MD5 34d9b6b09b9a28491884f5c370c70ec1
BLAKE2b-256 5294d198402d44428f98536ee202ff096c15abd75fbce755550de6dda7e0c001

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