KML 2 GPX for Private Radar extractions
Converts KML files from Private Radar flights list to a GPX file usable with, for example, ayvri.
KML input
-
Export a Private Radar flight in KML format. It will contain 2 layers:
AltitudeandElevation. We will only keepAltitudein the GPX file. -
Note the total start and end times of the flight (not the block times)
-
Run the converter:
python -m kml2gpx \ kml \ --input ${INPUT_KML_FILE} \ --output ${OUTPUT_GPX_FILE} \ --start ${FLIGHT_START_DATETIME} \ --end ${FLIGHT_END_DATETIME}
- If multiple input files are given, there must be as many start and end times. The results will be stored in a single file.
- If output is not given, it will be the (first) input file name with the
.gpxextension. - Start and end date times must be in ISO format, for example:
2022-06-06T10:53:00+02:00 - As the time at each point is missing from the exported KML file, we consider all points being equally spread between the start and end time. (I know it's not the case)
For example:
python -m kml2gpx.main \
kml \
--input LFLG-LFLW.kml \
--start 2022-06-06T08:47:00 \
--end 2022-06-06T10:53:00
Private Radar input
This requires to know how to extract a token from your browser.
-
Get the details to connect Private Radar instance:
-
The base URL is, for example,
https://xxx.private-radar.com/wherexxxis the name of your aero club. -
To get your authentication token:
- Log into your Private Radar instance
- Open the developer web console in your browser (F12 on Windows)
- Open the
Networktab in the web console - Refresh the Private Radar page
- In the
Networktab, click on any line where the first column starts withget(get,get_aircraft, ...) - In the
Headersof that query, look at theRequest headersand copy the value ofAuthorizationfield
-
-
Create a file named
kml2gpx.iniwith the following content:[PRIVATE_RADAR] url = <base URL to Private Radar> token = <Authorization token>
For example:
[PRIVATE_RADAR] url = https://xxx.private-radar.com/ token = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The file can be stored in your home directory or in the working directory of the converter.
-
You can then:
-
List the last flights using:
python -m kml2gpx private-radar --list --nb 50
-
Extract the GPX of a specific flight, using its ID
python -m kml2gpx private-radar --flight XXXXXX
-
Extract the GPX of one of last flights, using a negative ID: -1 for the last flight, -2 for the flight before, ...
python -m kml2gpx private-radar --flight -1
-
Work in progress
- Prepare a basic UI supporting both Private Radar listings and drag & drop.
- Use an authentication process to get the authorization token automatically
Metadata
Release files for kml2gpx 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kml2gpx-0.0.1.tar.gz | 19.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kml2gpx-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.4 kB
Release files / kml2gpx-0.0.1.tar.gz
| Download URL | kml2gpx-0.0.1.tar.gz |
|---|---|
| Size | 19.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04a4f88190bca61c9ddb41ae1b28243c83f6deaa6264ce262cee1eda861e90b0
|
|
BLAKE2b-256 checksum How to use checksums |
af4011222aa6cc1af20fa048b31ccbaf5017881c1529a0c4616efbedf55d6789
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.7
|
Release files / kml2gpx-0.0.1-py3-none-any.whl
| Download URL | kml2gpx-0.0.1-py3-none-any.whl |
|---|---|
| Size | 21.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ae7968e6259d53384490fa3f58efd69d9c58df4bed68a89e78f35ad394cf764
|
|
BLAKE2b-256 checksum How to use checksums |
c666ff084154741e67d83ce4bc162f8a92a59ca8782c78d9bbee44ff44e6bbc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.7
|