Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
65ce1a6
test ci and fix #125
xoolive Apr 18, 2022
6e33ac0
with mypy
xoolive Apr 18, 2022
06941ba
fix tests
xoolive Apr 18, 2022
73c3a75
more os
xoolive Apr 18, 2022
401f3f5
ignore for windows+github actions
xoolive Apr 18, 2022
13f4fe7
tests with coverage
xoolive Apr 18, 2022
c024144
new release 2.11
junzis Apr 18, 2022
b36540e
fix corner case
xoolive May 31, 2022
b90932e
add missing parameters for dumpto file
junzis Jul 9, 2022
bb8f83e
fix RCv for position with GNSS height
junzis Jul 9, 2022
b4d4ef8
Fix description
dforsi Aug 8, 2022
1f620d6
Merge pull request #129 from dforsi/fix/description
xoolive Aug 8, 2022
130491e
Add missing import
dforsi Aug 8, 2022
3e0d7ce
Merge pull request #131 from dforsi/fix/imports
xoolive Aug 11, 2022
6b4a5bd
move round() call to baro == None else clause
JWyman482 Aug 14, 2022
afd53af
Increase padding on _print to fit baro
JWyman482 Aug 14, 2022
6a427c0
Update display to remove units if baro == none
JWyman482 Aug 14, 2022
d3607a1
Merge pull request #132 from JWyman482/bds62_baro_rounding_fix
xoolive Aug 15, 2022
5122237
fully annotated code
xoolive Nov 1, 2022
9d82f9b
compatibility with Python 3.7
xoolive Nov 1, 2022
0667c1b
include Python 3.11
xoolive Nov 1, 2022
87e6f50
FLARM decoder
xoolive Dec 3, 2022
90f35a8
FLARM decoder
xoolive Dec 3, 2022
5a703a0
Merge pull request #134 from junzis/pr_flarm
xoolive Dec 4, 2022
4cf99e8
switch to poetry (#135)
xoolive Dec 27, 2022
8f09867
Update .gitignore
xoolive Dec 27, 2022
a8f3b9c
attempt to fix poetry windows cache issue
xoolive Dec 27, 2022
6140f84
update yml
xoolive Dec 29, 2022
6d0406c
update version
xoolive Dec 30, 2022
d999851
fix typo and &&
xoolive Dec 30, 2022
8830ef3
fix poetry PATH for windows
xoolive Dec 30, 2022
ebe1f76
dependabot.yml
xoolive Dec 30, 2022
e1017bc
Bump codecov/codecov-action from 2 to 3 (#136)
dependabot[bot] Dec 30, 2022
9e6f9c3
upload source
xoolive Dec 30, 2022
5bc11cd
fix test runner.os
xoolive Dec 30, 2022
dc9d7ea
fix test runner.os
xoolive Dec 30, 2022
ff12d81
fix publish source
xoolive Dec 30, 2022
72fcc79
clean dependencies
xoolive Dec 30, 2022
e437931
fix publish
xoolive Dec 30, 2022
09ed997
fix publish
xoolive Dec 30, 2022
144ee17
fix publish
xoolive Dec 30, 2022
39936e4
fix publish
xoolive Dec 30, 2022
99dc2a4
limit wheels to windows, otherwise build from src
xoolive Dec 30, 2022
66c2984
fix build issues
xoolive Jan 19, 2023
0d7a310
Update py_common.py (#143)
nkruzan Feb 12, 2023
4e19ecd
minor changes, new release
xoolive Feb 14, 2023
a5b8d67
Bump actions/setup-python from 2 to 4 (#144)
dependabot[bot] Mar 2, 2023
8403cb6
Bump actions/checkout from 2 to 3 (#145)
dependabot[bot] Mar 2, 2023
50864b5
Remove rounding in pyModeS (#147)
paulmadejong May 22, 2023
8e2051a
update test
junzis May 22, 2023
b1f8f6e
Some annotations for quantities
xoolive Jun 14, 2023
57aa7a7
update test
junzis May 22, 2023
458a78c
add the decoding of the gps status indicator
xoolive Jul 18, 2023
8d9a8df
minor fix
xoolive Jul 18, 2023
070dc80
include pyd files to wheel
xoolive Aug 13, 2023
b6608b2
loosen dependency requirements
xoolive Aug 22, 2023
b4c81db
Bump snok/install-poetry from 1.3.3 to 1.3.4 (#156)
dependabot[bot] Sep 2, 2023
7727315
Bump actions/checkout from 3 to 4 (#158)
dependabot[bot] Oct 1, 2023
852315e
Update allcall.py
Flyer350 Dec 4, 2023
eea0922
c_common.py: return -999999 (extremely low, physically impossible) al…
Dec 18, 2023
4cf024f
Merge pull request #162 from paulmadejong/altitude_none_return
junzis Dec 18, 2023
45ae55d
Merge pull request #161 from Flyer350/patch-11
junzis Dec 18, 2023
582a0d2
DI = 1 correction for uplink messages (#157)
Flyer350 Dec 18, 2023
36fb0de
upgrade poetry version
xoolive Dec 19, 2023
942c68d
Bump actions/setup-python from 4 to 5 (#163)
dependabot[bot] Jan 1, 2024
81b54ac
Bump codecov/codecov-action from 3 to 4 (#165)
dependabot[bot] Feb 1, 2024
97a50a5
Bump actions/cache from 3 to 4 (#166)
dependabot[bot] Feb 1, 2024
9646c2f
bump version
xoolive Feb 2, 2024
93794b6
fix build for py312
xoolive Mar 3, 2024
4a7c719
Fixed "Magnetic" typo
chrislanzara Jul 3, 2024
01ceb81
deleted all the previous commits that were causing problems and added…
kirth123 Aug 25, 2024
d8dd978
Bump snok/install-poetry from 1.3.4 to 1.4.0 (#171)
dependabot[bot] Aug 25, 2024
8acbdf1
Merge pull request #170 from chrislanzara/master
junzis Aug 25, 2024
08218f5
Merge pull request #151 from junzis/quantities
junzis Aug 25, 2024
74ea61f
fix decoder and uncertainty issues (#146)
gituser283 Aug 25, 2024
e2de7bc
fix typing
junzis Aug 25, 2024
b22734a
fix typing
junzis Aug 25, 2024
2f5dbdf
update version and dependencies
junzis Aug 25, 2024
fdfa2b3
fix typing
junzis Aug 25, 2024
b4be551
git workflow
junzis Aug 25, 2024
2c40302
minor fix for bds 50 and 60; increment version to 2.19
junzis Nov 26, 2024
5f2dcec
refactor: switch to uv, update GitHub workflows
junzis Nov 26, 2024
9a15c54
Fixed error when receiving NICv1 due to mismatch in output
kestr31 Dec 30, 2024
715fb35
Merge pull request #180 from kestr31/master
junzis Jan 17, 2025
ff17565
Explicitly set multiprocessing start method to fork
jbencina Jan 18, 2025
bd3d2f9
Fix floating point display on terminal output
jbencina Jan 18, 2025
30a16a8
Fix for a corner-case numerical problem and corresponding unit test. …
EdFuentetaja Feb 9, 2025
a4c6d01
Merge pull request #183 from jbencina/jbencina/fix-formatting
junzis Feb 9, 2025
e647863
Merge pull request #182 from jbencina/jbencina/fix-multithreading
junzis Feb 9, 2025
3f2ae94
build c code
junzis Mar 19, 2025
12f06d4
include flarm c code in build
junzis Mar 19, 2025
6fd0896
update uv lock
junzis Mar 19, 2025
b316e7e
update gh action
junzis Mar 19, 2025
6401a39
Update pyproject.toml
junzis Apr 29, 2025
3d0c07f
bds44.py: removed alternative temperature as it's a future developmen…
Jun 19, 2025
5ff9689
Merge pull request #187 from paulmadejong/master
junzis Jun 20, 2025
513e093
new version
junzis Jul 3, 2025
55aab03
fix type hints for temp44()
Jul 9, 2025
3e7820b
minor release version
junzis Jul 9, 2025
46616f0
Update uv.lock
junzis Jul 9, 2025
0a1c403
Merge pull request #188 from Job-Heersink/fix-temp-44-type-hints
junzis Jul 9, 2025
484b1b1
Correct velocity return types (#191)
Shiva127 Dec 24, 2025
7af6920
Cleaning README.rst (#192)
Shiva127 Dec 24, 2025
6c14301
Correct altitude return type (#189)
Shiva127 Dec 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[run]
branch = True
include = */pyModeS/*
omit = *tests*

[report]
exclude_lines =
coverage: ignore
raise NotImplementedError
if TYPE_CHECKING:

ignore_errors = True
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
74 changes: 74 additions & 0 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build and publish pyModeS

on:
release:
types: [published]
workflow_dispatch:

env:
CIBW_BUILD: cp310* cp311* cp312* cp313*
CIBW_ARCHS_WINDOWS: auto64
CIBW_ARCHS_LINUX: auto64 aarch64
CIBW_ARCHS_MACOS: universal2
# CIBW_ARCHS_MACOS: auto universal2
CIBW_TEST_SKIP: "*universal2:arm64"

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, windows-latest, macos-14]

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
if: runner.os == 'Linux' && runner.arch == 'X64'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build wheels
uses: pypa/[email protected]

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN_PYMODES }}
29 changes: 0 additions & 29 deletions .github/workflows/pypi-publish.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ __pycache__/
*.py[cod]
.pytest_cache/

#cython
*.c

# C extensions
*.so

Expand Down
26 changes: 0 additions & 26 deletions Makefile

This file was deleted.

35 changes: 12 additions & 23 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ If you want to make use of the (faster) c module, install ``pyModeS`` as follows
# conda (compiled) version
conda install -c conda-forge pymodes

# stable version (to be compiled on your side)
pip install pyModeS[fast]
# stable version
pip install pyModeS

# development version
git clone https://github.com/junzis/pyModeS
cd pyModeS
pip install .[fast]
poetry install -E rtlsdr


View live traffic (modeslive)
Expand Down Expand Up @@ -185,7 +185,6 @@ Core functions for ADS-B decoding
pms.adsb.position(msg_even, msg_odd, t_even, t_odd, lat_ref=None, lon_ref=None)
pms.adsb.airborne_position(msg_even, msg_odd, t_even, t_odd)
pms.adsb.surface_position(msg_even, msg_odd, t_even, t_odd, lat_ref, lon_ref)
pms.adsb.surface_velocity(msg)

pms.adsb.position_with_ref(msg, lat_ref, lon_ref)
pms.adsb.airborne_position_with_ref(msg, lat_ref, lon_ref)
Expand All @@ -196,17 +195,18 @@ Core functions for ADS-B decoding
# Typecode: 19
pms.adsb.velocity(msg) # Handles both surface & airborne messages
pms.adsb.speed_heading(msg) # Handles both surface & airborne messages
pms.adsb.airborne_velocity(msg)
pms.adsb.surface_velocity(msg, source)
pms.adsb.airborne_velocity(msg, source)


Note: When you have a fix position of the aircraft, it is convenient to use `position_with_ref()` method to decode with only one position message (either odd or even). This works with both airborne and surface position messages. But the reference position shall be within 180NM (airborne) or 45NM (surface) of the true position.


Decode altitude replies in DF4 / DF20
**************************************
Decode altitude replies in DF0 / DF4 / DF16 /DF20
**************************************************
.. code:: python

pms.common.altcode(msg) # Downlink format must be 4 or 20
pms.common.altcode(msg) # Downlink format must be 0, 4, 16 or 20


Decode identity replies in DF5 / DF21
Expand Down Expand Up @@ -282,7 +282,7 @@ To identify BDS 4,4 and 4,5 codes, you must set ``mrar`` argument to ``True`` in

.. code:: python

pms.bds.infer(msg. mrar=True)
pms.bds.infer(msg, mrar=True)

Once the correct MRAR and MHR messages are identified, decode them as follows:

Expand Down Expand Up @@ -359,19 +359,8 @@ Here is an example:

Unit test
---------
To perform unit tests, ``pytest`` must be install first.

Build Cython extensions
::

$ make ext

Run unit tests
::

$ make test

Clean build files
::
.. code:: bash

$ make clean
uv sync --dev --all-extras
uv run pytest
81 changes: 81 additions & 0 deletions hatch_build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import sys
from pathlib import Path

from Cython.Build import cythonize
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
from setuptools import Distribution, Extension
from setuptools.command import build_ext


class CustomBuildHook(BuildHookInterface):
def initialize(self, version, build_data):
"""Initialize the build hook."""
compile_args = []

if sys.platform == "linux":
compile_args += ["-Wno-pointer-sign", "-Wno-unused-variable"]

extensions = [
Extension(
"pyModeS.c_common",
sources=["src/pyModeS/c_common.pyx"],
include_dirs=["src"],
extra_compile_args=compile_args,
),
Extension(
"pyModeS.decoder.flarm.decode",
[
"src/pyModeS/decoder/flarm/decode.pyx",
"src/pyModeS/decoder/flarm/core.c",
],
extra_compile_args=compile_args,
include_dirs=["src/pyModeS/decoder/flarm"],
),
# Extension(
# "pyModeS.extra.demod2400.core",
# [
# "src/pyModeS/extra/demod2400/core.pyx",
# "src/pyModeS/extra/demod2400/demod2400.c",
# ],
# extra_compile_args=compile_args,
# include_dirs=["src/pyModeS/extra/demod2400"],
# libraries=["m"],
# ),
]

ext_modules = cythonize(
extensions,
compiler_directives={"binding": True, "language_level": 3},
)

# Create a dummy distribution object
dist = Distribution(dict(name="pyModeS", ext_modules=ext_modules))
dist.package_dir = "pyModeS"

# Create and run the build_ext command
cmd = build_ext.build_ext(dist)
cmd.verbose = True
cmd.ensure_finalized()
cmd.run()

buildpath = Path(cmd.build_lib)

# Provide locations of compiled modules
force_include = {
(
buildpath / cmd.get_ext_filename("pyModeS.c_common")
).as_posix(): cmd.get_ext_filename("pyModeS.c_common"),
(
buildpath / cmd.get_ext_filename("pyModeS.decoder.flarm.decode")
).as_posix(): cmd.get_ext_filename("pyModeS.decoder.flarm.decode"),
}

build_data["pure_python"] = False
build_data["infer_tag"] = True
build_data["force_include"].update(force_include)

return super().initialize(version, build_data)

def finalize(self, version, build_data, artifact_path):
"""Hook called after the build."""
return super().finalize(version, build_data, artifact_path)
40 changes: 0 additions & 40 deletions pyModeS/decoder/commb.py

This file was deleted.

Loading