Python SDK for Jason GNSS Cloud PPK Service
Jason GNSS Cloud PPK Service is a cloud-based
positioning engine that uses GNSS data. One of the main features of this service
is that offers an API so that users can automatize the GNSS data processing
without the need to access the front-end.
The online documentation of the service can be found here.
To install the package:
pip3 install jason-gnss
Note that this SDK supports only Python 3.x.
Authentication
It is important that you have the JASON_API_KEY
and JASON_SECRET_TOKEN
environement variables. These can be fetched by accessing your area in the
Jason PaaS and then going to My Account
-> API Credentials
.
Use the package as an SDK
The package is basically a library that can be embedded into your Python scripts
import jason_gnss as jason
jason.submit_process(rover_file)
process_id = 3505
jason.get_status(process_id)
jason.download_results(process_id)
Command line tools
The package has also a command line tool so that you can use it out-of-the-box.
The following examples illustrate how to use it.
export JASON_API_KEY='<jason-api-key>'
export JASON_SECRET_TOKEN='<your-private-jason-user-token>'
jason -h
jason process test/jason_gnss_test_file_rover.txt
jason process test/jason_gnss_test_file_rover.txt test/jason_gnss_test_file_base.txt
jason process test/jason_gnss_test_file_rover.txt \
test/jason_gnss_test_file_base.txt \
--base_position 41.809142804 2.163228514 936.01730
jason status process_id
jason download process_id
jason convert test/jason_gnss_test_file_smartphone.txt
The arguments of the command line tools follow the docopt
Docker execution/development
It is recommended that you use docker to execute or work with this package.
This repository contains both a Dockerfile
as well as a docker-compose.yml
to help you with this.
Follow these instructions:
docker-compose build
docker-compose run jason_gnss
Once inside the container:
python setup.py install
Now, while in the container, you can issue commands in the prompt or
within the Python console.
API Key and secret token
If you are using docker-compose, we recommend that you store your authorization
keys in a file .env
and run the Docker container via the command
docker-compose run jason-gnss
. With this, your credentials will be loaded
in the container and the Jason tools will be ready to use without the need
to declare these variables.
JASON_API_KEY='<jason-api-key>'
JASON_SECRET_TOKEN='<your-private-jason-user-token>'
Although probably not used for the end user, for debugging purposes, in the
event that you have a local instance of the Jason service running in your
facilities, you can set the Jason entry point by defining the JASON_API_URL
environment variable.