{"id":16717940,"url":"https://github.com/xoolive/rs1090","last_synced_at":"2025-03-17T01:31:30.909Z","repository":{"id":223556966,"uuid":"760627590","full_name":"xoolive/rs1090","owner":"xoolive","description":"Decode Mode S, ADS-B and FLARM signals in Rust + Python","archived":false,"fork":false,"pushed_at":"2024-08-14T13:12:51.000Z","size":7601,"stargazers_count":11,"open_issues_count":6,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-15T11:17:44.836Z","etag":null,"topics":["ads-b","adsb","aircraft","dump1090","mode-s","python","rust","tracking"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xoolive.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-20T16:36:06.000Z","updated_at":"2024-08-17T20:48:09.116Z","dependencies_parsed_at":"2024-03-10T23:26:56.459Z","dependency_job_id":"75776916-a3a0-4205-a473-e6c6c363969a","html_url":"https://github.com/xoolive/rs1090","commit_stats":null,"previous_names":["xoolive/rs1090"],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoolive%2Frs1090","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoolive%2Frs1090/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoolive%2Frs1090/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoolive%2Frs1090/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xoolive","download_url":"https://codeload.github.com/xoolive/rs1090/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243836015,"owners_count":20355615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ads-b","adsb","aircraft","dump1090","mode-s","python","rust","tracking"],"created_at":"2024-10-12T21:34:25.511Z","updated_at":"2025-03-17T01:31:30.904Z","avatar_url":"https://github.com/xoolive.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rs1090\n\nrs1090 is a Rust library to decode Mode S, ADS-B and FLARM messages.\n\nIt takes its inspiration from the Python [pyModeS](https://github.com/junzis/pyModeS) library, and uses [deku](https://github.com/sharksforarms/deku) in order to decode binary data in a clean declarative way.\nThe project started as a fork of a very similar project called [adsb-deku](https://crates.io/crates/adsb_deku), but modules have been refactored to match [pyModeS](https://github.com/junzis/pyModeS) design, implementations extensively reviewed, simplified, corrected, and completed.\n\nThe directions ambitioned by rs1090 include:\n\n- improving the performance of Mode S decoding in Python;\n- exporting trajectory data to cross-platform formats such as JSON, gRPC, arrow;\n- providing efficient multi-receiver Mode S decoding;\n- serving real-time enriched trajectory data to external applications.\n\nIf you just want something stable to decode ADS-B messages from your Raspberry and visualize the data on a map, you may want to stick to one of the dump0190 implementations.\n\nThe rs1090 library comes with:\n\n- a companion application [decode1090](https://crates.io/crates/decode1090),\n- a live decoder [jet1090](https://mode-s.org/jet1090),\n- a Python binding [rs1090](https://pypi.org/project/rs1090).\n- and a WebAssembly binding [rs1090-wasm](https://www.npmjs.com/package/rs1090-wasm).\n\n## Performance\n\nBenchmarking performed on the decoding of a gate-to-gate [European flight](./data/long_flight.csv):\n\n- [pyModeS](https://github.com/junzis/pyModeS) in full Python mode;\n- [pyModeS](https://github.com/junzis/pyModeS) with Cython compiled functions;\n- `rs1090` with Python bindings on a single core (for a fair comparison);\n- `rs1090` with Python bindings on many cores **(default)**;\n- full Rust `rs1090` benchmark on many cores **(default)**.\n\nThe Python script for benchmarking is in [python/examples](python/examples/benchmark.py).  \nThe Rust benchmark is executed with `cargo bench`.  \nBoth scripts are run on an Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz.\n\n![Benchmark image](https://raw.githubusercontent.com/xoolive/rs1090/refs/heads/master/python/examples/benchmark.svg)\n\n\u003e [!NOTE]  \n\u003e The default out-of-the-box mode of `rs1090` is an execution distributed on all your cores. This benchmark was performed on a regular laptop. It can be much faster on supercomputers, but considering that most laptops now have at least 4 cores, this benchmark yields the speed-up you should get on your own computer.\n\n## Installation\n\nRun the following Cargo command in your project directory:\n\n```sh\ncargo add rs1090\n```\n\nOr add the following line to your `Cargo.toml`:\n\n```toml\nrs1090 = \"1.0.0\"  # check for the latest version, we are not there yet\n```\n\n## Usage\n\n```rust\nuse hexlit::hex;\nuse rs1090::prelude::*;\n\nfn main() {\n    let bytes: [u8; 14] = hex!(\"8c4841753a9a153237aef0f275be\");\n    // ADS-B decoding\n    if let Ok(msg) = Message::try_from(bytes.as_slice()) {\n        // JSON output\n        let json = serde_json::to_string(\u0026msg).expect(\"JSON error\");\n        println!(\"{}\", json);\n    }\n}\n```\n\nSee more examples in the `crates/rs1090/examples` folder.\n\n## jet1090\n\nThe jet1090 executable is documented on [https://mode-s.org/jet1090](https://mode-s.org/jet1090)\n\n![jet1090](https://raw.githubusercontent.com/xoolive/rs1090/refs/heads/master/docs/images/jet1090-table.png)\n\n## Python bindings\n\nYou may install the bindings compiled for most Python versions with:\n\n```sh\npip install rs1090\n```\n\nThe library provides a single do-it-all function called `decode()`:\n\n```pycon\n\u003e\u003e\u003e import rs1090\n\u003e\u003e\u003e rs1090.decode(\"8c4841753a9a153237aef0f275be\")\n{'df': '17',\n 'icao24': '484175',\n 'bds': '06',\n 'NUCp': 7,\n 'groundspeed': 17.0,\n 'track': 92.8125,\n 'parity': 'odd',\n 'lat_cpr': 39195,\n 'lon_cpr': 110320}\n```\n\nFor large sets of messages in Python (e.g. what you can download through [pyopensky](https://github.com/open-aviation/pyopensky)):\n\n```pycon\n\u003e\u003e\u003e import rs1090\n\u003e\u003e\u003e rs1090.decode(msg_list, ts_list)  # includes CPR to position decoding\n...\n\u003e\u003e\u003e rs1090.decode(msg_list, ts_list, reference=(lat0, lon0))  # useful for surface messages\n...\n```\n\nFor FLARM messages (also as batches):\n\n```pycon\n\u003e\u003e\u003e msg = \"7bf2381040ccc7e2395ecaa28e033a655d47e1d91d0bf986e1b0\"\n\u003e\u003e\u003e rs1090.flarm(msg, 1655279476, 43.61924, 5.11755)\n{'timestamp': 1655279476,\n 'reference_lat': 43.61924,\n 'reference_lon': 5.11755,\n 'icao24': '38f27b',\n 'is_icao24': True,\n 'actype': 'Glider',\n 'latitude': 43.6812864,\n 'longitude': 5.150585599999999,\n 'geoaltitude': 970,\n 'vertical_speed': 1.0,\n 'groundspeed': 18.698261951315153,\n 'track': 29.655457935479006,\n 'no_track': False,\n 'stealth': False,\n 'gps': 129}\n```\n\n## WebAssembly bindings\n\nUsage is documented on [https://observablehq.com/@xoolive/rs1090](https://observablehq.com/@xoolive/rs1090).\n\n## decode1090\n\nPrebuilt binaries are available on the [Releases page](https://github.com/xoolive/rs1090/releases?q=decode1090).  \nUsage is available with the help command.\n\n```sh\ndecode1090 --help\n```\n\n## Nix platform\n\nThis repository provides a Nix flake configuration for building and managing this project.\n\nYou may run the following to get the `jet1090` and `decode1090` executables in your PATH\n\n```sh\nnix profile install\n```\n\nFor reference:\n\n```sh\nnix develop  # open a shell with the proper environment to compile rs1090\nnix build  # build the jet1090 executable\nnix run  # run the jet1090 executable\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxoolive%2Frs1090","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxoolive%2Frs1090","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxoolive%2Frs1090/lists"}