├── .github ├── dependabot.yml └── workflows │ ├── deploy.yaml │ └── test.yaml ├── .gitignore ├── .gitmodules ├── CHANGELOG.md ├── LICENSE ├── README.md ├── ogn ├── __init__.py ├── client │ ├── __init__.py │ ├── client.py │ └── settings.py ├── ddb │ ├── __init__.py │ └── utils.py └── parser │ ├── __init__.py │ ├── exceptions.py │ ├── parse.py │ ├── pattern.py │ ├── telnet_parser.py │ └── utils.py ├── parser_v2_migration.md ├── poetry.lock ├── pyproject.toml └── tests ├── __init__.py ├── client ├── __init__.py ├── test_AprsClient.py └── test_TelnetClient.py ├── ddb ├── __init__.py └── test_utils.py └── parser ├── __init__.py ├── parse ├── __init__.py ├── test_comments.py ├── test_parse.py ├── test_position.py ├── test_position_weather.py └── test_status.py ├── test_parse_telnet.py └── test_utils.py /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: pip 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: "04:00" 8 | open-pull-requests-limit: 10 9 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yaml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | tags: 8 | - 'v*.*.*' 9 | pull_request: 10 | workflow_dispatch: 11 | 12 | jobs: 13 | build: 14 | name: PyPI - Build Python 🐍 distributions 📦 15 | runs-on: ubuntu-latest 16 | strategy: 17 | matrix: 18 | python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] 19 | 20 | steps: 21 | - name: Checkout code 22 | uses: actions/checkout@v4 23 | with: 24 | submodules: recursive 25 | 26 | - name: Install Python 27 | uses: actions/setup-python@v5 28 | with: 29 | python-version: ${{ matrix.python-version }} 30 | 31 | - name: Install poetry 32 | uses: abatilo/actions-poetry@v4 33 | 34 | - name: Install the project dependencies 35 | run: poetry install 36 | 37 | - name: Run the automated tests 38 | run: poetry run pytest tests --cov=ogn --cov-report=xml --cov-report=html 39 | 40 | - name: Lint code with flake8 41 | run: poetry run flake8 ogn tests --ignore=E501,E701 42 | 43 | - name: Build the project 44 | run: poetry build 45 | shell: bash 46 | 47 | - name: Store the distribution packages 48 | uses: actions/upload-artifact@v4 49 | with: 50 | name: python-package-distributions 51 | path: dist/ 52 | overwrite: true 53 | 54 | publish-to-testpypi: 55 | name: Publish distribution 📦 to PyPI (test) 56 | needs: 57 | - build 58 | runs-on: ubuntu-latest 59 | 60 | environment: 61 | name: testpypi 62 | url: https://test.pypi.org/p/ogn-client 63 | 64 | permissions: 65 | id-token: write 66 | 67 | steps: 68 | - name: Download all the dists 69 | uses: actions/download-artifact@v4 70 | with: 71 | name: python-package-distributions 72 | path: dist/ 73 | - name: Publish distribution 74 | uses: pypa/gh-action-pypi-publish@release/v1 75 | with: 76 | user: __token__ 77 | password: ${{ secrets.TEST_PYPI_API_TOKEN }} 78 | repository-url: https://test.pypi.org/legacy/ 79 | skip-existing: true 80 | verbose: true 81 | 82 | publish-to-pypi: 83 | name: Publish distribution 📦 to PyPI (productive) 84 | if: ${{ startsWith(github.ref, 'refs/tags/') }} 85 | needs: build 86 | runs-on: ubuntu-latest 87 | environment: 88 | name: pypi 89 | url: https://pypi.org/p/ogn-client 90 | permissions: 91 | id-token: write 92 | steps: 93 | - name: Download all the dists 94 | uses: actions/download-artifact@v4 95 | with: 96 | name: python-package-distributions 97 | path: dist/ 98 | 99 | - name: Publish distribution 100 | uses: pypa/gh-action-pypi-publish@release/v1 101 | with: 102 | user: __token__ 103 | password: ${{ secrets.PYPI_API_TOKEN }} 104 | skip-existing: true 105 | verbose: true 106 | -------------------------------------------------------------------------------- /.github/workflows/test.yaml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | - development 8 | pull_request: 9 | workflow_dispatch: 10 | 11 | jobs: 12 | build: 13 | name: PyPI - Build Python 🐍 distributions 📦 14 | runs-on: ubuntu-latest 15 | strategy: 16 | matrix: 17 | python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] 18 | 19 | steps: 20 | - name: Checkout code 21 | uses: actions/checkout@v4 22 | with: 23 | submodules: recursive 24 | 25 | - name: Install Python 26 | uses: actions/setup-python@v5 27 | with: 28 | python-version: ${{ matrix.python-version }} 29 | 30 | - name: Install poetry 31 | uses: abatilo/actions-poetry@v4 32 | 33 | - name: Install the project dependencies 34 | run: poetry install 35 | 36 | - name: Run the automated tests 37 | run: poetry run pytest tests --cov=ogn --cov-report=xml --cov-report=html 38 | 39 | - name: Lint code with flake8 40 | run: poetry run flake8 ogn tests --ignore=E501,E701 41 | 42 | - name: Build the project 43 | run: poetry build 44 | shell: bash 45 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OGN stuff 2 | *.db 3 | *.log 4 | 5 | # Python 6 | __pycache__/ 7 | *.py[cod] 8 | 9 | # Distribution / packaging 10 | bin/ 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | eggs/ 15 | lib/ 16 | lib64/ 17 | parts/ 18 | sdist/ 19 | var/ 20 | *.egg-info/ 21 | .installed.cfg 22 | *.egg 23 | 24 | # Unit test / coverage reports 25 | .coverage 26 | .cache 27 | nosetests.xml 28 | coverage.xml 29 | 30 | # Sphinx documentation 31 | docs/_build/ 32 | 33 | # Editors 34 | *.swp 35 | *.swo 36 | 37 | # Python virtualenv 38 | env/ 39 | 40 | # Celery beat 41 | celerybeat-schedule 42 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ogn-aprs-protocol"] 2 | path = ogn-aprs-protocol 3 | url = https://github.com/glidernet/ogn-aprs-protocol 4 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # CHANGELOG 2 | 3 | ## 2.0.0: - 2025-05-23 4 | - parser: use rust parser as default 5 | - parser: removed OgnParseError since only invalid APRS don't pass the parser 6 | 7 | ## 1.3.3: - 2025-05-21 8 | - parser: use rust parser with option "use_rust_parser=True" (default for v2.0.0) 9 | 10 | ## 1.3.2: - 2025-04-23 11 | - parser: fixed utcnow deprecation warning 12 | 13 | ## 1.3.1: - 2025-04-22 14 | - parser: parse short path (#128) 15 | - client: configurable socket timeout (#112) 16 | - client: more helpful socket error message (#116) 17 | 18 | ## 1.3.0: - 2025-04-19 19 | - parser: Handle messages that do not conform to the "ogn-aprs-protocol" specification/implementation (fixes #126) 20 | - Moved dependency management to to poetry 21 | - Added github action pipeline for automated testing and publishing 22 | 23 | ## 1.2.3: - 2025-04-01 (not released on PyPI) 24 | - parser: Added support for OGNMTK (Microtrak) beacons 25 | 26 | ## 1.2.2: - 2025-03-31 (not released on PyPI) 27 | - client: If no reference_timestamp provided use timestamp from APRS server (fixes #85) 28 | - parser: Handle dst_calls 'OGFLR6' (protocol 6) and 'OGFLR7' (protocol 7) like 'OGFLR' (fixes #123) 29 | 30 | ## 1.2.1: - 2021-06-06 31 | - client: Added peer IP to log messages 32 | - parser: Added rainfall_1h and rainfall_24h to beacon_type 'position_weather' 33 | 34 | ## 1.2.0: - 2021-06-01 35 | - parser: Added support for OGNSKY (safesky) beacons 36 | - client: Replace bad characters with � instead of raising an exception (restore old behaviour with parameter ignore_decoding_error=False) 37 | 38 | ## 1.1.0: - 2021-04-05 39 | - parser: Added no-tracking flag decoding 40 | - parser: Fixed aircraft_type decoding 41 | ## 1.0.1: - 2020-11-02 42 | - client: catch errors while connecting (fixes #74 and #91) 43 | - client: no logging messages by default (fixes #92) 44 | 45 | ## 1.0.0: - 2020-10-15 46 | - client: changed socket mode from blocking to 5s timeout (fixes #89) 47 | - parser: Added optional distance/bearing/normalized_quality calculation if parameter "calculate_relatives" is True (fixes #86) 48 | - parser: Added support for weather data (new in receiver software v0.2.8) from FANET ground stations (aprs_type: position_weather) 49 | - parser: Added support for latency (new in receiver software v0.2.8) in receiver messages (OGNSDR) (fixes #87) 50 | - parser: Added support for reference_timestamp with tzinfo (fixes #84) 51 | - parser: Fixed textual altitude part (fixes #81) 52 | - parser: Skip keys where value is "None" 53 | 54 | ## 0.9.8: - 2020-08-21 55 | - parser: Changed InReach parser (fixes #73) 56 | - parser: separated incompatible ID into parser dependant ID (lt24: address -> lt24_id, skylines: address -> skylines_id, 57 | spider: id_spider -> spider_registration, address -> spider_id, spot: address -> spot_id) (fixes #64) 58 | - client: Added keyword arguments for the callback function in the 'run' method of the client 59 | 60 | ## 0.9.7: - 2020-05-21 61 | - parser: Added support for OGPAW (PilotAware) beacons 62 | - client: Dropped compatibility for Python 3.4 63 | 64 | ## 0.9.6: - 2020-01-17 65 | - parser: Better support for OGFLR beacons from PilotAware 66 | - client: Allow dynamic settings override with optional "settings" parameter 67 | 68 | ## 0.9.5: - 2019-09-07 69 | - parser: fixed telnet parser 70 | 71 | ## 0.9.4: - 2019-06-10 72 | - parser: Added support for OGINREACH (Garmin inReach) beacons 73 | - parser: Added support for OGFLYM (Flymaster) beacons 74 | - parser: Added support for comments in tracker beacons (OGNTRK) 75 | - parser: Added support for OGCAPT (Capturs) beacons 76 | 77 | ## 0.9.3: - 2019-06-03 78 | - parser: Added Generic parser for unknown formats 79 | 80 | ## 0.9.2: - 2019-05-07 81 | - parser: Exception handling for bad OGNTRK beacons 82 | 83 | ## 0.9.1: - 2018-09-18 84 | - parser: Fixed SPOT beacons and Tracker beacons 85 | - parser: Fixed kph to ms conversion 86 | - client: Catch ConnectionResetError 87 | 88 | ## 0.9.0: - 2018-05-14 89 | - parser: Added support for OGNLT24 (LT24), OGSKYL (Skylines), OGSPID (Spider), OGSPOT (Spot) and OGNFNT (Fanet) 90 | - parser: Added support for (server) comments 91 | - parser: Added parser for local receiver output (port 50001) 92 | - parser: Changed unit for rotation from "half turn per minute" to "degrees/s" 93 | 94 | ## 0.8.2: - 2018-01-20 95 | - parser: Better validation of timestamp, lat/lon and altitude 96 | 97 | ## 0.8.1: - 2018-01-12 98 | - client: Ignore messages other than UTF-8 99 | - parser: Allow IDs only with hexadecimal values 100 | 101 | ## 0.8.0 - 2017-10-02 102 | - parser: Merged function 'parse_aprs' and 'parse_ogn_beacon' to 'parse' 103 | - parser: Added support for OGNSDR (receiver), OGNTRK (ogn tracker), OGNFLR (flarm) and OGNAV (Naviter) beacons 104 | - parser: Added support for RELAYed messages 105 | - parser: Added support for ddhhmm time format (eg. '312359z') 106 | - parser: Added support for heared aircrafts 107 | - client: Allow client to do sequential connect-disconnect 108 | 109 | ## 0.7.1 - 2017-06-05 110 | - parser: Bugfix, error_count in aircraft beacon is a int 111 | 112 | ## 0.7.0 - 2017-06-04 113 | - parser: Added support for OGN v0.2.6 aircraft and receiver beacons 114 | 115 | ## 0.6.0 - 2016-10-21 116 | - parser: Added support for OGN v0.2.5 receiver beacons 117 | - parser: Changed keys to adopt naming from [ogn\_client-ruby](https://github.com/svoop/ogn_client-ruby) 118 | 119 | ## 0.5.0 - 2016-09-29 120 | - Added aprs destination callsign as `dstcall` to aprs beacon keys (#9) 121 | - Changed aprs parser to allow other destination calls than `APRS` 122 | - Fixed parsing of APRS precision and datum option (#7) 123 | - Added optional `reference_time` argument to `parse_aprs` function and disabled 124 | magic date correction if this argument is missing 125 | 126 | ## 0.4.0 - 2016-03-29 127 | - aprs client: Added the possibility of a timed callback 128 | - Added ogn.ddb submodule which provides the generator `get_ddb_devices` 129 | 130 | ## 0.3.0 - 2016-03-18 131 | The repository ogn-python splitted up into two separate repositories: 132 | - python-ogn-client (the repository this Changelog belongs to), 133 | including an APRS- & OGN-Parser and an APRS-Client. 134 | - python-ogn-gateway, including a database, CLI, logbook. 135 | 136 | - Moved exceptions from `ogn.exceptions` to `ogn.parser.exceptions` 137 | - Moved parsing from `ogn.model.*` to `ogn.parser` 138 | - Renamed module `ogn.gateway` to `ogn.client` 139 | - Renamed class `ognGateway` to `AprsClient` 140 | - Simplified usage of the module: Imported parse functions at package level (`ogn.parser`) 141 | - Refined timstamp reconstruction to accept delayed packets (fixed glidernet/ogn-python#31) 142 | 143 | # Historic ogn-python releases 144 | ## 0.2.1 - 2016-02-17 145 | First release via PyPi. 146 | - Added CHANGELOG. 147 | 148 | ## 0.2 149 | - Changed database schema. 150 | - Changed aprs app name to 'ogn-gateway-python'. 151 | - Moved repository to github-organisation glidernet. 152 | - Added exception handling to the packet parser. 153 | - Added some tests for ogn.gateway.client. 154 | - Added setup.py to build this package. 155 | - Added configuration via python modules. 156 | - Added scheduled tasks with celery. 157 | - Renamed command line option `db.updateddb` to `db.import_ddb`. 158 | - Added command line options `db.drop`, `db.import_file`, `db.upgrade`, 159 | `logbook.compute` and `show.devices.stats`. 160 | 161 | ## 0.1 162 | Initial version. 163 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published 637 | by the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . 662 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # python-ogn-client 2 | 3 | [![build](https://github.com/Meisterschueler/python-ogn-client/actions/workflows/ci.yaml/badge.svg)](https://github.com/Meisterschueler/python-ogn-client/actions/workflows/ci.yaml) 4 | [![PyPi Version](https://img.shields.io/pypi/v/ogn-client.svg)](https://pypi.python.org/pypi/ogn-client) 5 | 6 | A python3 module for the [Open Glider Network](http://wiki.glidernet.org/). 7 | It can be used to connect to the OGN-APRS-Servers and to parse APRS-/OGN-Messages. 8 | 9 | 10 | ## Installation 11 | 12 | python-ogn-client is available at PyPI. So for installation simply use pip: 13 | 14 | ``` 15 | pip install ogn-client 16 | ``` 17 | 18 | ## Example Usage 19 | 20 | ### Parse APRS/OGN packet. 21 | 22 | ```python 23 | from ogn.parser import parse 24 | from datetime import datetime 25 | 26 | beacon = parse("FLRDDDEAD>APRS,qAS,EDER:/114500h5029.86N/00956.98E'342/049/A=005524 id0ADDDEAD -454fpm -1.1rot 8.8dB 0e +51.2kHz gps4x5", 27 | reference_timestamp=datetime(2015, 7, 31, 12, 34, 56)) 28 | ``` 29 | 30 | ### Connect to OGN and display all incoming beacons. 31 | 32 | ```python 33 | from ogn.client import AprsClient 34 | from ogn.parser import parse, AprsParseError 35 | 36 | def process_beacon(raw_message): 37 | try: 38 | beacon = parse(raw_message) 39 | print('Received {aprs_type}: {raw_message}'.format(**beacon)) 40 | except AprsParseError as e: 41 | print('Error, {}'.format(e.message)) 42 | 43 | client = AprsClient(aprs_user='N0CALL') 44 | client.connect() 45 | 46 | try: 47 | client.run(callback=process_beacon, autoreconnect=True) 48 | except KeyboardInterrupt: 49 | print('\nStop ogn gateway') 50 | client.disconnect() 51 | ``` 52 | 53 | ### Connect to telnet console and display all decoded beacons. 54 | 55 | ```python 56 | from ogn.client import TelnetClient 57 | from ogn.parser.telnet_parser import parse 58 | 59 | def process_beacon(raw_message): 60 | beacon = parse(raw_message) 61 | if beacon: 62 | print(beacon) 63 | 64 | client = TelnetClient() 65 | client.connect() 66 | 67 | try: 68 | client.run(callback=process_beacon) 69 | except KeyboardInterrupt: 70 | print('\nStop ogn gateway') 71 | client.disconnect() 72 | ``` 73 | 74 | ## License 75 | Licensed under the [AGPLv3](LICENSE). 76 | -------------------------------------------------------------------------------- /ogn/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glidernet/python-ogn-client/bb7c3c28c995533e41a8199133bc6532c7e11205/ogn/__init__.py -------------------------------------------------------------------------------- /ogn/client/__init__.py: -------------------------------------------------------------------------------- 1 | from ogn.client.client import AprsClient # noqa: F401 2 | from ogn.client.client import TelnetClient # noqa: F401 3 | 4 | 5 | class CustomSettings(object): 6 | def __init__(self, **kw): 7 | self.kw = kw 8 | 9 | def __getattr__(self, name): 10 | return self.kw[name] 11 | -------------------------------------------------------------------------------- /ogn/client/client.py: -------------------------------------------------------------------------------- 1 | import socket 2 | import logging 3 | from time import time, sleep 4 | 5 | from ogn.client import settings 6 | 7 | 8 | def create_aprs_login(user_name, pass_code, app_name, app_version, aprs_filter=None): 9 | if not aprs_filter: 10 | return f"user {user_name} pass {pass_code} vers {app_name} {app_version}\n" 11 | else: 12 | return f"user {user_name} pass {pass_code} vers {app_name} {app_version} filter {aprs_filter}\n" 13 | 14 | 15 | class AprsClient: 16 | def __init__(self, aprs_user, aprs_filter='', settings=settings): 17 | self.logger = logging.getLogger(__name__) 18 | self.logger.addHandler(logging.NullHandler()) 19 | 20 | self.aprs_user = aprs_user 21 | self.aprs_filter = aprs_filter 22 | self.settings = settings 23 | 24 | self._sock_peer_ip = None 25 | self._kill = False 26 | 27 | def connect(self, retries=1, wait_period=15, socket_timeout=5): 28 | # create socket, connect to server, login and make a file object associated with the socket 29 | while retries > 0: 30 | retries -= 1 31 | try: 32 | self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 33 | self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) 34 | self.sock.settimeout(socket_timeout) 35 | 36 | if self.aprs_filter: 37 | port = self.settings.APRS_SERVER_PORT_CLIENT_DEFINED_FILTERS 38 | else: 39 | port = self.settings.APRS_SERVER_PORT_FULL_FEED 40 | 41 | self.sock.connect((self.settings.APRS_SERVER_HOST, port)) 42 | self._sock_peer_ip = self.sock.getpeername()[0] 43 | 44 | login = create_aprs_login(self.aprs_user, -1, self.settings.APRS_APP_NAME, self.settings.APRS_APP_VER, self.aprs_filter) 45 | self.sock.send(login.encode()) 46 | self.sock_file = self.sock.makefile('rb') 47 | 48 | self._kill = False 49 | self.logger.info(f"Connect to OGN ({self.settings.APRS_SERVER_HOST}/{self._sock_peer_ip}:{port}) as {self.aprs_user} with filter: '{self.aprs_filter}'" if self.aprs_filter else 'none (full-feed)') 50 | break 51 | except (socket.error, ConnectionError) as e: 52 | self.logger.error(f'Connect error: {e}') 53 | if retries > 0: 54 | self.logger.info(f'Waiting {wait_period}s before next connection try ({retries} attempts left).') 55 | sleep(wait_period) 56 | else: 57 | self._kill = True 58 | self.logger.critical('Could not connect to OGN.') 59 | 60 | def disconnect(self): 61 | self.logger.info(f'Disconnect from {self._sock_peer_ip}') 62 | try: 63 | # close everything 64 | self.sock.shutdown(0) 65 | self.sock.close() 66 | except OSError: 67 | self.logger.error('Socket close error') 68 | 69 | self._kill = True 70 | 71 | def run(self, callback, timed_callback=lambda client: None, autoreconnect=False, ignore_decoding_error=True, 72 | **kwargs): 73 | while not self._kill: 74 | try: 75 | keepalive_time = time() 76 | while not self._kill: 77 | if time() - keepalive_time > self.settings.APRS_KEEPALIVE_TIME: 78 | self.logger.info(f'Send keepalive to {self._sock_peer_ip}') 79 | self.sock.send('#keepalive\n'.encode()) 80 | timed_callback(self) 81 | keepalive_time = time() 82 | 83 | # Read packet string from socket 84 | packet_b = self.sock_file.readline().strip() 85 | packet_str = packet_b.decode(errors="replace") if ignore_decoding_error else packet_b.decode() 86 | 87 | # A zero length line should not be return if keepalives are being sent 88 | # A zero length line will only be returned after ~30m if keepalives are not sent 89 | if len(packet_str) == 0: 90 | self.logger.warning('Read returns zero length string. Failure. Orderly closeout from {}'. 91 | format(self._sock_peer_ip)) 92 | break 93 | 94 | callback(packet_str, **kwargs) 95 | except (socket.error, ConnectionError) as e: 96 | self.logger.error(f'Connect error: {e}') 97 | except OSError: 98 | self.logger.error('OSError') 99 | except UnicodeDecodeError: 100 | self.logger.error('UnicodeDecodeError') 101 | self.logger.debug(packet_b) 102 | 103 | if autoreconnect and not self._kill: 104 | self.connect(retries=100) 105 | else: 106 | return 107 | 108 | 109 | class TelnetClient: 110 | def __init__(self, settings=settings): 111 | self.logger = logging.getLogger(__name__) 112 | self.logger.info("Connect to local telnet server") 113 | self.settings = settings 114 | 115 | def connect(self): 116 | self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 117 | self.sock.connect((self.settings.TELNET_SERVER_HOST, self.settings.TELNET_SERVER_PORT)) 118 | 119 | def run(self, callback, autoreconnect=False): 120 | while True: 121 | try: 122 | self.sock_file = self.sock.makefile(mode='rw', encoding='iso-8859-1') 123 | while True: 124 | packet_str = self.sock_file.readline().strip() 125 | callback(packet_str) 126 | 127 | except ConnectionRefusedError: 128 | self.logger.error('Telnet server not running', exc_info=True) 129 | 130 | if autoreconnect: 131 | sleep(1) 132 | self.connect() 133 | else: 134 | return 135 | 136 | def disconnect(self): 137 | self.logger.info('Disconnect') 138 | self.sock.shutdown(0) 139 | self.sock.close() 140 | -------------------------------------------------------------------------------- /ogn/client/settings.py: -------------------------------------------------------------------------------- 1 | import importlib.metadata 2 | 3 | APRS_SERVER_HOST = 'aprs.glidernet.org' 4 | APRS_SERVER_PORT_FULL_FEED = 10152 5 | APRS_SERVER_PORT_CLIENT_DEFINED_FILTERS = 14580 6 | 7 | APRS_APP_NAME = 'python-ogn-client' 8 | 9 | try: 10 | PACKAGE_VERSION = importlib.metadata.version('ogn-client') 11 | except importlib.metadata.PackageNotFoundError: 12 | PACKAGE_VERSION = '0.0.0' 13 | 14 | APRS_APP_VER = PACKAGE_VERSION[:3] 15 | 16 | APRS_KEEPALIVE_TIME = 240 17 | 18 | TELNET_SERVER_HOST = 'localhost' 19 | TELNET_SERVER_PORT = 50001 20 | -------------------------------------------------------------------------------- /ogn/ddb/__init__.py: -------------------------------------------------------------------------------- 1 | from ogn.ddb.utils import get_ddb_devices # noqa: F401 2 | -------------------------------------------------------------------------------- /ogn/ddb/utils.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | DDB_URL = "http://ddb.glidernet.org/download/?j=1" 4 | 5 | 6 | def get_ddb_devices(): 7 | r = requests.get(DDB_URL) 8 | for device in r.json()['devices']: 9 | device.update({'identified': device['identified'] == 'Y', 10 | 'tracked': device['tracked'] == 'Y'}) 11 | yield device 12 | -------------------------------------------------------------------------------- /ogn/parser/__init__.py: -------------------------------------------------------------------------------- 1 | from ogn.parser import parse as parse_module # noqa: F40 --- only for test functions. Without this a mock of parse would mock the function instead of the module 2 | from ogn.parser.parse import parse # noqa: F401 3 | from ogn.parser.exceptions import AprsParseError # noqa: F401 4 | -------------------------------------------------------------------------------- /ogn/parser/exceptions.py: -------------------------------------------------------------------------------- 1 | """ 2 | exception definitions 3 | """ 4 | 5 | 6 | class AprsParseError(Exception): 7 | """Parse error while parsing an aprs packet.""" 8 | def __init__(self, aprs_string): 9 | self.aprs_string = aprs_string 10 | 11 | self.message = f"This is not a valid APRS packet: {aprs_string}" 12 | -------------------------------------------------------------------------------- /ogn/parser/parse.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime, timezone 2 | 3 | from ogn.parser.utils import FPM_TO_MS, HPM_TO_DEGS, createTimestamp, KNOTS_TO_MS, KPH_TO_MS, FEETS_TO_METER, INCH_TO_MM, fahrenheit_to_celsius, CheapRuler, normalized_quality 4 | from ogn.parser.exceptions import AprsParseError 5 | 6 | from ogn_parser import parse as rust_parse 7 | 8 | positions = {} 9 | server_timestamp = None 10 | 11 | dstcall_beacontype_mapping = { 12 | 'OGCAPT': 'capturs', 13 | 'OGNFNT': 'fanet', 14 | 'OGFLR': 'flarm', 15 | 'OGFLR6': 'flarm', 16 | 'OGFLR7': 'flarm', 17 | 'OGFLYM': 'flymaster', 18 | 'OGNINRE': 'inreach', 19 | 'OGLT24': 'lt24', 20 | 'OGNMTK': 'microtrak', 21 | 'OGNAVI': 'naviter', 22 | 'OGNSDR': 'receiver', 23 | 'OGNSKY': 'safesky', 24 | 'OGPAW': 'pilot_aware', 25 | 'OGSKYL': 'skylines', 26 | 'OGSPID': 'spider', 27 | 'OGSPOT': 'spot', 28 | 'OGNTRK': 'tracker', 29 | } 30 | 31 | 32 | def parse(aprs_message, reference_timestamp=None, calculate_relations=False, use_server_timestamp=True): 33 | global server_timestamp 34 | 35 | if use_server_timestamp is True: 36 | reference_timestamp = server_timestamp or datetime.now(timezone.utc) 37 | elif reference_timestamp is None: 38 | reference_timestamp = datetime.now(timezone.utc) 39 | 40 | rust_messages = rust_parse(aprs_message) 41 | if rust_messages: 42 | rust_message = rust_messages[0] 43 | else: 44 | raise AprsParseError("Empty message") 45 | 46 | message = {'raw_message': aprs_message, 'reference_timestamp': reference_timestamp} 47 | if parser_error := rust_message.get('parser_error'): 48 | raise AprsParseError(f"Parser error: {parser_error}") 49 | elif aprs_packet := rust_message.get('aprs_packet'): 50 | message.update({ 51 | 'aprs_type': 'position', 52 | 'beacon_type': dstcall_beacontype_mapping.get(aprs_packet['to'], 'unknown'), 53 | 'name': aprs_packet['from'], 54 | 'dstcall': aprs_packet['to'], 55 | }) 56 | if via := aprs_packet.get('via'): 57 | message['receiver_name'] = via[-1] 58 | if aprs_packet['via'][0] != 'TCPIP*' and aprs_packet['via'][0].endswith('*'): message['relay'] = aprs_packet['via'][0][:-1] 59 | if position := aprs_packet.get('position'): 60 | message.update({ 61 | 'latitude': position['latitude'], 62 | 'longitude': position['longitude'], 63 | 'symboltable': position['symbol_table'], 64 | 'symbolcode': position['symbol_code'], 65 | }) 66 | if 'timestamp' in position: message['timestamp'] = createTimestamp(position['timestamp'], reference_timestamp) 67 | 68 | if 'wind_direction' in position: 69 | message['aprs_type'] = 'position_weather' 70 | if 'wind_direction' in position: message["wind_direction"] = position['wind_direction'] 71 | if 'wind_speed' in position: message["wind_speed"] = position['wind_speed'] * KNOTS_TO_MS / KPH_TO_MS 72 | if 'gust' in position: message['wind_speed_peak'] = position['gust'] * KNOTS_TO_MS / KPH_TO_MS 73 | if 'temperature' in position: message['temperature'] = fahrenheit_to_celsius(position['temperature']) 74 | if 'rainfall_1h' in position: message['rainfall_1h'] = position['rainfall_1h'] / 100.0 * INCH_TO_MM 75 | if 'rainfall_24h' in position: message['rainfall_24h'] = position['rainfall_24h'] / 100.0 * INCH_TO_MM 76 | if 'humidity' in position: message['humidity'] = 1. if position['humidity'] == 0 else position['humidity'] * 0.01 77 | if 'barometric_pressure' in position: message['barometric_pressure'] = position['barometric_pressure'] 78 | 79 | if 'course' in position: message["track"] = position['course'] 80 | if 'speed' in position: message["ground_speed"] = position['speed'] * KNOTS_TO_MS / KPH_TO_MS 81 | if 'altitude' in position: message["altitude"] = position['altitude'] * FEETS_TO_METER 82 | 83 | if 'reserved' in position: message['reserved'] = position['reserved'] 84 | if 'address_type' in position: message['address_type'] = position['address_type'] 85 | if 'aircraft_type' in position: message['aircraft_type'] = position['aircraft_type'] 86 | if 'is_notrack' in position: message['no-tracking'] = position['is_notrack'] 87 | if 'is_stealth' in position: message['stealth'] = position['is_stealth'] 88 | if 'address' in position: message['address'] = f"{position['address']:06X}" 89 | 90 | if 'climb_rate' in position: message["climb_rate"] = position['climb_rate'] * FPM_TO_MS 91 | if 'turn_rate' in position: message["turn_rate"] = float(position['turn_rate']) * HPM_TO_DEGS 92 | if 'signal_quality' in position: message["signal_quality"] = float(position['signal_quality']) 93 | if 'error' in position: message["error_count"] = position['error'] 94 | if 'frequency_offset' in position: message["frequency_offset"] = float(position['frequency_offset']) 95 | if 'gps_quality' in position: message["gps_quality"] = position['gps_quality'] 96 | if 'flight_level' in position: message["flightlevel"] = position['flight_level'] 97 | if 'signal_power' in position: message["signal_power"] = position['signal_power'] 98 | if 'software_version' in position: message["software_version"] = float(position['software_version']) 99 | if 'hardware_version' in position: message["hardware_version"] = position['hardware_version'] 100 | if 'original_address' in position: message["real_address"] = f"{position['original_address']:06X}" 101 | 102 | if 'unparsed' in position: message["user_comment"] = position['unparsed'] 103 | 104 | elif status := aprs_packet.get('status'): 105 | message['aprs_type'] = 'status' 106 | if 'timestamp' in status: message['timestamp'] = createTimestamp(status['timestamp'], reference_timestamp) 107 | 108 | if 'version' in status: message["version"] = status['version'] 109 | if 'platform' in status: message["platform"] = status['platform'] 110 | if 'cpu_load' in status: message["cpu_load"] = float(status['cpu_load']) 111 | if 'ram_free' in status: message["free_ram"] = float(status['ram_free']) 112 | if 'ram_total' in status: message["total_ram"] = float(status['ram_total']) 113 | if 'ntp_offset' in status: message["ntp_error"] = float(status['ntp_offset']) 114 | if 'ntp_correction' in status: message["rt_crystal_correction"] = float(status['ntp_correction']) 115 | if 'voltage' in status: message["voltage"] = float(status['voltage']) 116 | if 'amperage' in status: message["amperage"] = float(status['amperage']) 117 | if 'cpu_temperature' in status: message["cpu_temp"] = float(status['cpu_temperature']) 118 | if 'visible_senders' in status: message["senders_visible"] = status['visible_senders'] 119 | if 'latency' in status: message["latency"] = status['latency'] 120 | if 'senders' in status: message["senders_total"] = status['senders'] 121 | if 'rf_correction_manual' in status: message["rec_crystal_correction"] = status['rf_correction_manual'] 122 | if 'rf_correction_automatic' in status: message["rec_crystal_correction_fine"] = float(status['rf_correction_automatic']) 123 | if 'noise' in status: message["rec_input_noise"] = float(status['noise']) 124 | if 'senders_signal_quality' in status: message["senders_signal"] = float(status['senders_signal_quality']) 125 | if 'senders_messages' in status: message["senders_messages"] = status['senders_messages'] 126 | if 'good_senders_signal_quality' in status: message["good_senders_signal"] = float(status['good_senders_signal_quality']) 127 | if 'good_senders' in status: message["good_senders"] = status['good_senders'] 128 | if 'good_and_bad_senders' in status: message["good_and_bad_senders"] = status['good_and_bad_senders'] 129 | 130 | if 'unparsed' in status: message["user_comment"] = status['unparsed'] 131 | else: 132 | raise ValueError("Raised unreachable exception") 133 | elif server_comment := rust_message.get('server_comment'): 134 | message.update({ 135 | 'version': server_comment['version'], 136 | # 'timestamp': datetime.fromisoformat(server_comment['timestamp']), # only available in python 3.11+ 137 | 'timestamp': datetime.strptime(server_comment['timestamp'], "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=timezone.utc), 138 | 'server': server_comment['server'], 139 | 'ip_address': server_comment['ip_address'], 140 | 'port': server_comment['port'], 141 | 'aprs_type': 'server'}) 142 | elif comment := rust_message.get('comment'): 143 | message.update({ 144 | 'comment': comment['comment'], 145 | 'aprs_type': 'comment'}) 146 | else: 147 | raise ValueError("Raised unreachable exception") 148 | 149 | if message['aprs_type'].startswith('position') and calculate_relations is True: 150 | positions[message['name']] = (message['longitude'], message['latitude']) 151 | if message['receiver_name'] in positions: 152 | cheap_ruler = CheapRuler((message['latitude'] + positions[message['receiver_name']][1]) / 2.0) 153 | message['distance'] = cheap_ruler.distance((message['longitude'], message['latitude']), positions[message['receiver_name']]) 154 | message['bearing'] = cheap_ruler.bearing((message['longitude'], message['latitude']), positions[message['receiver_name']]) 155 | message['normalized_quality'] = normalized_quality(message['distance'], message['signal_quality']) if 'signal_quality' in message else None 156 | 157 | if message['aprs_type'] == 'server': 158 | server_timestamp = message['timestamp'] 159 | 160 | return message 161 | -------------------------------------------------------------------------------- /ogn/parser/pattern.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | 4 | PATTERN_TELNET_50001 = re.compile(r""" 5 | (?P\d\.\d+)sec:(?P\d+\.\d+)MHz:\s+ 6 | (?P\d):(?P\d):(?P
[A-F0-9]{6})\s 7 | (?P\d{6}):\s 8 | \[\s*(?P[+-]\d+\.\d+),\s*(?P[+-]\d+\.\d+)\]deg\s* 9 | (?P\d+)m\s* 10 | (?P[+-]\d+\.\d+)m/s\s* 11 | (?P\d+\.\d+)m/s\s* 12 | (?P\d+\.\d+)deg\s* 13 | (?P[+-]\d+\.\d+)deg/sec\s* 14 | (?P\d+)\s* 15 | (?P[0-9x]+)m\s* 16 | (?P\d+)(?P[f_])(?P[o_])\s* 17 | (?P[+-]\d+\.\d+)kHz\s* 18 | (?P\d+\.\d+)/(?P\d+\.\d+)dB/(?P\d+)\s+ 19 | (?P\d+)e\s* 20 | (?P\d+\.\d+)km\s* 21 | (?P\d+\.\d+)deg\s* 22 | (?P[+-]\d+\.\d+)deg\s* 23 | (?P\+)?\s* 24 | \?\s* 25 | R?\s* 26 | (B(?P\d+))? 27 | """, re.VERBOSE | re.MULTILINE) 28 | -------------------------------------------------------------------------------- /ogn/parser/telnet_parser.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime, timezone 2 | 3 | from ogn.parser.utils import createTimestamp 4 | from ogn.parser.pattern import PATTERN_TELNET_50001 5 | 6 | telnet_50001_pattern = PATTERN_TELNET_50001 7 | 8 | 9 | def parse(telnet_data): 10 | reference_timestamp = datetime.now(timezone.utc) 11 | 12 | match = telnet_50001_pattern.match(telnet_data) 13 | if match: 14 | return {'pps_offset': float(match.group('pps_offset')), 15 | 'frequency': float(match.group('frequency')), 16 | 'aircraft_type': int(match.group('aircraft_type')), 17 | 'address_type': int(match.group('address_type')), 18 | 'address': match.group('address'), 19 | 'timestamp': createTimestamp(match.group('timestamp') + 'h', reference_timestamp), 20 | 'latitude': float(match.group('latitude')), 21 | 'longitude': float(match.group('longitude')), 22 | 'altitude': int(match.group('altitude')), 23 | 'climb_rate': float(match.group('climb_rate')), 24 | 'ground_speed': float(match.group('ground_speed')), 25 | 'track': float(match.group('track')), 26 | 'turn_rate': float(match.group('turn_rate')), 27 | 'magic_number': int(match.group('magic_number')), 28 | 'gps_status': match.group('gps_status'), 29 | 'channel': int(match.group('channel')), 30 | 'flarm_timeslot': match.group('flarm_timeslot') == 'f', 31 | 'ogn_timeslot': match.group('ogn_timeslot') == 'o', 32 | 'frequency_offset': float(match.group('frequency_offset')), 33 | 'decode_quality': float(match.group('decode_quality')), 34 | 'signal_quality': float(match.group('signal_quality')), 35 | 'demodulator_type': int(match.group('demodulator_type')), 36 | 'error_count': float(match.group('error_count')), 37 | 'distance': float(match.group('distance')), 38 | 'bearing': float(match.group('bearing')), 39 | 'phi': float(match.group('phi')), 40 | 'multichannel': match.group('multichannel') == '+'} 41 | else: 42 | return None 43 | -------------------------------------------------------------------------------- /ogn/parser/utils.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime, timedelta, timezone 2 | import math 3 | 4 | FEETS_TO_METER = 0.3048 # ratio feets to meter 5 | FPM_TO_MS = FEETS_TO_METER / 60 # ratio fpm to m/s 6 | KNOTS_TO_MS = 0.5144 # ratio knots to m/s 7 | KPH_TO_MS = 0.27778 # ratio kph to m/s 8 | HPM_TO_DEGS = 180 / 60 # ratio between half turn per minute and degrees/s 9 | INCH_TO_MM = 25.4 # ratio inch to mm 10 | 11 | 12 | def fahrenheit_to_celsius(fahrenheit): 13 | return (fahrenheit - 32.0) * 5.0 / 9.0 14 | 15 | 16 | def parseAngle(dddmmhht): 17 | return float(dddmmhht[:3]) + float(dddmmhht[3:]) / 60 18 | 19 | 20 | def createTimestamp(time_string, reference_timestamp): 21 | if time_string[-1] == "z": 22 | dd = int(time_string[0:2]) 23 | hh = int(time_string[2:4]) 24 | mm = int(time_string[4:6]) 25 | 26 | result = datetime(reference_timestamp.year, 27 | reference_timestamp.month, 28 | dd, 29 | hh, mm, 0, 30 | tzinfo=timezone.utc if reference_timestamp.tzinfo is not None else None) 31 | 32 | # correct wrong month 33 | if result > reference_timestamp + timedelta(days=14): 34 | result = (result.replace(day=1) - timedelta(days=14)).replace(day=result.day) 35 | elif result < reference_timestamp - timedelta(days=14): 36 | result = (result.replace(day=28) + timedelta(days=14)).replace(day=result.day) 37 | else: 38 | hh = int(time_string[0:2]) 39 | mm = int(time_string[2:4]) 40 | ss = int(time_string[4:6]) 41 | 42 | result = datetime(reference_timestamp.year, 43 | reference_timestamp.month, 44 | reference_timestamp.day, 45 | hh, mm, ss, 46 | tzinfo=timezone.utc if reference_timestamp.tzinfo is not None else None) 47 | 48 | if result > reference_timestamp + timedelta(hours=12): 49 | # shift timestamp to previous day 50 | result -= timedelta(days=1) 51 | elif result < reference_timestamp - timedelta(hours=12): 52 | # shift timestamp to next day 53 | result += timedelta(days=1) 54 | 55 | return result 56 | 57 | 58 | MATH_PI = 3.14159265359 59 | 60 | 61 | class CheapRuler(): 62 | """Extreme fast distance calculating for distances below 500km.""" 63 | 64 | def __init__(self, lat): 65 | c = math.cos(lat * MATH_PI / 180) 66 | c2 = 2 * c * c - 1 67 | c3 = 2 * c * c2 - c 68 | c4 = 2 * c * c3 - c2 69 | c5 = 2 * c * c4 - c3 70 | 71 | self.kx = 1000 * (111.41513 * c - 0.09455 * c3 + 0.00012 * c5) # longitude correction 72 | self.ky = 1000 * (111.13209 - 0.56605 * c2 + 0.0012 * c4) # latitude correction 73 | 74 | def distance(self, a, b): 75 | """Distance between point a and b. A point is a tuple(lon,lat).""" 76 | 77 | dx = (a[0] - b[0]) * self.kx 78 | dy = (a[1] - b[1]) * self.ky 79 | return math.sqrt(dx * dx + dy * dy) 80 | 81 | def bearing(self, a, b): 82 | """Returns the bearing from point a to point b.""" 83 | 84 | dx = (b[0] - a[0]) * self.kx 85 | dy = (b[1] - a[1]) * self.ky 86 | if dx == 0 and dy == 0: 87 | return 0 88 | result = math.atan2(-dy, dx) * 180 / MATH_PI + 90 89 | return result if result >= 0 else result + 360 90 | 91 | 92 | def normalized_quality(distance, signal_quality): 93 | """Signal quality normalized to 10km.""" 94 | 95 | return signal_quality + 20.0 * math.log10(distance / 10000.0) if distance > 0 else None 96 | -------------------------------------------------------------------------------- /parser_v2_migration.md: -------------------------------------------------------------------------------- 1 | # About this document 2 | With version 2, the regex-based parser core has been replaced by a new Rust-based parser. 3 | This document outlines the background and the resulting changes. 4 | 5 | # Background 6 | This parser, which was originally implemented entirely in native Python, has existed since 2016. 7 | Over time, several issues have emerged: 8 | 1. Although the APRS format is extensively documented, compliance with the format is not enforced (e.g., it's possible to use illegal APRS callsigns like "D-1234" or invalid positions such as |lat| > 90 or |lon| > 180). 9 | 2. The APRS comment field, used by OGN for additional information (signal strength, software version, CPU load, etc.), is not standardized. In practice, new fields are added or changed sporadically—typically without prior discussion. 10 | 3. Similarly, new `dst_call`s are occasionally introduced, again usually without prior discussion. This means the parser must be retroactively adjusted to accommodate them. 11 | 4. To maximize performance, the original parser used (precompiled) regular expressions. Since the regex used depended on the `dst_call`, the number of regexes was substantial. Additionally, regex patterns are not very intuitive to read. 12 | 5. Even with regex optimization, the parser’s throughput was limited to around 100,000 beacons per minute on a Raspberry Pi. On thermally active days, this rate can be significantly exceeded, making improved performance desirable. 13 | 14 | # Solution 15 | To solve the above-mentioned problems, the parser was completely rewritten. For performance reasons, the Rust language was used: 16 | [ogn-parser-rs](https://github.com/Meisterschueler/ogn-parser-rs). 17 | Python bindings were created using [Maturin](https://github.com/PyO3/maturin) and [pythonize](https://github.com/davidhewitt/pythonize). 18 | These bindings are compiled for all major architectures: 19 | 20 | - Linux (x86_64, x86, aarch64, armv7, s390x, ppc64le) 21 | - musllinux (x86_64, x86, aarch64, armv7) 22 | - Windows (x64, x86) 23 | - macOS (x86_64, aarch64) 24 | 25 | They are published on PyPI and can be installed using `pip install ogn_parser`. 26 | Within Rust, the parser is over 11x faster than the regex-based approach. 27 | In Python, it is still 3.5x faster than the regex parser. To keep differences between the regex parser and the Rust parser minimal, some calculations (e.g., true timestamp calculation and computation of distance and bearing to the receiver) are still performed in Python. 28 | This reduces the performance advantage to 2x. In the future, these calculations can also be moved to Rust to fully realize the potential 3.5x speedup. 29 | 30 | # Consequences 31 | Since all beacons are now parsed by a single parser that no longer considers `dst_call`, the results may differ from the previous parser. 32 | 33 | ## Fundamental differences 34 | 1. APRS comments from positions and statuses are split into words (separated by spaces). Unparsable parts of the comment are joined (with spaces) and assigned to the attribute user_comment. 35 | 2. The raw APRS comment is no longer returned. 36 | 3. The SSID in an APRS callsign must conform to APRS standards, i.e., it must be numeric. 37 | 4. Elements with an empty string ("") or None are not returned. 38 | 39 | ## Beacon-specific differences 40 | The differences between the Rust parser and the old parser are analyzed using the example beacons stored at [ogn-aprs-protocol](https://github.com/glidernet/ogn-aprs-protocol). 41 | For each example, a sample beacon is provided along with the differing parser results. 42 | “dropped” and “added” refer to attributes that were only found by the Python or Rust parser, respectively. 43 | 44 | ### APRS 45 | (The `dst_call` "APRS" is outdated and is therefore not considered.) 46 | 47 | ### OGNCAPT and OGNINRE 48 | These messages are ignored 49 | 50 | ### FXCAPP 51 | ``` 52 | FXC201699>FXCAPP,qAS,FLYXC:/114100h3236.19S/01903.01Eg312/017/A=003474 !W05! id1E201699 53 | dropped: [] 54 | added: 55 | - address: 201699 56 | - address_type: 2 57 | - stealth: False 58 | - aircraft_type: 7 59 | - no-tracking: False 60 | ``` 61 | 62 | ### OGADSB 63 | ``` 64 | ICA34364F>OGADSB,qAS,LEMDadsb:/140827h4038.69N\00344.37W^235/248/A=010350 id2534364F +1792fpm fnANE06BK 65 | dropped: [] 66 | added: 67 | - climb_rate: 9.10336 68 | - address: 34364F 69 | - address_type: 1 70 | - stealth: False 71 | - aircraft_type: 9 72 | - no-tracking: False 73 | - user_comment: fnANE06BK 74 | ``` 75 | 76 | ``` 77 | ICA4CA4EB>OGADSB,qAS,LEMDadsb:/142346h4034.03N\00315.64W^008/370/A=038000 id254CA4EB +000fpm 0.0rot fnRYR4057 regEI-DPG modelB738 78 | dropped: [] 79 | added: 80 | - climb_rate: 0.0 81 | - turn_rate: 0.0 82 | - address: 4CA4EB 83 | - address_type: 1 84 | - stealth: False 85 | - aircraft_type: 9 86 | - no-tracking: False 87 | - user_comment: fnRYR4057 regEI-DPG modelB738 88 | ``` 89 | 90 | ``` 91 | ICAA4FFC0>OGADSB,qAS,ADSBExch:/151612h4002.40N/10513.83W'000/001/A=005275 !W00! id05A4FFC0 +0fpm +0.0rot 0.0dB 0e +0.0kHz gps2x3 92 | dropped: [] 93 | added: 94 | - climb_rate: 0.0 95 | - frequency_offset: 0.0 96 | - turn_rate: 0.0 97 | - signal_quality: 0.0 98 | - address: A4FFC0 99 | - error_count: 0 100 | - address_type: 1 101 | - stealth: False 102 | - aircraft_type: 1 103 | - no-tracking: False 104 | - gps_quality: 2x3 105 | ``` 106 | 107 | ### OGADSL 108 | ``` 109 | OGN631C45>OGADSL,qAS,OxfBarton:/104536h5145.96N/00111.47W'267/000/A=000312 !W25! id07631C45 -177fpm 22.8dB +2.5kHz gps63x63 110 | dropped: [] 111 | added: 112 | - climb_rate: -0.8991600000000001 113 | - frequency_offset: 2.5 114 | - signal_quality: 22.799999237060547 115 | - address: 631C45 116 | - address_type: 3 117 | - stealth: False 118 | - aircraft_type: 1 119 | - no-tracking: False 120 | - gps_quality: 63x63 121 | ``` 122 | 123 | ### OGAIRM 124 | ``` 125 | AIRF00108>OGAIRM,qAS,Airmate:/151551h4326.16N\00637.42E^245/186/A=002555 !W18! idf00108 +198 126 | dropped: [] 127 | added: 128 | - user_comment: idf00108 +198 129 | ``` 130 | 131 | ### OGAPIK 132 | ``` 133 | FLRDDA396>OGAPIK,qAS,APIK:/113700h4520.00N/00510.00E'000/050/A=000472 !W37! id07DDA396 euiecdb86fffe00001b 134 | dropped: [] 135 | added: 136 | - address: DDA396 137 | - address_type: 3 138 | - stealth: False 139 | - aircraft_type: 1 140 | - no-tracking: False 141 | - user_comment: euiecdb86fffe00001b 142 | ``` 143 | 144 | ### OGEVARIO 145 | ``` 146 | OGN06A4D0>OGEVARIO,qAS,EVARIO:/054700h4223.23N/00902.69E'251/005/A=001130 !W34! id1F06A4D0 +000fpm +0rot gps8x3 147 | dropped: [] 148 | added: 149 | - climb_rate: 0.0 150 | - turn_rate: 0.0 151 | - address: 06A4D0 152 | - address_type: 3 153 | - stealth: False 154 | - aircraft_type: 7 155 | - no-tracking: False 156 | - gps_quality: 8x3 157 | ``` 158 | 159 | ### OGLT24 160 | ``` 161 | FLRDDE48A>OGLT24,qAS,LT24:/102606h4030.47N/00338.38W'000/018/A=002267 id25387 +000fpm GPS 162 | dropped: 163 | - source: GPS 164 | - lt24_id: 25387 165 | added: 166 | - user_comment: id25387 GPS 167 | ``` 168 | 169 | ### OGNAVI 170 | ``` 171 | NAV042121>OGNAVI,qAS,NAVITER:/140648h4550.36N/01314.85E'090/152/A=001086 !W47! id0440042121 +000fpm +0.5rot 172 | dropped: 173 | - do_not_track: False 174 | added: 175 | - no-tracking: False 176 | ``` 177 | 178 | ### OGNTRK 179 | ``` 180 | OGN8E20F0>OGNTRK,LEMD,OGNDELAY*,qAS,DLY2APRS:/114801h4030.23N/00341.96W'079/000/A=002450 !W44! id068E20F0 +000fpm +1.1rot 56.9dB 0e +3.1kHz gps3x5 31dly 181 | dropped: [] 182 | added: 183 | - no-tracking: False 184 | - user_comment: 31dly 185 | ``` 186 | 187 | ### OGNDVS 188 | ``` 189 | LEZS>OGNDVS,TCPIP*,qAC,GLIDERN2:>161501h 1:0 2.563s/1ms 74dB/+9kHz 090/5/6kt 51.6F 86.9% 0.0mm/h 190 | dropped: [] 191 | added: 192 | - user_comment: 1:0 2.563s/1ms 74dB/+9kHz 090/5/6kt 51.6F 86.9% 0.0mm/h 193 | ``` 194 | 195 | ### OGNEMO 196 | ``` 197 | CZBA2>OGNEMO,TCPIP*,qAC,NEMO:/094148h4326.64NI07951.12W&/A=000602 v2.00 nemobridge - Superlinxs 9dBi omni 198 | dropped: 199 | - relay: TCPIP 200 | added: 201 | - user_comment: v2.00 nemobridge - Superlinxs 9dBi omni 202 | ``` 203 | 204 | ``` 205 | CZBA4>OGNEMO,TCPIP*,qAC,NEMO:/094148h4326.58NI07950.86W&/A=000602 v2.00 nemobridge - Omni 0dBi + 23dB AMP 206 | dropped: 207 | - relay: TCPIP 208 | added: 209 | - user_comment: v2.00 nemobridge - Omni 0dBi + AMP 210 | - signal_quality: 23.0 211 | ``` 212 | 213 | ### OGNFNO 214 | ``` 215 | FNO0003F4>OGNFNO,qAS,Neurone:/171603h4338.04N/00510.74E'316/000/A=000623 !W28! id200003F4 +000fpm +0.0rot 216 | dropped: [] 217 | added: 218 | - climb_rate: 0.0 219 | - turn_rate: 0.0 220 | - address: 0003F4 221 | - address_type: 0 222 | - stealth: False 223 | - aircraft_type: 8 224 | - no-tracking: False 225 | ``` 226 | 227 | ### OGNFNT 228 | ``` 229 | FNT1103CE>OGNFNT,qAS,FNB1103CE:/183727h5057.94N/00801.00Eg355/002/A=001042 !W10! id1E1103CE +03fpm 230 | dropped: [] 231 | added: 232 | - no-tracking: False 233 | ``` 234 | 235 | ``` 236 | FNB1103CE>OGNFNT,TCPIP*,qAC,GLIDERN3:/183738h5057.95NI00801.00E&/A=001042 237 | dropped: 238 | - relay: TCPIP 239 | added: [] 240 | ``` 241 | 242 | ``` 243 | FNT1118C1>OGNFNT,qAS,BelaVista:/191919h3841.98N\00919.39Wn !W68! id3E1118C1 FNT71 26.3dB -12.4kHz 244 | dropped: [] 245 | added: 246 | - frequency_offset: -12.399999618530273 247 | - signal_quality: 26.299999237060547 248 | - no-tracking: False 249 | - user_comment: !W68! FNT71 250 | ``` 251 | 252 | ``` 253 | FNT1118C1>OGNFNT,qAS,BelaVista:>191924h Name="FlrmAIC" 26.0dB -12.1kHz 254 | dropped: 255 | - frequency_offset: -12.1 256 | - fanet_name: FlrmAIC 257 | - signal_quality: 26.0 258 | added: 259 | - user_comment: Name="FlrmAIC" 26.0dB -12.1kHz 260 | ``` 261 | 262 | ``` 263 | FNT0828B8>OGNFNT,qAS,Huenenb2:/210414h4710.43N/00826.96E_152/001g002t057r000p000h48b10227 0.0dB 264 | dropped: [] 265 | added: 266 | - beacon_type: fanet 267 | - signal_quality: 0.0 268 | ``` 269 | 270 | ### OGNMTK 271 | ``` 272 | MTK39447C>OGNMTK,qAS,Microtrak:/170054h4909.81N/00218.71E'136/000/A=000209 !W15! id2339447C rssi-111 snr-5 sf10 gw1 abw0108000B36 gps16 273 | dropped: [] 274 | added: 275 | - user_comment: rssi-111 snr-5 sf10 gw1 abw0108000B36 gps16 276 | ``` 277 | 278 | ### OGNMYC 279 | ``` 280 | MYC78FF44>OGNMYC:>140735h Pilot=RichardHunt 281 | dropped: [] 282 | added: 283 | - user_comment: Pilot=RichardHunt 284 | ``` 285 | 286 | ``` 287 | MYC78FF44>OGNMYC:/140814h5205.34N/00207.12W'000/000/A=000095 id1B78FF44 288 | dropped: [] 289 | added: 290 | - address: 78FF44 291 | - address_type: 3 292 | - stealth: False 293 | - aircraft_type: 6 294 | - no-tracking: False 295 | ``` 296 | 297 | ### OGNSDR 298 | ``` 299 | LILH>OGNSDR,TCPIP*,qAC,GLIDERN2:/132201h4457.61NI00900.58E&/A=000423 300 | dropped: 301 | - relay: TCPIP 302 | added: [] 303 | ``` 304 | 305 | ``` 306 | SCVH>OGNSDR,TCPIP*,qAC,GLIDERN4:>153734h v0.2.8.RPI-GPU CPU:0.3 RAM:744.5/968.2MB NTP:3.6ms/+2.0ppm +68.2C 3/3Acfts[1h] Lat:1.6s RF:-8+67.8ppm/+10.33dB/+1.3dB@10km[30998]/+10.4dB@10km[3/5] 307 | dropped: [] 308 | added: 309 | - rec_crystal_correction_fine: 67.80000305175781 310 | - good_senders: 3 311 | - latency: 1.600000023841858 312 | - rec_input_noise: 10.329999923706055 313 | - rec_crystal_correction: -8 314 | - senders_signal: 1.2999999523162842 315 | - good_senders_signal: 10.399999618530273 316 | - good_and_bad_senders: 5 317 | - senders_messages: 30998 318 | ``` 319 | 320 | ### OGNSXR 321 | ``` 322 | K2B9>OGNSXR,TCPIP*,qAC,GLIDERN0:/000627h4353.05NI07215.22W&/A=000692 323 | dropped: 324 | - relay: TCPIP 325 | added: [] 326 | ``` 327 | 328 | ``` 329 | K2B9>OGNSXR,TCPIP*,qAC,GLIDERN0:>152545h vMB101-ESP32-OGNbase 3.7V 0/min 0/0Acfts[1h] 10sat time_synched 0_m_r_uptime 330 | dropped: [] 331 | added: 332 | - senders_total: 0 333 | - senders_visible: 0 334 | - voltage: 3.700000047683716 335 | - user_comment: vMB101-ESP32-OGNbase 0/min 10sat time_synched 0_m_r_uptime 336 | ``` 337 | 338 | ``` 339 | K2B9>OGNSXR,TCPIP*,qAC,GLIDERN0:>194557h vMB101-ESP32-OGNbase 3.8V 9sat time_synched 1155_m_r_sleep 340 | dropped: [] 341 | added: 342 | - voltage: 3.799999952316284 343 | - user_comment: vMB101-ESP32-OGNbase 9sat time_synched 1155_m_r_sleep 344 | ``` 345 | 346 | ``` 347 | K2B9>OGNSXR,TCPIP*,qAC,GLIDERN0:>195343h vMB101-ESP32-OGNbase time_not_synched 269_m_uptime 348 | dropped: [] 349 | added: 350 | - user_comment: vMB101-ESP32-OGNbase time_not_synched 269_m_uptime 351 | ``` 352 | 353 | ### OGNTRK 354 | ``` 355 | OGN3FC859>OGNTRK,qAS,LZHL:>093215h h00 v00 9sat/1 164m 1002.6hPa +20.2degC 0% 3.34V 14/-110.5dBm 1/min 356 | dropped: 357 | - temperature: 20.2 358 | - hardware_version: 0 359 | - software_version: 0 360 | - pressure: 1002.6 361 | - relays: 1 362 | - humidity: 0 363 | - gps_altitude: 164 364 | - noise_level: -110.5 365 | - gps_quality: 1 366 | - gps_satellites: 9 367 | - transmitter_power: 14 368 | added: 369 | - user_comment: h00 v00 9sat/1 164m 1002.6hPa +20.2degC 0% 14/-110.5dBm 1/min 370 | ``` 371 | 372 | ``` 373 | OGN2FD00F>OGNTRK,qAS,LZHL:/093213h4848.78N/01708.32E'000/000/A=000538 !W12! id072FD00F -058fpm +0.0rot FL003.12 32.8dB 0e -0.8kHz gps3x5 374 | dropped: [] 375 | added: 376 | - no-tracking: False 377 | ``` 378 | 379 | ``` 380 | FLRDD9C70>OGNTRK,OGN2FD00F*,qAS,LZHL:/093021h4848.77N/01708.33E'000/000/A=000518 !W66! id06DD9C70 -019fpm +0.0rot 29.0dB 0e -0.8kHz gps2x3 s6.09 h03 381 | dropped: [] 382 | added: 383 | - software_version: 6.090000152587891 384 | - no-tracking: False 385 | - hardware_version: 3 386 | ``` 387 | 388 | ### OGNTTN 389 | ``` 390 | OGN60E6A0>OGNTTN,qAS,TTN2OGN:/181002h4030.24N/00341.95W'235/003/A=002343 !W27! id0760E6A0 +000fpm -12.4rot FL020.64 gps3x5 7.2dB 391 | dropped: [] 392 | added: 393 | - climb_rate: 0.0 394 | - turn_rate: -37.19999885559082 395 | - flightlevel: 20.639999389648438 396 | - signal_quality: 7.199999809265137 397 | - address: 60E6A0 398 | - address_type: 3 399 | - stealth: False 400 | - aircraft_type: 1 401 | - no-tracking: False 402 | - gps_quality: 3x5 403 | ``` 404 | 405 | ``` 406 | OGN8E20F0>OGNTTN,RELAY*,qAS,TTN2OGN:/172403h4030.24N/00341.94W'182/002/A=002441 !W66! id078E20F0 -039fpm +8.4rot FL023.17 gps4x7 7.5dB 407 | dropped: [] 408 | added: 409 | - climb_rate: -0.19812000000000002 410 | - turn_rate: 25.19999885559082 411 | - flightlevel: 23.170000076293945 412 | - signal_quality: 7.5 413 | - address: 8E20F0 414 | - stealth: False 415 | - address_type: 3 416 | - aircraft_type: 1 417 | - no-tracking: False 418 | - gps_quality: 4x7 419 | ``` 420 | 421 | ``` 422 | OGN60E6A0>OGNTTN,qAS,TTN2OGN:>172606h SN=OGN60E6A0 9.5dB 423 | dropped: [] 424 | added: 425 | - user_comment: SN=OGN60E6A0 9.5dB 426 | ``` 427 | 428 | ``` 429 | OGN60E6A0>OGNTTN,qAS,TTN2OGN:>173011h h02 v01 8sat/1/22dB 724m 932.3hPa +31.8degC +18.8% +4.28V 14/-99.5dBm 63/min 6.8dB 430 | dropped: [] 431 | added: 432 | - voltage: 4.28000020980835 433 | - user_comment: h02 v01 8sat/1/22dB 724m 932.3hPa +31.8degC +18.8% 14/-99.5dBm 63/min 6.8dB 434 | ``` 435 | 436 | ### OGNTTN3 437 | ``` 438 | OGNC3088C>OGTTN3,qAS,TTN3OGN:/180751h4030.23N/00341.98W'115/003/A=002218 !W61! id07C3088C +000fpm -7.2rot FL024.48 gps9x14 9.5dB 439 | dropped: [] 440 | added: 441 | - climb_rate: 0.0 442 | - turn_rate: -21.59999942779541 443 | - flightlevel: 24.479999542236328 444 | - signal_quality: 9.5 445 | - address: C3088C 446 | - address_type: 3 447 | - stealth: False 448 | - aircraft_type: 1 449 | - no-tracking: False 450 | - gps_quality: 9x14 451 | ``` 452 | 453 | ``` 454 | OGN60E6A0>OGTTN3,qAS,TTN3OGN:>180757h Class=OPEN Base=LELT PilotID=12345 9.2dB 455 | dropped: [] 456 | added: 457 | - user_comment: Class=OPEN Base=LELT PilotID=12345 9.2dB 458 | ``` 459 | 460 | ``` 461 | OGNC30824>OGTTN3,RELAY*,qAS,TTN3OGN:/181005h4030.24N/00341.94W'218/000/A=002353 !W56! id07C30824 +000fpm +8.6rot FL024.45 gps3x5 8.2dB 462 | dropped: [] 463 | added: 464 | - climb_rate: 0.0 465 | - turn_rate: 25.80000114440918 466 | - flightlevel: 24.450000762939453 467 | - signal_quality: 8.199999809265137 468 | - address: C30824 469 | - stealth: False 470 | - address_type: 3 471 | - aircraft_type: 1 472 | - no-tracking: False 473 | - gps_quality: 3x5 474 | ``` 475 | 476 | ### OGNWMN 477 | ``` 478 | N0ABC7>OGNWMN,qAS,WMN:/134300h4923.60N/01535.54E'000/000/A=001624 id07N0ABC7A39971 479 | dropped: [] 480 | added: 481 | - user_comment: id07N0ABC7A39971 482 | ``` 483 | 484 | ### OGPAW 485 | ``` 486 | ICA404EC3>OGPAW,qAS,UKWOG:/104337h5211.24N\00032.65W^124/081/A=004026 !W62! id21404EC3 12.5dB +2.2kHz 487 | dropped: [] 488 | added: 489 | - frequency_offset: 2.200000047683716 490 | - signal_quality: 12.5 491 | - address: 404EC3 492 | - address_type: 1 493 | - stealth: False 494 | - aircraft_type: 8 495 | - no-tracking: False 496 | ``` 497 | 498 | ``` 499 | ICA404EC3>OGPAW,qAS,UKWOG:/104341h5211.18N\00032.53W^131/081/A=004010 !W85! id21404EC3 9.2dB +2.2kHz +10.0dBm 500 | dropped: [] 501 | added: 502 | - frequency_offset: 2.200000047683716 503 | - signal_power: 10.0 504 | - signal_quality: 9.199999809265137 505 | - address: 404EC3 506 | - address_type: 1 507 | - stealth: False 508 | - aircraft_type: 8 509 | - no-tracking: False 510 | ``` 511 | 512 | ### OGSKYL 513 | ``` 514 | FLRDDDD78>OGSKYL,qAS,SKYLINES:/134403h4225.90N/00144.83E'000/000/A=008438 id2816 +000fpm 515 | dropped: 516 | - skylines_id: 2816 517 | added: 518 | - user_comment: id2816 519 | ``` 520 | 521 | ### OGSPID 522 | ``` 523 | FLRDDF944>OGSPID,qAS,SPIDER:/190930h3322.78S/07034.60W'000/000/A=002263 id300234010617040 +19dB LWE 3D 524 | dropped: 525 | - signal_power: 19 526 | - spider_id: 300234010617040 527 | - spider_registration: LWE 528 | - gps_quality: 3D 529 | added: 530 | - signal_quality: 19.0 531 | - user_comment: id300234010617040 LWE 3D 532 | ``` 533 | 534 | ### OGSPOT 535 | ``` 536 | ICA3E7540>OGSPOT,qAS,SPOT:/161427h1448.35S/04610.86W'000/000/A=008677 id0-2860357 SPOT3 GOOD 537 | dropped: 538 | - status: GOOD 539 | - model: SPOT3 540 | - spot_id: 0-2860357 541 | added: 542 | - user_comment: id0-2860357 SPOT3 GOOD 543 | ``` 544 | -------------------------------------------------------------------------------- /poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 2.1.2 and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "certifi" 5 | version = "2025.4.26" 6 | description = "Python package for providing Mozilla's CA Bundle." 7 | optional = false 8 | python-versions = ">=3.6" 9 | groups = ["main"] 10 | files = [ 11 | {file = "certifi-2025.4.26-py3-none-any.whl", hash = "sha256:30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3"}, 12 | {file = "certifi-2025.4.26.tar.gz", hash = "sha256:0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6"}, 13 | ] 14 | 15 | [[package]] 16 | name = "charset-normalizer" 17 | version = "3.4.2" 18 | description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." 19 | optional = false 20 | python-versions = ">=3.7" 21 | groups = ["main"] 22 | files = [ 23 | {file = "charset_normalizer-3.4.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c48ed483eb946e6c04ccbe02c6b4d1d48e51944b6db70f697e089c193404941"}, 24 | {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2d318c11350e10662026ad0eb71bb51c7812fc8590825304ae0bdd4ac283acd"}, 25 | {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9cbfacf36cb0ec2897ce0ebc5d08ca44213af24265bd56eca54bee7923c48fd6"}, 26 | {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18dd2e350387c87dabe711b86f83c9c78af772c748904d372ade190b5c7c9d4d"}, 27 | {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8075c35cd58273fee266c58c0c9b670947c19df5fb98e7b66710e04ad4e9ff86"}, 28 | {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5bf4545e3b962767e5c06fe1738f951f77d27967cb2caa64c28be7c4563e162c"}, 29 | {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:7a6ab32f7210554a96cd9e33abe3ddd86732beeafc7a28e9955cdf22ffadbab0"}, 30 | {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:b33de11b92e9f75a2b545d6e9b6f37e398d86c3e9e9653c4864eb7e89c5773ef"}, 31 | {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8755483f3c00d6c9a77f490c17e6ab0c8729e39e6390328e42521ef175380ae6"}, 32 | {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:68a328e5f55ec37c57f19ebb1fdc56a248db2e3e9ad769919a58672958e8f366"}, 33 | {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:21b2899062867b0e1fde9b724f8aecb1af14f2778d69aacd1a5a1853a597a5db"}, 34 | {file = "charset_normalizer-3.4.2-cp310-cp310-win32.whl", hash = "sha256:e8082b26888e2f8b36a042a58307d5b917ef2b1cacab921ad3323ef91901c71a"}, 35 | {file = "charset_normalizer-3.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:f69a27e45c43520f5487f27627059b64aaf160415589230992cec34c5e18a509"}, 36 | {file = "charset_normalizer-3.4.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:be1e352acbe3c78727a16a455126d9ff83ea2dfdcbc83148d2982305a04714c2"}, 37 | {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa88ca0b1932e93f2d961bf3addbb2db902198dca337d88c89e1559e066e7645"}, 38 | {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d524ba3f1581b35c03cb42beebab4a13e6cdad7b36246bd22541fa585a56cccd"}, 39 | {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28a1005facc94196e1fb3e82a3d442a9d9110b8434fc1ded7a24a2983c9888d8"}, 40 | {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fdb20a30fe1175ecabed17cbf7812f7b804b8a315a25f24678bcdf120a90077f"}, 41 | {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0f5d9ed7f254402c9e7d35d2f5972c9bbea9040e99cd2861bd77dc68263277c7"}, 42 | {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:efd387a49825780ff861998cd959767800d54f8308936b21025326de4b5a42b9"}, 43 | {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:f0aa37f3c979cf2546b73e8222bbfa3dc07a641585340179d768068e3455e544"}, 44 | {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e70e990b2137b29dc5564715de1e12701815dacc1d056308e2b17e9095372a82"}, 45 | {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:0c8c57f84ccfc871a48a47321cfa49ae1df56cd1d965a09abe84066f6853b9c0"}, 46 | {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6b66f92b17849b85cad91259efc341dce9c1af48e2173bf38a85c6329f1033e5"}, 47 | {file = "charset_normalizer-3.4.2-cp311-cp311-win32.whl", hash = "sha256:daac4765328a919a805fa5e2720f3e94767abd632ae410a9062dff5412bae65a"}, 48 | {file = "charset_normalizer-3.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:e53efc7c7cee4c1e70661e2e112ca46a575f90ed9ae3fef200f2a25e954f4b28"}, 49 | {file = "charset_normalizer-3.4.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0c29de6a1a95f24b9a1aa7aefd27d2487263f00dfd55a77719b530788f75cff7"}, 50 | {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cddf7bd982eaa998934a91f69d182aec997c6c468898efe6679af88283b498d3"}, 51 | {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcbe676a55d7445b22c10967bceaaf0ee69407fbe0ece4d032b6eb8d4565982a"}, 52 | {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d41c4d287cfc69060fa91cae9683eacffad989f1a10811995fa309df656ec214"}, 53 | {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e594135de17ab3866138f496755f302b72157d115086d100c3f19370839dd3a"}, 54 | {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf713fe9a71ef6fd5adf7a79670135081cd4431c2943864757f0fa3a65b1fafd"}, 55 | {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a370b3e078e418187da8c3674eddb9d983ec09445c99a3a263c2011993522981"}, 56 | {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a955b438e62efdf7e0b7b52a64dc5c3396e2634baa62471768a64bc2adb73d5c"}, 57 | {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:7222ffd5e4de8e57e03ce2cef95a4c43c98fcb72ad86909abdfc2c17d227fc1b"}, 58 | {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:bee093bf902e1d8fc0ac143c88902c3dfc8941f7ea1d6a8dd2bcb786d33db03d"}, 59 | {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dedb8adb91d11846ee08bec4c8236c8549ac721c245678282dcb06b221aab59f"}, 60 | {file = "charset_normalizer-3.4.2-cp312-cp312-win32.whl", hash = "sha256:db4c7bf0e07fc3b7d89ac2a5880a6a8062056801b83ff56d8464b70f65482b6c"}, 61 | {file = "charset_normalizer-3.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:5a9979887252a82fefd3d3ed2a8e3b937a7a809f65dcb1e068b090e165bbe99e"}, 62 | {file = "charset_normalizer-3.4.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:926ca93accd5d36ccdabd803392ddc3e03e6d4cd1cf17deff3b989ab8e9dbcf0"}, 63 | {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eba9904b0f38a143592d9fc0e19e2df0fa2e41c3c3745554761c5f6447eedabf"}, 64 | {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3fddb7e2c84ac87ac3a947cb4e66d143ca5863ef48e4a5ecb83bd48619e4634e"}, 65 | {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98f862da73774290f251b9df8d11161b6cf25b599a66baf087c1ffe340e9bfd1"}, 66 | {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c9379d65defcab82d07b2a9dfbfc2e95bc8fe0ebb1b176a3190230a3ef0e07c"}, 67 | {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e635b87f01ebc977342e2697d05b56632f5f879a4f15955dfe8cef2448b51691"}, 68 | {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1c95a1e2902a8b722868587c0e1184ad5c55631de5afc0eb96bc4b0d738092c0"}, 69 | {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ef8de666d6179b009dce7bcb2ad4c4a779f113f12caf8dc77f0162c29d20490b"}, 70 | {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:32fc0341d72e0f73f80acb0a2c94216bd704f4f0bce10aedea38f30502b271ff"}, 71 | {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:289200a18fa698949d2b39c671c2cc7a24d44096784e76614899a7ccf2574b7b"}, 72 | {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4a476b06fbcf359ad25d34a057b7219281286ae2477cc5ff5e3f70a246971148"}, 73 | {file = "charset_normalizer-3.4.2-cp313-cp313-win32.whl", hash = "sha256:aaeeb6a479c7667fbe1099af9617c83aaca22182d6cf8c53966491a0f1b7ffb7"}, 74 | {file = "charset_normalizer-3.4.2-cp313-cp313-win_amd64.whl", hash = "sha256:aa6af9e7d59f9c12b33ae4e9450619cf2488e2bbe9b44030905877f0b2324980"}, 75 | {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1cad5f45b3146325bb38d6855642f6fd609c3f7cad4dbaf75549bf3b904d3184"}, 76 | {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b2680962a4848b3c4f155dc2ee64505a9c57186d0d56b43123b17ca3de18f0fa"}, 77 | {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:36b31da18b8890a76ec181c3cf44326bf2c48e36d393ca1b72b3f484113ea344"}, 78 | {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f4074c5a429281bf056ddd4c5d3b740ebca4d43ffffe2ef4bf4d2d05114299da"}, 79 | {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c9e36a97bee9b86ef9a1cf7bb96747eb7a15c2f22bdb5b516434b00f2a599f02"}, 80 | {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:1b1bde144d98e446b056ef98e59c256e9294f6b74d7af6846bf5ffdafd687a7d"}, 81 | {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:915f3849a011c1f593ab99092f3cecfcb4d65d8feb4a64cf1bf2d22074dc0ec4"}, 82 | {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:fb707f3e15060adf5b7ada797624a6c6e0138e2a26baa089df64c68ee98e040f"}, 83 | {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:25a23ea5c7edc53e0f29bae2c44fcb5a1aa10591aae107f2a2b2583a9c5cbc64"}, 84 | {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:770cab594ecf99ae64c236bc9ee3439c3f46be49796e265ce0cc8bc17b10294f"}, 85 | {file = "charset_normalizer-3.4.2-cp37-cp37m-win32.whl", hash = "sha256:6a0289e4589e8bdfef02a80478f1dfcb14f0ab696b5a00e1f4b8a14a307a3c58"}, 86 | {file = "charset_normalizer-3.4.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6fc1f5b51fa4cecaa18f2bd7a003f3dd039dd615cd69a2afd6d3b19aed6775f2"}, 87 | {file = "charset_normalizer-3.4.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:76af085e67e56c8816c3ccf256ebd136def2ed9654525348cfa744b6802b69eb"}, 88 | {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e45ba65510e2647721e35323d6ef54c7974959f6081b58d4ef5d87c60c84919a"}, 89 | {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:046595208aae0120559a67693ecc65dd75d46f7bf687f159127046628178dc45"}, 90 | {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75d10d37a47afee94919c4fab4c22b9bc2a8bf7d4f46f87363bcf0573f3ff4f5"}, 91 | {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6333b3aa5a12c26b2a4d4e7335a28f1475e0e5e17d69d55141ee3cab736f66d1"}, 92 | {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e8323a9b031aa0393768b87f04b4164a40037fb2a3c11ac06a03ffecd3618027"}, 93 | {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:24498ba8ed6c2e0b56d4acbf83f2d989720a93b41d712ebd4f4979660db4417b"}, 94 | {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:844da2b5728b5ce0e32d863af26f32b5ce61bc4273a9c720a9f3aa9df73b1455"}, 95 | {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:65c981bdbd3f57670af8b59777cbfae75364b483fa8a9f420f08094531d54a01"}, 96 | {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:3c21d4fca343c805a52c0c78edc01e3477f6dd1ad7c47653241cf2a206d4fc58"}, 97 | {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:dc7039885fa1baf9be153a0626e337aa7ec8bf96b0128605fb0d77788ddc1681"}, 98 | {file = "charset_normalizer-3.4.2-cp38-cp38-win32.whl", hash = "sha256:8272b73e1c5603666618805fe821edba66892e2870058c94c53147602eab29c7"}, 99 | {file = "charset_normalizer-3.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:70f7172939fdf8790425ba31915bfbe8335030f05b9913d7ae00a87d4395620a"}, 100 | {file = "charset_normalizer-3.4.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:005fa3432484527f9732ebd315da8da8001593e2cf46a3d817669f062c3d9ed4"}, 101 | {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e92fca20c46e9f5e1bb485887d074918b13543b1c2a1185e69bb8d17ab6236a7"}, 102 | {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:50bf98d5e563b83cc29471fa114366e6806bc06bc7a25fd59641e41445327836"}, 103 | {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:721c76e84fe669be19c5791da68232ca2e05ba5185575086e384352e2c309597"}, 104 | {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82d8fd25b7f4675d0c47cf95b594d4e7b158aca33b76aa63d07186e13c0e0ab7"}, 105 | {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3daeac64d5b371dea99714f08ffc2c208522ec6b06fbc7866a450dd446f5c0f"}, 106 | {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:dccab8d5fa1ef9bfba0590ecf4d46df048d18ffe3eec01eeb73a42e0d9e7a8ba"}, 107 | {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:aaf27faa992bfee0264dc1f03f4c75e9fcdda66a519db6b957a3f826e285cf12"}, 108 | {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:eb30abc20df9ab0814b5a2524f23d75dcf83cde762c161917a2b4b7b55b1e518"}, 109 | {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:c72fbbe68c6f32f251bdc08b8611c7b3060612236e960ef848e0a517ddbe76c5"}, 110 | {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:982bb1e8b4ffda883b3d0a521e23abcd6fd17418f6d2c4118d257a10199c0ce3"}, 111 | {file = "charset_normalizer-3.4.2-cp39-cp39-win32.whl", hash = "sha256:43e0933a0eff183ee85833f341ec567c0980dae57c464d8a508e1b2ceb336471"}, 112 | {file = "charset_normalizer-3.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:d11b54acf878eef558599658b0ffca78138c8c3655cf4f3a4a673c437e67732e"}, 113 | {file = "charset_normalizer-3.4.2-py3-none-any.whl", hash = "sha256:7f56930ab0abd1c45cd15be65cc741c28b1c9a34876ce8c17a2fa107810c0af0"}, 114 | {file = "charset_normalizer-3.4.2.tar.gz", hash = "sha256:5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63"}, 115 | ] 116 | 117 | [[package]] 118 | name = "colorama" 119 | version = "0.4.6" 120 | description = "Cross-platform colored terminal text." 121 | optional = false 122 | python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" 123 | groups = ["dev"] 124 | markers = "sys_platform == \"win32\"" 125 | files = [ 126 | {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, 127 | {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, 128 | ] 129 | 130 | [[package]] 131 | name = "coverage" 132 | version = "7.8.1" 133 | description = "Code coverage measurement for Python" 134 | optional = false 135 | python-versions = ">=3.9" 136 | groups = ["dev"] 137 | files = [ 138 | {file = "coverage-7.8.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d7af3990490982fbd2437156c69edbe82b7edf99bc60302cceeeaf79afb886b8"}, 139 | {file = "coverage-7.8.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c5757a7b25fe48040fa120ba6597f5f885b01e323e0d13fe21ff95a70c0f76b7"}, 140 | {file = "coverage-7.8.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b8f105631835fdf191c971c4da93d27e732e028d73ecaa1a88f458d497d026cf"}, 141 | {file = "coverage-7.8.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:21645788c5c2afa3df2d4b607638d86207b84cb495503b71e80e16b4c6b44e80"}, 142 | {file = "coverage-7.8.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e93f36a5c9d995f40e9c4cd9bbabd83fd78705792fa250980256c93accd07bb6"}, 143 | {file = "coverage-7.8.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d591f2ddad432b794f77dc1e94334a80015a3fc7fa07fd6aed8f40362083be5b"}, 144 | {file = "coverage-7.8.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:be2b1a455b3ecfee20638289bb091a95216887d44924a41c28a601efac0916e8"}, 145 | {file = "coverage-7.8.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:061a3bf679dc38fe34d3822f10a9977d548de86b440010beb1e3b44ba93d20f7"}, 146 | {file = "coverage-7.8.1-cp310-cp310-win32.whl", hash = "sha256:12950b6373dc9dfe1ce22a8506ec29c82bfc5b38146ced0a222f38cf5d99a56d"}, 147 | {file = "coverage-7.8.1-cp310-cp310-win_amd64.whl", hash = "sha256:11e5ea0acd8cc5d23030c34dfb2eb6638ad886328df18cc69f8eefab73d1ece5"}, 148 | {file = "coverage-7.8.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc6bebc15c3b275174c66cf4e1c949a94c5c2a3edaa2f193a1225548c52c771"}, 149 | {file = "coverage-7.8.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d8a6c35afd5b912101fabf42975d92d750cfce33c571508a82ff334a133c40d5"}, 150 | {file = "coverage-7.8.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b37729ba34c116a3b2b6fb99df5c37a4ca40e96f430070488fd7a1077ad44907"}, 151 | {file = "coverage-7.8.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b6424c716f4c38ff8f62b602e6b94cde478dadda542a1cb3fe2fe2520cc2aae3"}, 152 | {file = "coverage-7.8.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8bcfafb2809cd01be8ffe5f962e01b0fbe4cc1d74513434c52ff2dd05b86d492"}, 153 | {file = "coverage-7.8.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e3f65da9701648d226b6b24ded3e2528b72075e48d7540968cd857c3bd4c5321"}, 154 | {file = "coverage-7.8.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:173e16969f990688aae4b4487717c44330bc57fd8b61a6216ce8eeb827eb5c0d"}, 155 | {file = "coverage-7.8.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3763b9a4bc128f72da5dcfd7fcc7c7d6644ed28e8f2db473ce1ef0dd37a43fa9"}, 156 | {file = "coverage-7.8.1-cp311-cp311-win32.whl", hash = "sha256:d074380f587360d2500f3b065232c67ae248aaf739267807adbcd29b88bdf864"}, 157 | {file = "coverage-7.8.1-cp311-cp311-win_amd64.whl", hash = "sha256:cd21de85aa0e247b79c6c41f8b5541b54285550f2da6a9448d82b53234d3611b"}, 158 | {file = "coverage-7.8.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:2d8f844e837374a9497e11722d9eb9dfeb33b1b5d31136786c39a4c1a3073c6d"}, 159 | {file = "coverage-7.8.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9cd54a762667c32112df5d6f059c5d61fa532ee06460948cc5bcbf60c502f5c9"}, 160 | {file = "coverage-7.8.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:958b513e23286178b513a6b4d975fe9e7cddbcea6e5ebe8d836e4ef067577154"}, 161 | {file = "coverage-7.8.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9b31756ea647b6ef53190f6b708ad0c4c2ea879bc17799ba5b0699eee59ecf7b"}, 162 | {file = "coverage-7.8.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ccad4e29ac1b6f75bfeedb2cac4860fe5bd9e0a2f04c3e3218f661fa389ab101"}, 163 | {file = "coverage-7.8.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:452f3831c64f5f50260e18a89e613594590d6ceac5206a9b7d76ba43586b01b3"}, 164 | {file = "coverage-7.8.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:9296df6a33b8539cd753765eb5b47308602263a14b124a099cbcf5f770d7cf90"}, 165 | {file = "coverage-7.8.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d52d79dfd3b410b153b6d65b0e3afe834eca2b969377f55ad73c67156d35af0d"}, 166 | {file = "coverage-7.8.1-cp312-cp312-win32.whl", hash = "sha256:ebdf212e1ed85af63fa1a76d556c0a3c7b34348ffba6e145a64b15f003ad0a2b"}, 167 | {file = "coverage-7.8.1-cp312-cp312-win_amd64.whl", hash = "sha256:c04a7903644ccea8fa07c3e76db43ca31c8d453f93c5c94c0f9b82efca225543"}, 168 | {file = "coverage-7.8.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dd5c305faa2e69334a53061b3168987847dadc2449bab95735242a9bde92fde8"}, 169 | {file = "coverage-7.8.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:af6b8cdf0857fd4e6460dd6639c37c3f82163127f6112c1942b5e6a52a477676"}, 170 | {file = "coverage-7.8.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e233a56bbf99e4cb134c4f8e63b16c77714e3987daf2c5aa10c3ba8c4232d730"}, 171 | {file = "coverage-7.8.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9dabc70012fd7b58a8040a7bc1b5f71fd0e62e2138aefdd8367d3d24bf82c349"}, 172 | {file = "coverage-7.8.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1f8e96455907496b3e4ea16f63bb578da31e17d2805278b193525e7714f17f2"}, 173 | {file = "coverage-7.8.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0034ceec8e91fdaf77350901cc48f47efd00f23c220a3f9fc1187774ddf307cb"}, 174 | {file = "coverage-7.8.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:82db9344a07dd9106796b9fe8805425633146a7ea7fed5ed07c65a64d0bb79e1"}, 175 | {file = "coverage-7.8.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9772c9e266b2ca4999180c12b90c8efb4c5c9ad3e55f301d78bc579af6467ad9"}, 176 | {file = "coverage-7.8.1-cp313-cp313-win32.whl", hash = "sha256:6f24a1e2c373a77afae21bc512466a91e31251685c271c5309ee3e557f6e3e03"}, 177 | {file = "coverage-7.8.1-cp313-cp313-win_amd64.whl", hash = "sha256:76a4e1d62505a21971968be61ae17cbdc5e0c483265a37f7ddbbc050f9c0b8ec"}, 178 | {file = "coverage-7.8.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:35dd5d405a1d378c39f3f30f628a25b0b99f1b8e5bdd78275df2e7b0404892d7"}, 179 | {file = "coverage-7.8.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:87b86a87f8de2e1bd0bcd45faf1b1edf54f988c8857157300e0336efcfb8ede6"}, 180 | {file = "coverage-7.8.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ce4553a573edb363d5db12be1c044826878bec039159d6d4eafe826ef773396d"}, 181 | {file = "coverage-7.8.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:db181a1896e0bad75b3bf4916c49fd3cf6751f9cc203fe0e0ecbee1fc43590fa"}, 182 | {file = "coverage-7.8.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ce2606a171f9cf7c15a77ca61f979ffc0e0d92cd2fb18767cead58c1d19f58e"}, 183 | {file = "coverage-7.8.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4fc4f7cff2495d6d112353c33a439230a6de0b7cd0c2578f1e8d75326f63d783"}, 184 | {file = "coverage-7.8.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:ff619c58322d9d6df0a859dc76c3532d7bdbc125cb040f7cd642141446b4f654"}, 185 | {file = "coverage-7.8.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:c0d6290a466a6f3fadf6add2dd4ec11deba4e1a6e3db2dd284edd497aadf802f"}, 186 | {file = "coverage-7.8.1-cp313-cp313t-win32.whl", hash = "sha256:e4e893c7f7fb12271a667d5c1876710fae06d7580343afdb5f3fc4488b73209e"}, 187 | {file = "coverage-7.8.1-cp313-cp313t-win_amd64.whl", hash = "sha256:41d142eefbc0bb3be160a77b2c0fbec76f345387676265052e224eb6c67b7af3"}, 188 | {file = "coverage-7.8.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d5102e17b81158de17d4b5bc363fcffd15231a38ef3f50b8e6fa01f0c6911194"}, 189 | {file = "coverage-7.8.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3bd8e3753257e95e94f38c058627aba1581d51f674e3badf226283b2bdb8f8ca"}, 190 | {file = "coverage-7.8.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d616b5a543c7d4deffa25eb8d8ae3d0d95097f08ac8b131600bb7fbf967ea0e2"}, 191 | {file = "coverage-7.8.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f7a95b0dce364535a63fde0ec1b1ca36400037175d3b62ce04d85dbca5e33832"}, 192 | {file = "coverage-7.8.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f82c1a1c1897d2293cb6c50f20fe8a9ea2add1a228eff479380917a1fe7bbb68"}, 193 | {file = "coverage-7.8.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:62a13b372b65fa6e11685df9ca924bed23bab1d0f277f9b67be7536f253aaf17"}, 194 | {file = "coverage-7.8.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:fe4877c24711458f7990392181be30166cc3ae72158036ecb48a73c30c99fb6f"}, 195 | {file = "coverage-7.8.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:ae5e557aa92565d72f6d3196e878e7cbd6a6380e02a15eafe0af781bd767c10d"}, 196 | {file = "coverage-7.8.1-cp39-cp39-win32.whl", hash = "sha256:87284f272746e31919302ab6211b16b41135109822c498f6e7b40a2f828e7836"}, 197 | {file = "coverage-7.8.1-cp39-cp39-win_amd64.whl", hash = "sha256:07fff2f2ce465fae27447432d39ce733476fbf8478de51fb4034c201e0c5da6d"}, 198 | {file = "coverage-7.8.1-pp39.pp310.pp311-none-any.whl", hash = "sha256:adafe9d71a940927dd3ad8d487f521f11277f133568b7da622666ebd08923191"}, 199 | {file = "coverage-7.8.1-py3-none-any.whl", hash = "sha256:e54b80885b0e61d346accc5709daf8762471a452345521cc9281604a907162c2"}, 200 | {file = "coverage-7.8.1.tar.gz", hash = "sha256:d41d4da5f2871b1782c6b74948d2d37aac3a5b39b43a6ba31d736b97a02ae1f1"}, 201 | ] 202 | 203 | [package.dependencies] 204 | tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""} 205 | 206 | [package.extras] 207 | toml = ["tomli ; python_full_version <= \"3.11.0a6\""] 208 | 209 | [[package]] 210 | name = "exceptiongroup" 211 | version = "1.3.0" 212 | description = "Backport of PEP 654 (exception groups)" 213 | optional = false 214 | python-versions = ">=3.7" 215 | groups = ["dev"] 216 | markers = "python_version < \"3.11\"" 217 | files = [ 218 | {file = "exceptiongroup-1.3.0-py3-none-any.whl", hash = "sha256:4d111e6e0c13d0644cad6ddaa7ed0261a0b36971f6d23e7ec9b4b9097da78a10"}, 219 | {file = "exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88"}, 220 | ] 221 | 222 | [package.dependencies] 223 | typing-extensions = {version = ">=4.6.0", markers = "python_version < \"3.13\""} 224 | 225 | [package.extras] 226 | test = ["pytest (>=6)"] 227 | 228 | [[package]] 229 | name = "flake8" 230 | version = "7.2.0" 231 | description = "the modular source code checker: pep8 pyflakes and co" 232 | optional = false 233 | python-versions = ">=3.9" 234 | groups = ["dev"] 235 | files = [ 236 | {file = "flake8-7.2.0-py2.py3-none-any.whl", hash = "sha256:93b92ba5bdb60754a6da14fa3b93a9361fd00a59632ada61fd7b130436c40343"}, 237 | {file = "flake8-7.2.0.tar.gz", hash = "sha256:fa558ae3f6f7dbf2b4f22663e5343b6b6023620461f8d4ff2019ef4b5ee70426"}, 238 | ] 239 | 240 | [package.dependencies] 241 | mccabe = ">=0.7.0,<0.8.0" 242 | pycodestyle = ">=2.13.0,<2.14.0" 243 | pyflakes = ">=3.3.0,<3.4.0" 244 | 245 | [[package]] 246 | name = "idna" 247 | version = "3.10" 248 | description = "Internationalized Domain Names in Applications (IDNA)" 249 | optional = false 250 | python-versions = ">=3.6" 251 | groups = ["main"] 252 | files = [ 253 | {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, 254 | {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, 255 | ] 256 | 257 | [package.extras] 258 | all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] 259 | 260 | [[package]] 261 | name = "iniconfig" 262 | version = "2.1.0" 263 | description = "brain-dead simple config-ini parsing" 264 | optional = false 265 | python-versions = ">=3.8" 266 | groups = ["dev"] 267 | files = [ 268 | {file = "iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760"}, 269 | {file = "iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7"}, 270 | ] 271 | 272 | [[package]] 273 | name = "mccabe" 274 | version = "0.7.0" 275 | description = "McCabe checker, plugin for flake8" 276 | optional = false 277 | python-versions = ">=3.6" 278 | groups = ["dev"] 279 | files = [ 280 | {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, 281 | {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, 282 | ] 283 | 284 | [[package]] 285 | name = "ogn-parser" 286 | version = "0.3.14" 287 | description = "OGN message parser for Python" 288 | optional = false 289 | python-versions = ">=3.9" 290 | groups = ["main"] 291 | files = [ 292 | {file = "ogn_parser-0.3.14-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:673bb7eaa224a47b832d8bda20508a321d326bddb14fa01e3d833af76de94b45"}, 293 | {file = "ogn_parser-0.3.14-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:daa4482a70cdab55226a2c5e9430116b0c9c0104a31e75692e6a8bf6ab6f7d3b"}, 294 | {file = "ogn_parser-0.3.14-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:17051afa76069fa47facb449e29e54b09d9564de2f452b134b557e7528b518c9"}, 295 | {file = "ogn_parser-0.3.14-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:250e6a226d4f95bbfe0c48178d5d9e5b0c20cfa52699f1a7484152ec22972abd"}, 296 | {file = "ogn_parser-0.3.14-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d0913bfb1bbee0bd845679c09f1d817dfa97268682fa202157ba818f6c9a9dc"}, 297 | {file = "ogn_parser-0.3.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7699d3c7ce56fde123715d142c887a0bcfe096ea6a18d18936b97a2f5c7e474b"}, 298 | {file = "ogn_parser-0.3.14-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:29fb9cbb7a693d4e309f861a8eac745329a31d1dd155e7cf9afe1e2c929570b5"}, 299 | {file = "ogn_parser-0.3.14-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:7909377cdf62f82f3f916e09dad483d8efac3c454f939f59c8b456b27d8a8420"}, 300 | {file = "ogn_parser-0.3.14-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:518eec6014987e0f909b288a0b9f5b3b59d6aefe9778a6f0bcb63a2c0c68fe89"}, 301 | {file = "ogn_parser-0.3.14-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:15f0a604392e188b4a70c3fadf6e6419aced2a7ac208f950b84cf86211ef2682"}, 302 | {file = "ogn_parser-0.3.14-cp310-cp310-win32.whl", hash = "sha256:bc26467ed75a9405c55299718c33dbddbcd20b2212b9a875c20548f4e2c8b0b0"}, 303 | {file = "ogn_parser-0.3.14-cp310-cp310-win_amd64.whl", hash = "sha256:b6d36e9d648e378ba52c5252f30f93e36099e0dd585cd76a27cf9b8106cd91c9"}, 304 | {file = "ogn_parser-0.3.14-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:499880b51bfb70d3ad5444777c9976b192f8b791df8dad5b6e6292f02b1a0d04"}, 305 | {file = "ogn_parser-0.3.14-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e6a3bde2ff467bab69a18c947c721fc5a31db49f00bbaafcf6bb73f336b90ce8"}, 306 | {file = "ogn_parser-0.3.14-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1ae27a6c06be32108dd4cb6770398fbd0e5bcf0d9eb130bfea22606acf0fd178"}, 307 | {file = "ogn_parser-0.3.14-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cd04fb31521e6f2a60a9b9f89eb9e0e6c607d678a5a92350379520ed4ca01e26"}, 308 | {file = "ogn_parser-0.3.14-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8f4cca19c275251b5cc4fce3ee79a88030316fdbaa37962c09401cb049ccc07b"}, 309 | {file = "ogn_parser-0.3.14-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f85748d8f333fda7ec26dd205e7eb6da3e486dccebd1520652e9ca9195badee0"}, 310 | {file = "ogn_parser-0.3.14-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:396fa7629b9a196fc782ee7d01445070047768add0712b0f548143818ec836a5"}, 311 | {file = "ogn_parser-0.3.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5a57f90b880f8a7c30181cfe02af174f669e0e08d2748c3e2e4805c89abaf707"}, 312 | {file = "ogn_parser-0.3.14-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c095af3c964521f37aba6a7059e2113cf2b9cc52600d93d698f96fb529ad62f7"}, 313 | {file = "ogn_parser-0.3.14-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:d56fdc7d0133a63ee57a68ef1b8fcda2012c6f072c1cfbacf1de4d23f327d212"}, 314 | {file = "ogn_parser-0.3.14-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8f43db7687e94ed74471a15f694be59bd28e0ceea74c43b052cee9d921785554"}, 315 | {file = "ogn_parser-0.3.14-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9fc5997b0ea8fe868e89b5e090d1a79ec6ad1e9809820ff95acdd4cf96ced642"}, 316 | {file = "ogn_parser-0.3.14-cp311-cp311-win32.whl", hash = "sha256:b378baef8e41d0ec7aea7e0dc0a128864bd3ddbfa6aa42e4c55b4b679c174522"}, 317 | {file = "ogn_parser-0.3.14-cp311-cp311-win_amd64.whl", hash = "sha256:8e3a04e6a3623d63256481e0f80d8a3b30c344fe47757a7a2c1c68d0f34a3d67"}, 318 | {file = "ogn_parser-0.3.14-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:cc56a3f9f9e6069c97a6589363959c71693d0be1cbe61351a732088699b40597"}, 319 | {file = "ogn_parser-0.3.14-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:39ade4cc6a8fccadd0d90762ea0a9926951176cf5f94d84d5d39e81e2297cccb"}, 320 | {file = "ogn_parser-0.3.14-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c06205cb2082b0f83f579dc369ac33c270debbddf0c798fbd3ff67931d6a71b9"}, 321 | {file = "ogn_parser-0.3.14-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:437483501be5229c60d1c1b2b87e9397320064fb6b14a64e79a847cc50d3b10b"}, 322 | {file = "ogn_parser-0.3.14-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ec7e96e7c6b691d7cdafc6b850ebb33bf2beba9b4b1092dcc17fe6c8f4600cbf"}, 323 | {file = "ogn_parser-0.3.14-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:adf5c70f346758afd37c333f8adb138485330a70e59f39ef80ddcf6f455a550d"}, 324 | {file = "ogn_parser-0.3.14-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65d3534a349571b193e34a734b0bc1cfc99b864698d7a30994df8876a1f58bad"}, 325 | {file = "ogn_parser-0.3.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e272e8e86c86a4f9751ba3601448d746d5a9a91f6ec0f92731c7bebd505bf157"}, 326 | {file = "ogn_parser-0.3.14-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:254503f183b60b4ec63737ffc226063ca9397488ffeffab59a8df682e0fe1862"}, 327 | {file = "ogn_parser-0.3.14-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:309cc0c109071f5f27ef469c8f449759826f0f768275b12280025091fa2feb0d"}, 328 | {file = "ogn_parser-0.3.14-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:8db0d2f72fe68ea18ab6652f53b37289c4924799f2be4f84af073283754c6300"}, 329 | {file = "ogn_parser-0.3.14-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:18cd371a613d773072bcf70efcdde4615a6c07c843181b18bd86d62d3dd55e6f"}, 330 | {file = "ogn_parser-0.3.14-cp312-cp312-win32.whl", hash = "sha256:a3eee60138d7edc93dd314b3c9c246100f992ddefa0baea0813fe2f4afaf98d0"}, 331 | {file = "ogn_parser-0.3.14-cp312-cp312-win_amd64.whl", hash = "sha256:48c4e33709cd71cc51ef4d3ae13385c6b334dd9558d0035f20924f38e6428d74"}, 332 | {file = "ogn_parser-0.3.14-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:ecfdedde439364f4de5b37e4e0fe5a6dcfe08b9b8d996e43898d1150b0b8c9f0"}, 333 | {file = "ogn_parser-0.3.14-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d48ef5276d8e0ad45f8b4f37dc47bea80881f31c1ca2c00b2c7a01d3d8b6b062"}, 334 | {file = "ogn_parser-0.3.14-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b41d66c8d3bd1965d763530ef5d93e17b3bfb5f873448caab4076e0442acd60d"}, 335 | {file = "ogn_parser-0.3.14-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e4cc56704a59526ab069188a2040a5810ec004c5d2ed2675420ede3aeefe65a4"}, 336 | {file = "ogn_parser-0.3.14-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fbcd6facdb4b914e2f38dd09a6079d7e86cfb4a799508936d5e63ae8300cdc9d"}, 337 | {file = "ogn_parser-0.3.14-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5bf983fca051b022feff94d974670fccf49f4b82a22a540cd6d896dbb60d0838"}, 338 | {file = "ogn_parser-0.3.14-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6ed64437a596d7a88dc828901eddc5683e912f8be848fa09d9ce4cc168a9b564"}, 339 | {file = "ogn_parser-0.3.14-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ae6d33dcfd7fec9e2abd093f90ba027d54ad930886b3efaf8f8de3dcbb99b11c"}, 340 | {file = "ogn_parser-0.3.14-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:205b9f124a52be9e7826c2426d530a499676f8a75fa86652e79bc8be0d0dd5f3"}, 341 | {file = "ogn_parser-0.3.14-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:7d62be26a6e10c87a19c4ad5b7a09833e694c5dbc16359c97d834463578700e0"}, 342 | {file = "ogn_parser-0.3.14-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:c683aff880025f769f537eb9d8f31abf9dcb102b528f18ba91f3a871f77b0b32"}, 343 | {file = "ogn_parser-0.3.14-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:50f0b25677a38e7bce2469439a626dd0936192e5e449a1ebc4977bb20ec0a90c"}, 344 | {file = "ogn_parser-0.3.14-cp313-cp313-win32.whl", hash = "sha256:fe7eb16454875e314b653a2d842c704629d4006276c20284805c40b623e8eb4d"}, 345 | {file = "ogn_parser-0.3.14-cp313-cp313-win_amd64.whl", hash = "sha256:754639cf1429ebd1ecba1c69794af2b97daa959708bca2e94570b7bb930ae429"}, 346 | {file = "ogn_parser-0.3.14-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5803aa63488aca3902e0a21b1203e22d4a9e2c885a4c0b094b3b00cb08950fee"}, 347 | {file = "ogn_parser-0.3.14-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:95e204b2a70e2bd977dbaa89ab97b8e919b5c74601d7d025dda7ce032a911bff"}, 348 | {file = "ogn_parser-0.3.14-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f42e5ed1916fb1db0806602cdf0c1f7f5cd2f3663a43a39f31ccfd331c8c3547"}, 349 | {file = "ogn_parser-0.3.14-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fab6e4f5cb12fe0bf026451a83a93190132de3a0926586faeee78e29a08e3e3c"}, 350 | {file = "ogn_parser-0.3.14-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9a6572a92dd99d8ac37258f8e9317f3ce28a7669f0e67054238d324984cfab74"}, 351 | {file = "ogn_parser-0.3.14-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:5755be19aad39f7fde519a2890677ebc689fba386a81373497c5e96a54df3fdb"}, 352 | {file = "ogn_parser-0.3.14-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:24ef5f0f101ad81b059bd6a48fd2801a8bc27da7ee4e47b17fd6f472d7f34c5a"}, 353 | {file = "ogn_parser-0.3.14-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:80166f2f5e9db71a61087bb30779d3ad394fcb5c4d941c43d2bf8dfbd1a4e933"}, 354 | {file = "ogn_parser-0.3.14-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4667f554ea2c48913481b3a322f7adbdc2b67637b589e90d59bf49c7d59ea9c5"}, 355 | {file = "ogn_parser-0.3.14-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b5474d0a08d16161cf212fc2d9b45600376212070586087628bb02a4290c2698"}, 356 | {file = "ogn_parser-0.3.14-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d53b0ff0292ce8d40e8974d8131d4fa8a5f394b59cca98a18ce1f2aa86871e10"}, 357 | {file = "ogn_parser-0.3.14-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:468c801ed3eba58a26cf44246d415b0b7991d42a0e07abf8a49652e53a901c67"}, 358 | {file = "ogn_parser-0.3.14-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e641df18a64fcd51b95d256630721904c39bc11781afe7af80b67e82dc288692"}, 359 | {file = "ogn_parser-0.3.14-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11b5f8858b1ffdbe1ff1e953bde92ddcc1f23bcd56a8442e0dd6ab882f99e743"}, 360 | {file = "ogn_parser-0.3.14-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:07fc436a1967fc0efa7babbf1f697942f1c5165820a6d5edae3477e6c0a6af43"}, 361 | {file = "ogn_parser-0.3.14-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:1f549b28f49ec075f6ca635e2da3cf8b25587fde4dbf9196cb0f65920debbf8f"}, 362 | {file = "ogn_parser-0.3.14-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:72113537cf108b9af0461183f30cd0328c52fd0cdd8478993304e64059412f3a"}, 363 | {file = "ogn_parser-0.3.14-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:d6ccddf60dfa58aabc347ee0b394fdc1940ede5db2cefcab85b78a1073fa1803"}, 364 | {file = "ogn_parser-0.3.14-cp39-cp39-win32.whl", hash = "sha256:9d9b37a75ad535733e509934a40d019338866531912279fc8679f09fc0a0595b"}, 365 | {file = "ogn_parser-0.3.14-cp39-cp39-win_amd64.whl", hash = "sha256:5733046f34b09221a59a889924aebe95760f2600fb01147ea536e382ab54a84c"}, 366 | {file = "ogn_parser-0.3.14-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b7b6402629bc3047c896254e76760ddb1d1f9717ff95fa9dd5e3dce15fd603fe"}, 367 | {file = "ogn_parser-0.3.14-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5585ac7134045ef016f0becd7489e31d89d76af0f0a28eeb3d01fed7a8d8a9a8"}, 368 | {file = "ogn_parser-0.3.14-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b39666f718bb38e432b307ba1a76262b88e942f5711c2971a82ddee2ad563739"}, 369 | {file = "ogn_parser-0.3.14-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:11da7a1c61b251eff9f0fccc432d594b7ff5e520196d438fe30b27131da53bfb"}, 370 | {file = "ogn_parser-0.3.14-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7081160e607d541c0589b2f876fa680b7ad3f4c85dadd7456bf2b00148bfe7f2"}, 371 | {file = "ogn_parser-0.3.14-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b56ae72d41aacf698233151b93d7680fc9b9f42064310daf6b685fe3eaa3aa0"}, 372 | {file = "ogn_parser-0.3.14-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:05955ca2d6a7e79aa611019a841ef4e00a3a41a6221c2ce1d7cc512e5fd5c348"}, 373 | {file = "ogn_parser-0.3.14-pp310-pypy310_pp73-musllinux_1_2_armv7l.whl", hash = "sha256:b1e79f17147e113a73cf9e571e476fb1d9ba38dfda4507ef1691ec02f1282488"}, 374 | {file = "ogn_parser-0.3.14-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:825bcd1321a56bd58c552b354da4e5ff8ee202c5cdb4175ad8de47d11f160bf7"}, 375 | {file = "ogn_parser-0.3.14-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:b28846fe70bc0e0bf05248176972d0b4444e21b0a4ceccefe8bd19405adfff78"}, 376 | {file = "ogn_parser-0.3.14-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7dac8f62bc3a8628c90dac8b3bee730800032e46a7187df37f9c738ce64d7471"}, 377 | {file = "ogn_parser-0.3.14-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7f30f297ccce55ed34fa38a2964a6882c60bd52470ad0d8cc59cf706e1d4449e"}, 378 | {file = "ogn_parser-0.3.14-pp311-pypy311_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a85c9d2434b637f66c32d6b2af92f223fb4b7402203d553682f8d9743722603f"}, 379 | {file = "ogn_parser-0.3.14-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5975143db0fc4d500855b2bd4028c5b1566a6a7d374fa7620eba580e06e608b1"}, 380 | {file = "ogn_parser-0.3.14-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8f33b302a62b93d990fea98bb4cb026c7c2528c5003310259bff1dba6e15f489"}, 381 | {file = "ogn_parser-0.3.14-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:31d56481a2aee078de1074b488e7fb766cc100a7dbc74229e2d090ce37a2af3b"}, 382 | {file = "ogn_parser-0.3.14-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:9725eaa526914e41132adffa3b88a30188aa750ff122d39d70d49b9f278a93ba"}, 383 | {file = "ogn_parser-0.3.14-pp311-pypy311_pp73-musllinux_1_2_armv7l.whl", hash = "sha256:8b2a6f611bd66a7db0e43008060a79f2c2815d2c0c28489223330f8337a9e0c3"}, 384 | {file = "ogn_parser-0.3.14-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:573bc91503dc11051eac070505bb766408a9ef3d02c0986a612972a91a34b6ba"}, 385 | {file = "ogn_parser-0.3.14-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:4c18d5b32857861e7522701dcf05a88ca7e19dfddcfa9f2ad5b1caa6cc6cf3bb"}, 386 | {file = "ogn_parser-0.3.14-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9d90471a9c45d5a09e8230eb5928adb2dd0edcb2195174732583f7e2d37706e"}, 387 | {file = "ogn_parser-0.3.14-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7feb2cd5316222613c3918b11672d23c2ef634609f32793b11867a9a880565fe"}, 388 | {file = "ogn_parser-0.3.14-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9429b3ea008779dcba15e83375d24bce759fb4b78432f9e6672675738d013f44"}, 389 | {file = "ogn_parser-0.3.14-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e299cc50d7f04341482f2e00ca3bdd4bf429e44e229061f1ff78568f86981975"}, 390 | {file = "ogn_parser-0.3.14-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:aa6d202f67483963b3ae64a81f2fb90e81957a8c7f7fbd1e5311fce2a4364c71"}, 391 | {file = "ogn_parser-0.3.14-pp39-pypy39_pp73-musllinux_1_2_armv7l.whl", hash = "sha256:110e2bb5eb281d77fff371420d013cd0a02924f32db948a7ef73c1c174a09153"}, 392 | {file = "ogn_parser-0.3.14-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:3fc95d4e741a1e72fe0db5540b9a5efd5c2eebd8a83c2dc8da393d055ea461e3"}, 393 | {file = "ogn_parser-0.3.14-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:d09635f712e6be094285f0fe66e1f1af74bdf1a0f0982c2eb84221e891fc3f4a"}, 394 | {file = "ogn_parser-0.3.14.tar.gz", hash = "sha256:0adafa9d673d4287fe94ae0f52b8e4261f1ca7bec2b9202c5494e645659b9ae2"}, 395 | ] 396 | 397 | [[package]] 398 | name = "packaging" 399 | version = "25.0" 400 | description = "Core utilities for Python packages" 401 | optional = false 402 | python-versions = ">=3.8" 403 | groups = ["dev"] 404 | files = [ 405 | {file = "packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484"}, 406 | {file = "packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f"}, 407 | ] 408 | 409 | [[package]] 410 | name = "pluggy" 411 | version = "1.6.0" 412 | description = "plugin and hook calling mechanisms for python" 413 | optional = false 414 | python-versions = ">=3.9" 415 | groups = ["dev"] 416 | files = [ 417 | {file = "pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746"}, 418 | {file = "pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3"}, 419 | ] 420 | 421 | [package.extras] 422 | dev = ["pre-commit", "tox"] 423 | testing = ["coverage", "pytest", "pytest-benchmark"] 424 | 425 | [[package]] 426 | name = "py-cpuinfo" 427 | version = "9.0.0" 428 | description = "Get CPU info with pure Python" 429 | optional = false 430 | python-versions = "*" 431 | groups = ["dev"] 432 | files = [ 433 | {file = "py-cpuinfo-9.0.0.tar.gz", hash = "sha256:3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3f49690"}, 434 | {file = "py_cpuinfo-9.0.0-py3-none-any.whl", hash = "sha256:859625bc251f64e21f077d099d4162689c762b5d6a4c3c97553d56241c9674d5"}, 435 | ] 436 | 437 | [[package]] 438 | name = "pycodestyle" 439 | version = "2.13.0" 440 | description = "Python style guide checker" 441 | optional = false 442 | python-versions = ">=3.9" 443 | groups = ["dev"] 444 | files = [ 445 | {file = "pycodestyle-2.13.0-py2.py3-none-any.whl", hash = "sha256:35863c5974a271c7a726ed228a14a4f6daf49df369d8c50cd9a6f58a5e143ba9"}, 446 | {file = "pycodestyle-2.13.0.tar.gz", hash = "sha256:c8415bf09abe81d9c7f872502a6eee881fbe85d8763dd5b9924bb0a01d67efae"}, 447 | ] 448 | 449 | [[package]] 450 | name = "pyflakes" 451 | version = "3.3.2" 452 | description = "passive checker of Python programs" 453 | optional = false 454 | python-versions = ">=3.9" 455 | groups = ["dev"] 456 | files = [ 457 | {file = "pyflakes-3.3.2-py2.py3-none-any.whl", hash = "sha256:5039c8339cbb1944045f4ee5466908906180f13cc99cc9949348d10f82a5c32a"}, 458 | {file = "pyflakes-3.3.2.tar.gz", hash = "sha256:6dfd61d87b97fba5dcfaaf781171ac16be16453be6d816147989e7f6e6a9576b"}, 459 | ] 460 | 461 | [[package]] 462 | name = "pytest" 463 | version = "8.3.5" 464 | description = "pytest: simple powerful testing with Python" 465 | optional = false 466 | python-versions = ">=3.8" 467 | groups = ["dev"] 468 | files = [ 469 | {file = "pytest-8.3.5-py3-none-any.whl", hash = "sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820"}, 470 | {file = "pytest-8.3.5.tar.gz", hash = "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845"}, 471 | ] 472 | 473 | [package.dependencies] 474 | colorama = {version = "*", markers = "sys_platform == \"win32\""} 475 | exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} 476 | iniconfig = "*" 477 | packaging = "*" 478 | pluggy = ">=1.5,<2" 479 | tomli = {version = ">=1", markers = "python_version < \"3.11\""} 480 | 481 | [package.extras] 482 | dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] 483 | 484 | [[package]] 485 | name = "pytest-benchmark" 486 | version = "5.1.0" 487 | description = "A ``pytest`` fixture for benchmarking code. It will group the tests into rounds that are calibrated to the chosen timer." 488 | optional = false 489 | python-versions = ">=3.9" 490 | groups = ["dev"] 491 | files = [ 492 | {file = "pytest-benchmark-5.1.0.tar.gz", hash = "sha256:9ea661cdc292e8231f7cd4c10b0319e56a2118e2c09d9f50e1b3d150d2aca105"}, 493 | {file = "pytest_benchmark-5.1.0-py3-none-any.whl", hash = "sha256:922de2dfa3033c227c96da942d1878191afa135a29485fb942e85dff1c592c89"}, 494 | ] 495 | 496 | [package.dependencies] 497 | py-cpuinfo = "*" 498 | pytest = ">=8.1" 499 | 500 | [package.extras] 501 | aspect = ["aspectlib"] 502 | elasticsearch = ["elasticsearch"] 503 | histogram = ["pygal", "pygaljs", "setuptools"] 504 | 505 | [[package]] 506 | name = "pytest-cov" 507 | version = "6.1.1" 508 | description = "Pytest plugin for measuring coverage." 509 | optional = false 510 | python-versions = ">=3.9" 511 | groups = ["dev"] 512 | files = [ 513 | {file = "pytest_cov-6.1.1-py3-none-any.whl", hash = "sha256:bddf29ed2d0ab6f4df17b4c55b0a657287db8684af9c42ea546b21b1041b3dde"}, 514 | {file = "pytest_cov-6.1.1.tar.gz", hash = "sha256:46935f7aaefba760e716c2ebfbe1c216240b9592966e7da99ea8292d4d3e2a0a"}, 515 | ] 516 | 517 | [package.dependencies] 518 | coverage = {version = ">=7.5", extras = ["toml"]} 519 | pytest = ">=4.6" 520 | 521 | [package.extras] 522 | testing = ["fields", "hunter", "process-tests", "pytest-xdist", "virtualenv"] 523 | 524 | [[package]] 525 | name = "requests" 526 | version = "2.32.3" 527 | description = "Python HTTP for Humans." 528 | optional = false 529 | python-versions = ">=3.8" 530 | groups = ["main"] 531 | files = [ 532 | {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, 533 | {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, 534 | ] 535 | 536 | [package.dependencies] 537 | certifi = ">=2017.4.17" 538 | charset-normalizer = ">=2,<4" 539 | idna = ">=2.5,<4" 540 | urllib3 = ">=1.21.1,<3" 541 | 542 | [package.extras] 543 | socks = ["PySocks (>=1.5.6,!=1.5.7)"] 544 | use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] 545 | 546 | [[package]] 547 | name = "tomli" 548 | version = "2.2.1" 549 | description = "A lil' TOML parser" 550 | optional = false 551 | python-versions = ">=3.8" 552 | groups = ["dev"] 553 | markers = "python_full_version <= \"3.11.0a6\"" 554 | files = [ 555 | {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, 556 | {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, 557 | {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"}, 558 | {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"}, 559 | {file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"}, 560 | {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"}, 561 | {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"}, 562 | {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"}, 563 | {file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"}, 564 | {file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"}, 565 | {file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"}, 566 | {file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"}, 567 | {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"}, 568 | {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"}, 569 | {file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"}, 570 | {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"}, 571 | {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"}, 572 | {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"}, 573 | {file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"}, 574 | {file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"}, 575 | {file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"}, 576 | {file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"}, 577 | {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"}, 578 | {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"}, 579 | {file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"}, 580 | {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"}, 581 | {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"}, 582 | {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"}, 583 | {file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"}, 584 | {file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"}, 585 | {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"}, 586 | {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"}, 587 | ] 588 | 589 | [[package]] 590 | name = "typing-extensions" 591 | version = "4.13.2" 592 | description = "Backported and Experimental Type Hints for Python 3.8+" 593 | optional = false 594 | python-versions = ">=3.8" 595 | groups = ["dev"] 596 | markers = "python_version < \"3.11\"" 597 | files = [ 598 | {file = "typing_extensions-4.13.2-py3-none-any.whl", hash = "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c"}, 599 | {file = "typing_extensions-4.13.2.tar.gz", hash = "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef"}, 600 | ] 601 | 602 | [[package]] 603 | name = "urllib3" 604 | version = "2.4.0" 605 | description = "HTTP library with thread-safe connection pooling, file post, and more." 606 | optional = false 607 | python-versions = ">=3.9" 608 | groups = ["main"] 609 | files = [ 610 | {file = "urllib3-2.4.0-py3-none-any.whl", hash = "sha256:4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813"}, 611 | {file = "urllib3-2.4.0.tar.gz", hash = "sha256:414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466"}, 612 | ] 613 | 614 | [package.extras] 615 | brotli = ["brotli (>=1.0.9) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\""] 616 | h2 = ["h2 (>=4,<5)"] 617 | socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] 618 | zstd = ["zstandard (>=0.18.0)"] 619 | 620 | [metadata] 621 | lock-version = "2.1" 622 | python-versions = ">=3.9" 623 | content-hash = "ead2ab84a0931a72e6626fc1b2da0c393a38249e2d559f1355cc6e4661793f8f" 624 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "ogn-client" 3 | version = "2.0.0" 4 | description = "A python module for the Open Glider Network" 5 | authors = [ 6 | {name = "Konstantin Gründger",email = "konstantin.gruendger@web.de"}, 7 | {name = "Fabian P. Schmidt",email = "kerel-fs@gmx.de"}, 8 | {name = "Heikki Hannikainen",email = "hessu@hes.iki.fi"}, 9 | {name = "Anze Kolar",email = "me@akolar.com"}, 10 | {name = "Angel Casado",email = "acasadoalonso@gmail.com"}, 11 | {name = "Sebastien Chaumontet",email = "sebastien@chaumontet.ne"}, 12 | ] 13 | maintainers = [ 14 | {name = "Konstantin Gründger",email = "konstantin.gruendger@web.de"}, 15 | ] 16 | license = "AGPL-3.0-only" 17 | license-files = ["LICENSE"] 18 | keywords = ["gliding", "ogn"] 19 | readme = "README.md" 20 | requires-python = ">=3.9" 21 | dependencies = [ 22 | "requests (>=2.32.3,<3.0.0)", 23 | "ogn-parser (>=0.3.14,<0.4.0)" 24 | ] 25 | classifiers = [ 26 | "Development Status :: 4 - Beta", 27 | "Intended Audience :: Developers", 28 | "Intended Audience :: Science/Research", 29 | "Topic :: Scientific/Engineering :: GIS", 30 | "License :: OSI Approved :: GNU Affero General Public License v3", 31 | "Programming Language :: Python :: 3 :: Only", 32 | ] 33 | 34 | [project.urls] 35 | repository = "https://github.com/glidernet/python-ogn-client" 36 | 37 | [tool.poetry] 38 | packages = [ 39 | { include = "ogn" }, 40 | { include = "README.md" }, 41 | { include = "LICENSE" }, 42 | ] 43 | 44 | [tool.poetry.group.dev.dependencies] 45 | flake8 = "^7.2.0" 46 | pytest = "^8.3.5" 47 | pytest-cov = "^6.1.1" 48 | pytest-benchmark = "^5.1.0" 49 | 50 | [build-system] 51 | requires = ["poetry-core>=2.0.0,<3.0.0"] 52 | build-backend = "poetry.core.masonry.api" 53 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glidernet/python-ogn-client/bb7c3c28c995533e41a8199133bc6532c7e11205/tests/__init__.py -------------------------------------------------------------------------------- /tests/client/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glidernet/python-ogn-client/bb7c3c28c995533e41a8199133bc6532c7e11205/tests/client/__init__.py -------------------------------------------------------------------------------- /tests/client/test_AprsClient.py: -------------------------------------------------------------------------------- 1 | import unittest.mock as mock 2 | 3 | from ogn.parser import parse 4 | from ogn.client.client import create_aprs_login, AprsClient 5 | from ogn.client.settings import APRS_APP_NAME, APRS_APP_VER, APRS_KEEPALIVE_TIME 6 | 7 | 8 | def test_create_aprs_login(): 9 | basic_login = create_aprs_login('klaus', -1, 'myApp', '0.1') 10 | assert 'user klaus pass -1 vers myApp 0.1\n' == basic_login 11 | 12 | login_with_filter = create_aprs_login('klaus', -1, 'myApp', '0.1', 'r/48.0/11.0/100') 13 | assert 'user klaus pass -1 vers myApp 0.1 filter r/48.0/11.0/100\n' == login_with_filter 14 | 15 | 16 | def test_initialisation(): 17 | client = AprsClient(aprs_user='testuser', aprs_filter='') 18 | assert client.aprs_user == 'testuser' 19 | assert client.aprs_filter == '' 20 | 21 | 22 | @mock.patch('ogn.client.client.socket') 23 | def test_connect_full_feed(mock_socket): 24 | client = AprsClient(aprs_user='testuser', aprs_filter='') 25 | client.connect() 26 | client.sock.send.assert_called_once_with(f'user testuser pass -1 vers {APRS_APP_NAME} {APRS_APP_VER}\n'.encode('ascii')) 27 | client.sock.makefile.assert_called_once_with('rb') 28 | 29 | 30 | @mock.patch('ogn.client.client.socket') 31 | def test_connect_client_defined_filter(mock_socket): 32 | client = AprsClient(aprs_user='testuser', aprs_filter='r/50.4976/9.9495/100') 33 | client.connect() 34 | client.sock.send.assert_called_once_with(f'user testuser pass -1 vers {APRS_APP_NAME} {APRS_APP_VER} filter r/50.4976/9.9495/100\n'.encode('ascii')) 35 | client.sock.makefile.assert_called_once_with('rb') 36 | 37 | 38 | @mock.patch('ogn.client.client.socket') 39 | def test_disconnect(mock_socket): 40 | client = AprsClient(aprs_user='testuser', aprs_filter='') 41 | client.connect() 42 | client.disconnect() 43 | client.sock.shutdown.assert_called_once_with(0) 44 | client.sock.close.assert_called_once_with() 45 | assert client._kill is True 46 | 47 | 48 | @mock.patch('ogn.client.client.socket') 49 | def test_run(mock_socket): 50 | import socket 51 | mock_socket.error = socket.error 52 | 53 | client = AprsClient(aprs_user='testuser', aprs_filter='') 54 | client.connect() 55 | 56 | client.sock_file.readline = mock.MagicMock() 57 | client.sock_file.readline.side_effect = [b'Normal text blabla', 58 | b'my weird character \xc2\xa5', 59 | UnicodeDecodeError('funnycodec', b'\x00\x00', 1, 2, 'This is just a fake reason!'), 60 | b'... show must go on', 61 | BrokenPipeError(), 62 | b'... and on', 63 | ConnectionResetError(), 64 | b'... and on', 65 | socket.error(), 66 | b'... and on', 67 | b'', 68 | b'... and on', 69 | KeyboardInterrupt()] 70 | 71 | try: 72 | client.run(callback=lambda msg: print(f"got: {msg}"), autoreconnect=True) 73 | except KeyboardInterrupt: 74 | pass 75 | finally: 76 | client.disconnect() 77 | 78 | 79 | @mock.patch('ogn.client.client.time') 80 | @mock.patch('ogn.client.client.socket') 81 | def test_run_keepalive(mock_socket, mock_time): 82 | import socket 83 | mock_socket.error = socket.error 84 | 85 | client = AprsClient(aprs_user='testuser', aprs_filter='') 86 | client.connect() 87 | 88 | client.sock_file.readline = mock.MagicMock() 89 | client.sock_file.readline.side_effect = [b'Normal text blabla', 90 | KeyboardInterrupt()] 91 | 92 | mock_time.side_effect = [0, 0, APRS_KEEPALIVE_TIME + 1, APRS_KEEPALIVE_TIME + 1] 93 | 94 | timed_callback = mock.MagicMock() 95 | 96 | try: 97 | client.run(callback=lambda msg: print(f"got: {msg}"), timed_callback=timed_callback) 98 | except KeyboardInterrupt: 99 | pass 100 | finally: 101 | client.disconnect() 102 | 103 | timed_callback.assert_called_with(client) 104 | 105 | 106 | def test_reset_kill_reconnect(): 107 | client = AprsClient(aprs_user='testuser', aprs_filter='') 108 | client.connect() 109 | 110 | # .run() should be allowed to execute after .connect() 111 | mock_callback = mock.MagicMock( 112 | side_effect=lambda raw_msg: client.disconnect()) 113 | 114 | assert client._kill is False 115 | client.run(callback=mock_callback, autoreconnect=True) 116 | 117 | # After .disconnect(), client._kill should be True 118 | assert client._kill is True 119 | assert mock_callback.call_count == 1 120 | 121 | # After we reconnect, .run() should be able to run again 122 | mock_callback.reset_mock() 123 | client.connect() 124 | client.run(callback=mock_callback, autoreconnect=True) 125 | assert mock_callback.call_count == 1 126 | 127 | 128 | def test_50_live_messages(): 129 | print("Enter") 130 | global remaining_messages 131 | remaining_messages = 50 132 | 133 | def process_message(raw_message): 134 | global remaining_messages 135 | if raw_message[0] == '#': 136 | return 137 | message = parse(raw_message) 138 | print(f"{message['aprs_type']}: {raw_message}") 139 | if remaining_messages > 0: 140 | remaining_messages -= 1 141 | else: 142 | raise KeyboardInterrupt 143 | 144 | client = AprsClient(aprs_user='testuser', aprs_filter='') 145 | client.connect() 146 | try: 147 | client.run(callback=process_message, autoreconnect=True) 148 | except KeyboardInterrupt: 149 | pass 150 | finally: 151 | client.disconnect() 152 | -------------------------------------------------------------------------------- /tests/client/test_TelnetClient.py: -------------------------------------------------------------------------------- 1 | import unittest.mock as mock 2 | 3 | from ogn.client.client import TelnetClient 4 | 5 | 6 | @mock.patch('ogn.client.client.socket') 7 | def test_connect_disconnect(socket_mock): 8 | client = TelnetClient() 9 | client.connect() 10 | client.sock.connect.assert_called_once_with(('localhost', 50001)) 11 | 12 | client.disconnect() 13 | client.sock.shutdown.assert_called_once_with(0) 14 | client.sock.close.assert_called_once_with() 15 | 16 | 17 | @mock.patch('ogn.client.client.socket') 18 | def test_run(socket_mock): 19 | def callback(raw_message): 20 | raise ConnectionRefusedError 21 | 22 | client = TelnetClient() 23 | client.connect() 24 | 25 | client.run(callback=callback) 26 | -------------------------------------------------------------------------------- /tests/ddb/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glidernet/python-ogn-client/bb7c3c28c995533e41a8199133bc6532c7e11205/tests/ddb/__init__.py -------------------------------------------------------------------------------- /tests/ddb/test_utils.py: -------------------------------------------------------------------------------- 1 | from ogn.ddb import get_ddb_devices 2 | 3 | 4 | def test_get_ddb_devices(): 5 | devices = list(get_ddb_devices()) 6 | assert len(devices) > 4000 7 | assert len(devices[0].keys()), len(['device_type', 'device_id', 'aircraft_model', 'registration', 'cn', 'tracked', 'identified']) 8 | -------------------------------------------------------------------------------- /tests/parser/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glidernet/python-ogn-client/bb7c3c28c995533e41a8199133bc6532c7e11205/tests/parser/__init__.py -------------------------------------------------------------------------------- /tests/parser/parse/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glidernet/python-ogn-client/bb7c3c28c995533e41a8199133bc6532c7e11205/tests/parser/parse/__init__.py -------------------------------------------------------------------------------- /tests/parser/parse/test_comments.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime, timezone 2 | 3 | from ogn.parser import parse 4 | 5 | 6 | def test_comment(): 7 | raw_message = "# bad configured ogn receiver" 8 | message = parse(raw_message) 9 | 10 | assert message['comment'] == raw_message 11 | assert message['aprs_type'] == 'comment' 12 | 13 | 14 | def test_server_comment(): 15 | raw_message = "# aprsc 2.1.4-g408ed49 17 Mar 2018 09:30:36 GMT GLIDERN1 37.187.40.234:10152" 16 | message = parse(raw_message) 17 | 18 | assert message['version'] == '2.1.4-g408ed49' 19 | assert message['timestamp'] == datetime(2018, 3, 17, 9, 30, 36, tzinfo=timezone.utc) 20 | assert message['server'] == 'GLIDERN1' 21 | assert message['ip_address'] == '37.187.40.234' 22 | assert message['port'] == 10152 23 | assert message['aprs_type'] == 'server' 24 | -------------------------------------------------------------------------------- /tests/parser/parse/test_parse.py: -------------------------------------------------------------------------------- 1 | import unittest.mock as mock 2 | import pytest 3 | import os 4 | 5 | from datetime import datetime 6 | from time import sleep 7 | 8 | from ogn.parser.parse import parse 9 | from ogn.parser.exceptions import AprsParseError 10 | 11 | 12 | def _parse_valid_beacon_data_file(filename, beacon_type): 13 | with open(os.path.dirname(__file__) + '/../../../ogn-aprs-protocol/valid_messages/' + filename) as f: 14 | for line in f: 15 | if line.strip() == '': 16 | continue 17 | 18 | message = parse(line, datetime(2015, 4, 10, 17, 0)) 19 | assert message is not None 20 | if message['aprs_type'] == 'position' or message['aprs_type'] == 'status': 21 | assert message['beacon_type'] == beacon_type 22 | 23 | 24 | def test_flyxc_beacons(): 25 | _parse_valid_beacon_data_file(filename='FXCAPP_flyxc.txt', beacon_type='unknown') 26 | 27 | 28 | def test_adsb_beacons(): 29 | _parse_valid_beacon_data_file(filename='OGADSB_ADSB.txt', beacon_type='unknown') 30 | 31 | 32 | def test_adsl_beacons(): 33 | _parse_valid_beacon_data_file(filename='OGADSL_Tracker_with_ADSL.txt', beacon_type='unknown') 34 | 35 | 36 | def test_airmate_beacons(): 37 | _parse_valid_beacon_data_file(filename='OGAIRM_Airmate.txt', beacon_type='unknown') 38 | 39 | 40 | def test_apik_beacons(): 41 | _parse_valid_beacon_data_file(filename='OGAPIK_APIKdevice.txt', beacon_type='unknown') 42 | 43 | 44 | def test_capturs_beacons(): 45 | _parse_valid_beacon_data_file(filename='OGCAPT_Capturs.txt', beacon_type='capturs') 46 | 47 | 48 | def test_evario_beacons(): 49 | _parse_valid_beacon_data_file(filename='OGEVARIO_evario.txt', beacon_type='unknown') 50 | 51 | 52 | def test_flarm_beacons(): 53 | _parse_valid_beacon_data_file(filename='OGFLR_Flarm.txt', beacon_type='flarm') 54 | 55 | 56 | def test_flymaster_beacons(): 57 | _parse_valid_beacon_data_file(filename='OGFLYM_Flymaster.txt', beacon_type='flymaster') 58 | 59 | 60 | def test_inreach_beacons(): 61 | _parse_valid_beacon_data_file(filename='OGNINRE_InReach.txt', beacon_type='inreach') 62 | 63 | 64 | def test_lt24_beacons(): 65 | _parse_valid_beacon_data_file(filename='OGLT24_LiveTrack24.txt', beacon_type='lt24') 66 | 67 | 68 | def test_naviter_beacons(): 69 | _parse_valid_beacon_data_file(filename='OGNAVI_Naviter.txt', beacon_type='naviter') 70 | 71 | 72 | def test_delay_beacons(): 73 | _parse_valid_beacon_data_file(filename='OGNDELAY_Delay.txt', beacon_type='tracker') 74 | 75 | 76 | def test_wx_beacons(): 77 | _parse_valid_beacon_data_file(filename='OGNDVS_wx.txt', beacon_type='unknown') 78 | 79 | 80 | def test_nemo_beacons(): 81 | _parse_valid_beacon_data_file(filename='OGNEMO_Nemo.txt', beacon_type='unknown') 82 | 83 | 84 | def test_flying_neurons_beacons(): 85 | _parse_valid_beacon_data_file(filename='OGNFNO_FlyingNeurons.txt', beacon_type='unknown') 86 | 87 | 88 | def test_fanet_weather_beacons(): 89 | _parse_valid_beacon_data_file(filename='OGNFNT_Fanet_weather.txt', beacon_type='fanet') 90 | 91 | 92 | def test_fanet_beacons(): 93 | _parse_valid_beacon_data_file(filename='OGNFNT_Fanet.txt', beacon_type='fanet') 94 | 95 | 96 | def test_microtrack_beacons(): 97 | _parse_valid_beacon_data_file(filename='OGNMTK_Microtrack.txt', beacon_type='microtrak') 98 | 99 | 100 | def test_myc_tracker_beacons(): 101 | _parse_valid_beacon_data_file(filename='OGNMYC_OGNtracker.txt', beacon_type='unknown') 102 | 103 | 104 | def test_receiver_beacons(): 105 | _parse_valid_beacon_data_file(filename='OGNSDR_TCPIPmsgs.txt', beacon_type='receiver') 106 | 107 | 108 | def test_safesky_beacons(): 109 | _parse_valid_beacon_data_file(filename='OGNSKY_SafeSky.txt', beacon_type='safesky') 110 | 111 | 112 | def test_ognbase_beacons(): 113 | _parse_valid_beacon_data_file(filename='OGNSXR_OGNbase.txt', beacon_type='unknown') 114 | 115 | 116 | def test_tracker_beacons(): 117 | _parse_valid_beacon_data_file(filename='OGNTRK_OGNtracker.txt', beacon_type='tracker') 118 | 119 | 120 | def test_thethingsnetwork_beacons(): 121 | _parse_valid_beacon_data_file(filename='OGNTTN_TheThingsNetwork.txt', beacon_type='unknown') 122 | 123 | 124 | def test_wingman_beacons(): 125 | _parse_valid_beacon_data_file(filename='OGNWMN_Wingman.txt', beacon_type='unknown') 126 | 127 | 128 | def test_pilot_aware_beacons(): 129 | _parse_valid_beacon_data_file(filename='OGPAW_PilotAware.txt', beacon_type='pilot_aware') 130 | 131 | 132 | def test_skylines_beacons(): 133 | _parse_valid_beacon_data_file(filename='OGSKYL_Skylines.txt', beacon_type='skylines') 134 | 135 | 136 | def test_spider_beacons(): 137 | _parse_valid_beacon_data_file(filename='OGSPID_Spider.txt', beacon_type='spider') 138 | 139 | 140 | def test_spot_beacons(): 141 | _parse_valid_beacon_data_file(filename='OGSPOT_Spot.txt', beacon_type='spot') 142 | 143 | 144 | def test_generic_beacons(): 145 | message = parse("EPZR>WTFDSTCALL,TCPIP*,qAC,GLIDERN1:>093456h this is a comment") 146 | 147 | assert message['aprs_type'] == 'status' 148 | assert message['beacon_type'] == 'unknown' 149 | 150 | assert message['user_comment'] == "this is a comment" 151 | 152 | 153 | def test_fail_parse_none(): 154 | with pytest.raises(TypeError): 155 | parse(None) 156 | 157 | 158 | def test_fail_empty(): 159 | with pytest.raises(AprsParseError): 160 | parse("") 161 | 162 | 163 | def test_fail_validationassert(): 164 | with pytest.raises(AprsParseError): 165 | parse("notAValidString") 166 | 167 | 168 | def test_fail_bad_string(): 169 | with pytest.raises(AprsParseError): 170 | parse("Lachens>APRS,TCPIwontbeavalidstring") 171 | 172 | 173 | def test_v026_chile(): 174 | # receiver beacons from chile have a APRS position message with a pure user comment 175 | message = parse("VITACURA1>APRS,TCPIP*,qAC,GLIDERN4:/201146h3322.79SI07034.80W&/A=002329 Vitacura Municipal Aerodrome, Club de Planeadores Vitacura") 176 | assert message['user_comment'] == "Vitacura Municipal Aerodrome, Club de Planeadores Vitacura" 177 | 178 | message_with_id = parse("ALFALFAL>APRS,TCPIP*,qAC,GLIDERN4:/221830h3330.40SI07007.88W&/A=008659 Alfalfal Hidroelectric Plant, Club de Planeadores Vitacurs") 179 | assert message_with_id['user_comment'] == "Alfalfal Hidroelectric Plant, Club de Planeadores Vitacurs" 180 | 181 | 182 | @pytest.mark.skip(reason="FIXME: standalone it works, but on the CI it fails") 183 | @mock.patch('ogn.parser.parse_module.createTimestamp') 184 | def test_default_reference_date(createTimestamp_mock): 185 | valid_aprs_string = "Lachens>APRS,TCPIP*,qAC,GLIDERN2:/165334h4344.70NI00639.19E&/A=005435 v0.2.1 CPU:0.3 RAM:1764.4/2121.4MB NTP:2.8ms/+4.9ppm +47.0C RF:+0.70dB" 186 | 187 | parse(valid_aprs_string) 188 | call_args_before = createTimestamp_mock.call_args 189 | 190 | sleep(1) 191 | 192 | parse(valid_aprs_string) 193 | call_args_seconds_later = createTimestamp_mock.call_args 194 | 195 | assert call_args_before != call_args_seconds_later 196 | 197 | 198 | def test_no_receiver(): 199 | result = parse("EDFW>OGNSDR:/102713h4949.02NI00953.88E&/A=000984") 200 | 201 | assert result['aprs_type'] == 'position' 202 | assert result['beacon_type'] == 'receiver' 203 | 204 | assert result['name'] == 'EDFW' 205 | assert result['dstcall'] == 'OGNSDR' 206 | assert result.get('receiver_name') is None 207 | -------------------------------------------------------------------------------- /tests/parser/parse/test_position.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | from ogn.parser import parse 4 | from ogn.parser.exceptions import AprsParseError 5 | from ogn.parser.utils import FPM_TO_MS, HPM_TO_DEGS, KNOTS_TO_MS, KPH_TO_MS, FEETS_TO_METER 6 | 7 | 8 | def test_basic(): 9 | raw_message = r"FLRDDA5BA>APRS,qAS,LFMX:/160829h4415.41N/00600.03E'342/049/A=005524 this is a comment" 10 | message = parse(raw_message) 11 | 12 | assert message['aprs_type'] == 'position' 13 | assert message['beacon_type'] == 'unknown' 14 | 15 | assert message['name'] == "FLRDDA5BA" 16 | assert message['dstcall'] == "APRS" 17 | assert message['receiver_name'] == "LFMX" 18 | assert message['timestamp'].strftime('%H:%M:%S') == "16:08:29" 19 | assert message['latitude'] == 44.25683333333333 20 | assert message['symboltable'] == '/' 21 | assert message['longitude'] == 6.0005 22 | assert message['symbolcode'] == '\'' 23 | assert message['track'] == 342 24 | assert message['ground_speed'] == 49 * KNOTS_TO_MS / KPH_TO_MS 25 | assert message['altitude'] == 5524 * FEETS_TO_METER 26 | assert message['user_comment'] == "this is a comment" 27 | 28 | 29 | def test_v026_relay(): 30 | # beacons can be relayed 31 | raw_message = "FLRFFFFFF>OGNAVI,NAV07220E*,qAS,NAVITER:/092002h1000.00S/01000.00W'000/000/A=003281 !W00! id2820FFFFFF +300fpm +1.7rot" 32 | message = parse(raw_message) 33 | 34 | assert message['aprs_type'] == 'position' 35 | assert message['beacon_type'] == 'naviter' 36 | 37 | assert message['relay'] == "NAV07220E" 38 | 39 | 40 | def test_no_altitude(): 41 | # altitude is not a 'must have' 42 | raw_message = "FLRDDEEF1>OGCAPT,qAS,CAPTURS:/065511h4837.63N/00233.79E'000/000" 43 | message = parse(raw_message) 44 | 45 | assert message['aprs_type'] == 'position' 46 | assert message['beacon_type'] == 'capturs' 47 | 48 | assert message.get('altitude') is None 49 | 50 | 51 | def test_invalid_coordinates(): 52 | # sometimes the coordinates leave their valid range: -90<=latitude<=90 or -180<=longitude<=180 53 | with pytest.raises(AprsParseError): 54 | parse("RND000000>APRS,qAS,TROCALAN1:/210042h6505.31S/18136.75W^054/325/A=002591 !W31! idA4000000 +099fpm +1.8rot FL029.04 12.0dB 5e -6.3kHz gps11x17") 55 | 56 | with pytest.raises(AprsParseError): 57 | parse("RND000000>APRS,qAS,TROCALAN1:/210042h9505.31S/17136.75W^054/325/A=002591 !W31! idA4000000 +099fpm +1.8rot FL029.04 12.0dB 5e -6.3kHz gps11x17") 58 | 59 | 60 | def test_invalid_timestamp(): 61 | with pytest.raises(AprsParseError): 62 | parse("OGND4362A>APRS,qAS,Eternoz:/194490h4700.25N/00601.47E'003/063/A=000000 !W22! id07D4362A 0fpm +0.0rot FL000.00 2.0dB 3e -2.8kHz gps3x4 +12.2dBm") 63 | 64 | with pytest.raises(AprsParseError): 65 | parse("Ulrichamn>APRS,TCPIP*,qAC,GLIDERN1:/194490h5747.30NI01324.77E&/A=001322") 66 | 67 | 68 | def test(): 69 | raw_message = r"FLRDDEEF1>OGCAPT,qAS,CAPTURS:/065511h4837.63N/00233.79E'255/045/A=003399 !W03! id06DDFAA3 -613fpm -3.9rot 22.5dB 7e -7.0kHz gps3x7 s7.07 h41 rD002F8" 70 | message = parse(raw_message) 71 | 72 | assert message['aprs_type'] == 'position' 73 | assert message['beacon_type'] == 'capturs' 74 | 75 | assert message['name'] == "FLRDDEEF1" 76 | assert message['dstcall'] == "OGCAPT" 77 | assert message['receiver_name'] == "CAPTURS" 78 | assert message['timestamp'].strftime('%H:%M:%S') == "06:55:11" 79 | assert message['latitude'] == 48.62716666666667 80 | assert message['longitude'] == 2.5632166666666665 81 | assert message['symboltable'] == '/' 82 | assert message['symbolcode'] == '\'' 83 | assert message['track'] == 255 84 | assert message['ground_speed'] == 45 * KNOTS_TO_MS / KPH_TO_MS 85 | assert message['altitude'] == 3399 * FEETS_TO_METER 86 | 87 | assert message['address_type'] == 2 88 | assert message['aircraft_type'] == 1 89 | assert message['stealth'] is False 90 | assert message['no-tracking'] is False 91 | assert message['address'] == 'DDFAA3' 92 | assert message['climb_rate'] == -613 * FPM_TO_MS 93 | assert message['turn_rate'] == -3.9 * HPM_TO_DEGS 94 | assert message['signal_quality'] == 22.5 95 | assert message['error_count'] == 7 96 | assert message['frequency_offset'] == -7.0 97 | assert message['gps_quality'] == '3x7' 98 | assert message['software_version'] == 7.07 99 | assert message['hardware_version'] == 65 100 | assert message['real_address'] == 'D002F8' 101 | -------------------------------------------------------------------------------- /tests/parser/parse/test_position_weather.py: -------------------------------------------------------------------------------- 1 | from ogn.parser import parse 2 | from ogn.parser.utils import KNOTS_TO_MS, KPH_TO_MS, INCH_TO_MM, fahrenheit_to_celsius 3 | 4 | 5 | def test_v028_fanet_position_weather(): 6 | # with v0.2.8 fanet devices can report weather data 7 | raw_message = 'FNTFC9002>OGNFNT,qAS,LSXI2:/163051h4640.33N/00752.21E_187/004g007t075h78b63620 29.0dB -8.0kHz' 8 | message = parse(raw_message) 9 | 10 | assert message['aprs_type'] == 'position_weather' 11 | assert message['beacon_type'] == 'fanet' 12 | 13 | assert message['wind_direction'] == 187 14 | assert message['wind_speed'] == 4 * KNOTS_TO_MS / KPH_TO_MS 15 | assert message['wind_speed_peak'] == 7 * KNOTS_TO_MS / KPH_TO_MS 16 | assert message['temperature'] == fahrenheit_to_celsius(75) 17 | assert message['humidity'] == 78 * 0.01 18 | assert message['barometric_pressure'] == 63620 19 | 20 | assert message['signal_quality'] == 29.0 21 | assert message['frequency_offset'] == -8.0 22 | 23 | 24 | def test_GXAirCom_fanet_position_weather_rainfall(): 25 | raw_message = 'FNT08F298>OGNFNT,qAS,DREIFBERG:/082654h4804.90N/00845.74E_273/005g008t057r123p234h90b10264 0.0dB' 26 | message = parse(raw_message) 27 | 28 | assert message['aprs_type'] == 'position_weather' 29 | assert message['beacon_type'] == 'fanet' 30 | 31 | assert message['rainfall_1h'] == 123 / 100 * INCH_TO_MM 32 | assert message['rainfall_24h'] == 234 / 100 * INCH_TO_MM 33 | -------------------------------------------------------------------------------- /tests/parser/parse/test_status.py: -------------------------------------------------------------------------------- 1 | from ogn.parser import parse 2 | 3 | 4 | def test_v025(): 5 | # introduced the "aprs status" format where many informations (lat, lon, alt, speed, ...) are just optional 6 | raw_message = "EPZR>APRS,TCPIP*,qAC,GLIDERN1:>093456h this is a comment" 7 | message = parse(raw_message) 8 | 9 | assert message['aprs_type'] == 'status' 10 | assert message['beacon_type'] == 'unknown' 11 | 12 | assert message['name'] == "EPZR" 13 | assert message['receiver_name'] == "GLIDERN1" 14 | assert message['timestamp'].strftime('%H:%M:%S') == "09:34:56" 15 | assert message['user_comment'] == "this is a comment" 16 | 17 | 18 | def test(): 19 | raw_message = "EPZR>APRS,TCPIP*,qAC,GLIDERN1:>093456h v0.2.7.RPI-GPU CPU:0.7 RAM:770.2/968.2MB NTP:1.8ms/-3.3ppm +55.7C 7/8Acfts[1h] RF:+54-1.1ppm/-0.16dB/+7.1dB@10km[19481]/+16.8dB@10km[7/13]" 20 | message = parse(raw_message) 21 | 22 | assert message['aprs_type'] == 'status' 23 | assert message['beacon_type'] == 'unknown' 24 | 25 | assert message['name'] == "EPZR" 26 | assert message['receiver_name'] == "GLIDERN1" 27 | assert message['timestamp'].strftime('%H:%M:%S') == "09:34:56" 28 | assert message['version'] == "0.2.7" 29 | assert message['platform'] == "RPI-GPU" 30 | assert message['cpu_load'] == 0.7 31 | assert message['free_ram'] == 770.2 32 | assert message['total_ram'] == 968.2 33 | assert message['ntp_error'] == 1.8 34 | assert message['rt_crystal_correction'] == -3.3 35 | assert message['cpu_temp'] == 55.7 36 | assert message['senders_visible'] == 7 37 | assert message['senders_total'] == 8 38 | assert message['rec_crystal_correction'] == 54 39 | assert message['rec_crystal_correction_fine'] == -1.1 40 | assert message['rec_input_noise'] == -0.16 41 | assert message['senders_signal'] == 7.1 42 | assert message['senders_messages'] == 19481 43 | assert message['good_senders_signal'] == 16.8 44 | assert message['good_senders'] == 7 45 | assert message['good_and_bad_senders'] == 13 46 | -------------------------------------------------------------------------------- /tests/parser/test_parse_telnet.py: -------------------------------------------------------------------------------- 1 | import unittest.mock as mock 2 | import pytest 3 | 4 | from datetime import datetime 5 | 6 | from ogn.parser.telnet_parser import parse 7 | from ogn.parser.exceptions import AprsParseError 8 | 9 | 10 | @pytest.mark.skip("Not yet implemented") 11 | def test_telnet_fail_corrupt(): 12 | with pytest.raises(AprsParseError): 13 | parse('This is rubbish') 14 | 15 | 16 | @mock.patch('ogn.parser.telnet_parser.datetime') 17 | def test_telnet_parse_complete(datetime_mock): 18 | # set the now-mock near to the time in the test string 19 | datetime_mock.now.return_value = datetime(2015, 1, 1, 10, 0, 55) 20 | 21 | message = parse('0.181sec:868.394MHz: 1:2:DDA411 103010: [ +50.86800, +12.15279]deg 988m +0.1m/s 25.7m/s 085.4deg -3.5deg/sec 5 03x04m 01f_-12.61kHz 5.8/15.5dB/2 10e 30.9km 099.5deg +1.1deg + ? R B8949') 22 | 23 | assert message['pps_offset'] == 0.181 24 | assert message['frequency'] == 868.394 25 | assert message['aircraft_type'] == 1 26 | assert message['address_type'] == 2 27 | assert message['address'] == 'DDA411' 28 | assert message['timestamp'] == datetime(2015, 1, 1, 10, 30, 10) 29 | assert message['latitude'] == 50.868 30 | assert message['longitude'] == 12.15279 31 | assert message['altitude'] == 988 32 | assert message['climb_rate'] == 0.1 33 | assert message['ground_speed'] == 25.7 34 | assert message['track'] == 85.4 35 | assert message['turn_rate'] == -3.5 36 | assert message['magic_number'] == 5 # the '5' is a magic number... 1 if ground_speed is 0.0m/s an 3 or 5 if airborne. Do you have an idea what it is? 37 | assert message['gps_status'] == '03x04' 38 | assert message['channel'] == 1 39 | assert message['flarm_timeslot'] is True 40 | assert message['ogn_timeslot'] is False 41 | assert message['frequency_offset'] == -12.61 42 | assert message['decode_quality'] == 5.8 43 | assert message['signal_quality'] == 15.5 44 | assert message['demodulator_type'] == 2 45 | assert message['error_count'] == 10 46 | assert message['distance'] == 30.9 47 | assert message['bearing'] == 99.5 48 | assert message['phi'] == 1.1 49 | assert message['multichannel'] is True 50 | 51 | 52 | def test_telnet_parse_corrupt(): 53 | message = parse('0.397sec:868.407MHz: sA:1:784024 205656: [ +5.71003, +20.48951]deg 34012m +14.5m/s 109.7m/s 118.5deg +21.0deg/sec 0 27x40m 01_o +7.03kHz 17.2/27.0dB/2 12e 4719.5km 271.1deg -8.5deg ? R B34067') 54 | 55 | assert message is None 56 | -------------------------------------------------------------------------------- /tests/parser/test_utils.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | from datetime import datetime, timezone 3 | 4 | from ogn.parser.utils import parseAngle, createTimestamp, CheapRuler, normalized_quality 5 | 6 | 7 | def _proceed_test_data(test_data={}): 8 | for test in test_data: 9 | timestamp = createTimestamp(test[0], reference_timestamp=test[1]) 10 | assert timestamp == test[2] 11 | 12 | 13 | def test_parseAngle(): 14 | assert parseAngle('05048.30') == 50.805 15 | 16 | 17 | def test_createTimestamp_hhmmss(): 18 | test_data = [ 19 | ('000001h', datetime(2015, 1, 10, 0, 0, 1), datetime(2015, 1, 10, 0, 0, 1)), # packet from current day (on the tick) 20 | ('235959h', datetime(2015, 1, 10, 0, 0, 1), datetime(2015, 1, 9, 23, 59, 59)), # packet from previous day (2 seconds old) 21 | ('110000h', datetime(2015, 1, 10, 0, 0, 1), datetime(2015, 1, 10, 11, 0, 0)), # packet 11 hours from future or 13 hours old 22 | ('123500h', datetime(2015, 1, 10, 23, 50, 0), datetime(2015, 1, 10, 12, 35, 0)), # packet from current day (11 hours old) 23 | ('000001h', datetime(2015, 1, 10, 23, 50, 0), datetime(2015, 1, 11, 0, 0, 1)), # packet from next day (11 minutes from future) 24 | ] 25 | 26 | _proceed_test_data(test_data) 27 | 28 | 29 | def test_createTimestamp_ddhhmm(): 30 | test_data = [ 31 | ('011212z', datetime(2017, 9, 28, 0, 0, 1), datetime(2017, 10, 1, 12, 12, 0)), # packet from 1st of month, received on september 28th, 32 | ('281313z', datetime(2017, 10, 1, 0, 0, 1), datetime(2017, 9, 28, 13, 13, 0)), # packet from 28th of month, received on october 1st, 33 | ('281414z', datetime(2017, 1, 1, 0, 0, 1), datetime(2016, 12, 28, 14, 14, 0)), # packet from 28th of month, received on january 1st, 34 | ] 35 | 36 | _proceed_test_data(test_data) 37 | 38 | 39 | def test_createTimestamp_tzinfo(): 40 | test_data = [ 41 | ('000001h', datetime(2020, 9, 10, 0, 0, 1, tzinfo=timezone.utc), (datetime(2020, 9, 10, 0, 0, 1, tzinfo=timezone.utc))) 42 | ] 43 | 44 | _proceed_test_data(test_data) 45 | 46 | 47 | def test_cheap_ruler_distance(): 48 | koenigsdf = (11.465353, 47.829825) 49 | hochkoenig = (13.062405, 47.420516) 50 | 51 | cheap_ruler = CheapRuler((koenigsdf[1] + hochkoenig[1]) / 2) 52 | distance = cheap_ruler.distance(koenigsdf, hochkoenig) 53 | assert distance == pytest.approx(128381.47612138899) 54 | 55 | 56 | def test_cheap_ruler_bearing(): 57 | koenigsdf = (11.465353, 47.829825) 58 | hochkoenig = (13.062405, 47.420516) 59 | 60 | cheap_ruler = CheapRuler((koenigsdf[1] + hochkoenig[1]) / 2) 61 | bearing = cheap_ruler.bearing(koenigsdf, hochkoenig) 62 | assert bearing == pytest.approx(110.761300063515) 63 | 64 | 65 | def test_normalized_quality(): 66 | assert normalized_quality(10000, 1) == pytest.approx(1) 67 | assert normalized_quality(20000, 10) == pytest.approx(16.020599913279625) 68 | assert normalized_quality(5000, 5) == pytest.approx(-1.0205999132796242) 69 | --------------------------------------------------------------------------------