Skip to main content

TAS-GNSS Python Package

A Python package for GNSS positioning and processing by Trustworthy AI and Autonomous Systems (TAS) Laboratory, The Hong Kong Polytechnic Univerisity.

News

2025.11.07

  • Fix a ciritical bug in solver (torch.pinv(A)->torch.linalg.pinv(A))
  • Add "irls_pnt_pos" which can support robust estimation

2025.10.02

We now support switching between RTKLIB backends. Set the environment variable rtklib to "demo5" to use pyrtklib5 (based on rtklib_demo5 2.5.0 EX). If unset or set to any other value, the library will default to the original pyrtklib, which is built on RTKLIB 2.4.3. This update enables users to choose the backend that best fits their application — whether for compatibility or to leverage new features in the demo5 branch. If you want to use the latest version (0.2.8 with rtklib 2.5.0 EX), please update via:

pip install -U pyrtklib5

To activate this version, you can set the environment before your program:

rtklib=demo5 python your_script.py

or set in your program as:

import os
os.environ['rtklib']='demo5'
# attention, must set before import this lib
import tasgnss as tas

Installation

Install the package using pip online:

pip install tasgnss

or install by github clone:

git clone https://github.com/PolyU-TASLAB/TASGNSS.git
cd TASGNSS && pip install .

Usage

After installation, you can import and use the package:

import tasgnss as tas

obs,nav,sta = tas.read_obs('data/20210610/test.obs','data/20210610/sta/hksc161d.21*')
obss = tas.split_obs(obs,False)
obss = tas.filter_obs(obss,1623296137.0,1623296340.0)
print("total epochs:",len(obss))
for o in obss:
    print(f"Epoch: {tas.obs2utc(o.data[0].time)}")
    sol_wls = tas.wls_pnt_pos(o,nav)
    print(sol_wls)

You can try to run the example:

cd example && python3 example.py

ROS Wrapper Usage

The ros_wrapper package provides a ROS node that processes GNSS data and publishes ROS messages. To use it:

  1. Make sure you have ROS installed and sourced.

  2. Build the package:

    cd /path/to/your/ros/workspace
    catkin_make
    source devel/setup.bash
    
  3. Run the ROS wrapper node:

    rosrun ros_wrapper ros_wrapper_node.py
    

    You can specify the observation and navigation files, as well as the UTC time range using ROS parameters:

    rosrun ros_wrapper ros_wrapper_node.py _obs_file:='data/20210610/test.obs' _nav_file:='data/20210610/sta/hksc161d.21*' _start_utc:=1623296137.0 _end_utc:=1623296340.0
    

    The node will publish the following topics:

    • /gnss_observations: GNSS observation data
    • /gnss_ephemeris: GNSS ephemeris data
    • /gnss_processed_data: Processed GNSS data

Documentation

For detailed documentation, please visit: Document

Release files for tasgnss 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tasgnss 0.1.5
File Size Uploaded
tasgnss-0.1.5.tar.gz 53.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tasgnss 0.1.5
File Interpreter ABI Platform
tasgnss-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 105.3 kB

Release files / tasgnss-0.1.5.tar.gz

Download URL tasgnss-0.1.5.tar.gz
Size 53.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c9ffac34b2b7d276f30876c9e1b5e7d09f81fce4677ee5c8a653ef13956a2197
BLAKE2b-256 checksum
How to use checksums
10862efedf9420e238c8904def67d332dd3cce71e19ee081966ea758159197aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / tasgnss-0.1.5-py3-none-any.whl

Download URL tasgnss-0.1.5-py3-none-any.whl
Size 52.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
037a05656c13704f798a44f925e75e0d5492dbc24548fac6c80ad6c32a337e9e
BLAKE2b-256 checksum
How to use checksums
2b67886fc21af035f379b0637b94f76c53f68e12bfce63ff1574243ebd7c9c04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page