Skip to main content

Helium Positioning API

Project description

Helium Positioning API

PyPI Status Python Version License

Read the documentation at https://helium-positioning-api.readthedocs.io/ Tests Codecov

pre-commit Black

Features

Prediction of the location of devices belonging to an organization in the Helium Console. Several different methods and models are available.

Installation

Developer install

The following allows a user to create a developer install of the positioning api.

pip install -r requirements.txt
poetry install
poetry shell
pip install git+https://github.com/emergotechnologies/helium-api-wrapper

Prerequisites

Before use, ensure that there is an .env file in the root directory of the repository where the API_KEY variable is entered (see .env.sample). You can generate and copy the API_KEY at https://console.helium.com/profile.

Usage

The service allows usage via command line interface or locally hosted REST interface.

CLI

Get Device Position

python -m helium_positioning_api predict --uuid 92f23793-6647-40aa-b255-fa1d4baec75d

Currently defaults to the "nearest_neighbor" model.

Advanced Requests

The location prediction command is

python -m helium_positioning_api predict --uuid 'your uuid' --model 'your model selection'

See the table below for a list of currently available models.

Model Position estimation explanation Suggested use
nearest_neighbor Location of hotspot with the best signal Purchase of at most one packet from a device (see Packet Configurations for more details)
midpoint Point of equal distance from the two hotspots with the best signals Purchase of at least two packets from a device (see Packet Configurations for more details)
linear_regression (experimental) Trilateration with an linear regression distance estimator Experimental. Purchase of at least three packets from a device (see Packet Configurations for more details)
gradient_boosting (experimental) Trilateration with a gradient boosted regression distance estimator Experimental. Purchase of at least three packets from a device (see Packet Configurations for more details)

REST-API

  1. Start local REST-API (default)
    python -m helium_positioning_api serve
    
  2. Open Browser and navigate to 127.0.0.1:8000/docs
  3. Click on predict_tf path to drop down the endpoint details
  4. Click on the Try it out button.
  5. Fill in the uuid of your device and click on the button Execute to get an estimation using the nearest_neighbor model
  6. You can see the location prediction response in the Responses section below.

The mapping of available models to paths can be seen in the table below.

model path
nearest_neighbor predict_tf
midpoint predict_mp
linear_regression predict_tl_lin
gradient_boosting predict_tl_grad

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, Helium Positioning API is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from @cjolowicz's Hypermodern Python Cookiecutter template.

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

Built Distribution

File details

Details for the file helium_positioning_api-0.0.2.dev1677245221.tar.gz.

File metadata

File hashes

Hashes for helium_positioning_api-0.0.2.dev1677245221.tar.gz
Algorithm Hash digest
SHA256 2a35501945daa50e54b98b0a219049e1429ce6acb0f588d28a226a5a2cbaa319
MD5 bb67c7c62faaf786cdec1a044780dd62
BLAKE2b-256 2023ff5101ff66c1e2c27df8a29e7ce0704e0ebe4b1d7a466021f3d291f0c7be

See more details on using hashes here.

File details

Details for the file helium_positioning_api-0.0.2.dev1677245221-py3-none-any.whl.

File metadata

File hashes

Hashes for helium_positioning_api-0.0.2.dev1677245221-py3-none-any.whl
Algorithm Hash digest
SHA256 32da3bbfee5c212eac30fa45c4d0832be0b1c6c6ff04100f3314411538c3af9a
MD5 b6b303ea124d039c74e043e4fbb4c840
BLAKE2b-256 51435051132a87f64ac6b26cab97e402ece4c5513d706706e61eb7e8b8c71a12

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