Skip to main content

CLI tool to easily get NTRIP caster information

Project description

NTRIP Browser Build Status

A Python API for browsing NTRIP (Networked Transport of RTCM via Internet Protocol).

Requirements

  • pager
  • geopy
  • pycurl
  • cchardet
  • texttable
  • Python 2.6–2.7 & 3.4–3.6

Installation

  • make sure that you have libcurl installed

  • pip install ntripbrowser

  • or clone and run make install

libcurl installation hints

  • installation via apt:

       apt-get install libssl-dev libcurl4-openssl-dev python-dev
    

Usage

ntripbrowser [-h] [-p] [-t] [-c] host

positional arguments:  
  host                  NTRIP source table host address

optional arguments:  
  -h, --help            Show this help message and exit  
  -p, --port            Set url port. Standard port is 2101  
  -t, --timeout         Add timeout  
  -c, --coordinates     Add NTRIP station distance to this coordinate
  -M  --maxdist         Only report stations less than this number of km away
                        from given coordinate

CLI workflow example:

ntripbrowser cddis-caster.gsfc.nasa.gov -p 443 -t 5 -c 1.0 2.0 -M 4000

Package API

Workflow example:

browser = NtripBrowser(host, port=2101, timeout=5)
browser.get_mountpoints()
browser.host = another_host
browser.get_mountpoints()

Arguments:

  • host

NTRIP caster host. Standard port is 2101, use :port optional argument to set another one.

Optional arguments:

  • port

NTRIP caster port.

  • timeout

Use timeout to define, how long to wait for a connection to NTRIP caster.

  • coordinates

Use coordinates to pass your position coordinates in function and get distance to NTRIP station.
Form of coordiantes must be (x, y) or (x.x, y.y) of latitude, longitude.

  • maxdist

Use maxdist to only report stations less than this number of km away from given coordinate.

Result

As a result you'll get a dictionary consisting of a lists of dictionaries with such structure:

  • CAS stations: "Host", "Port", "ID", "Operator", "NMEA", "Country", "Latitude", "Longitude", "FallbackHost", "FallbackPort", "Site", "Other Details", "Distance"

  • NET stations: "ID", "Operator", "Authentication", "Fee", "Web-Net", "Web-Str", "Web-Reg", "Other Details", "Distance"

  • STR stations: "Mountpoint", "ID", "Format", "Format-Details","Carrier", "Nav-System", "Network", "Country", "Latitude", "Longitude", "NMEA", "Solution", "Generator", "Compr-Encryp", "Authentication", "Fee", "Bitrate", "Other Details", "Distance"

Exceptions

  • ntripbrowser.NtripbrowserError - base class for all ntripbrowser exceptions.
  • ntripbrowser.UnableToConnect - raised when ntripbrowser could not connect to the assigned url.
  • ntripbrowser.NoDataReceivedFromCaster - raised when ntripbrowser could not find any data on the page.
  • ntripbrowser.ExceededTimeoutError - raised when connection timeout is exceeded.

To test

make test

Known Issues

Tests with tox may fail if python*-dev is not installed. So, you need to install python2.7-dev and python3.6-dev:

sudo apt-get install python2.7-dev
sudo apt-get install python3.6-dev

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

ntripbrowser-2.2.2.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

ntripbrowser-2.2.2-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file ntripbrowser-2.2.2.tar.gz.

File metadata

  • Download URL: ntripbrowser-2.2.2.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.7.3

File hashes

Hashes for ntripbrowser-2.2.2.tar.gz
Algorithm Hash digest
SHA256 fe07d3bdd4596a04894f1bb3e9137754d4ce9594f4a45d8f452986d7b88c62f9
MD5 59ea9f35276a673a4ee208742d63fdf6
BLAKE2b-256 006ce66964df5a18ecf1907f5d0f574fb797b043803512ce715b99dc2a2a3384

See more details on using hashes here.

File details

Details for the file ntripbrowser-2.2.2-py3-none-any.whl.

File metadata

  • Download URL: ntripbrowser-2.2.2-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.7.3

File hashes

Hashes for ntripbrowser-2.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a7eb5b5279c9d3ffe6a2944eb45cc04fa46fb2f1839d4bac91b8f6b8522ee011
MD5 28c45d104d1e2528d300e2c84082aa62
BLAKE2b-256 3b54d2db1fc6c40e48da904f058e629ecc773d68e2204ee04063a36ba8acb28d

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