drone-path 0.0.0-stage → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/CHANGELOG.md +179 -0
  2. package/LICENSE +21 -0
  3. package/README.md +84 -2
  4. package/THIRD-PARTY-NOTICES.md +77 -0
  5. package/app/main.mjs +496 -0
  6. package/app/preload.cjs +31 -0
  7. package/app/update-policy.d.mts +6 -0
  8. package/app/update-policy.mjs +6 -0
  9. package/app/update.d.mts +10 -0
  10. package/app/update.mjs +54 -0
  11. package/bin/drone-path.mjs +5 -0
  12. package/dist/appassets.js +44 -0
  13. package/dist/apppaths.js +28 -0
  14. package/dist/appsession.js +128 -0
  15. package/dist/appstate.js +109 -0
  16. package/dist/assets.js +67 -0
  17. package/dist/cammeta.js +292 -0
  18. package/dist/changeset-gate.js +46 -0
  19. package/dist/cli.js +156 -0
  20. package/dist/config.js +469 -0
  21. package/dist/configfile.js +81 -0
  22. package/dist/decimate.js +94 -0
  23. package/dist/errors.js +4 -0
  24. package/dist/exportjob.js +106 -0
  25. package/dist/ff.js +121 -0
  26. package/dist/fftools.js +65 -0
  27. package/dist/geo.js +70 -0
  28. package/dist/inputs.js +59 -0
  29. package/dist/manual/anchors.js +23 -0
  30. package/dist/manual/build.js +78 -0
  31. package/dist/manual/cliref.js +36 -0
  32. package/dist/manual/links.js +76 -0
  33. package/dist/manual/markdown.js +101 -0
  34. package/dist/manual/model.js +4 -0
  35. package/dist/manual/module.js +8 -0
  36. package/dist/manual/nav.js +13 -0
  37. package/dist/manual/reference.js +26 -0
  38. package/dist/page.js +108 -0
  39. package/dist/paths.js +28 -0
  40. package/dist/plan.js +119 -0
  41. package/dist/png.js +52 -0
  42. package/dist/proto.js +102 -0
  43. package/dist/range.js +58 -0
  44. package/dist/render.js +408 -0
  45. package/dist/renderer/boot.js +7 -0
  46. package/dist/renderer/dom.js +132 -0
  47. package/dist/renderer/framemath.js +34 -0
  48. package/dist/renderer/leaflet.js +5 -0
  49. package/dist/renderer/scene.js +358 -0
  50. package/dist/renderer/theme.js +34 -0
  51. package/dist/renderer/tilesources.js +34 -0
  52. package/dist/renderer/trail.js +53 -0
  53. package/dist/restyle.js +24 -0
  54. package/dist/run.js +446 -0
  55. package/dist/serve.js +70 -0
  56. package/dist/srt.js +76 -0
  57. package/dist/summary.js +22 -0
  58. package/dist/telemetry-math.js +302 -0
  59. package/dist/telemetry.js +38 -0
  60. package/dist/tilecache.js +26 -0
  61. package/dist/tiles.js +241 -0
  62. package/dist/tracing.js +208 -0
  63. package/dist/version.js +3 -0
  64. package/package.json +100 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,179 @@
1
+ # drone-path
2
+
3
+ ## 0.8.0
4
+
5
+ - **New:** The tool is now called **Drone Path**. The rename is a clean
6
+ break with no compatibility aliases — on upgrade, use the `drone-path`
7
+ command (previously `neo2-flightpath`), move the config file to
8
+ `.dronepath.json` (from `.neo2flightpath.json`), and rename the tile-cache
9
+ environment variable to `DRONEPATH_TILE_CACHE` (from
10
+ `NEO2_FLIGHTPATH_TILE_CACHE`). The per-user data directory moves to
11
+ `drone-path`, leaving the old one behind.
12
+ - **New:** The desktop app ships as "Drone Path" under a new app identity.
13
+ Installed apps do not auto-update in place — uninstall the old version
14
+ and install the new one.
15
+
16
+ ## 0.7.0
17
+
18
+ - **New:** The desktop player is now a synchronized video-and-map review
19
+ workspace: dedicated footage and flight-map panes with a swappable overlay
20
+ layout, a bare map sidebar with a map appearance popover, and a timeline of
21
+ square preview stills spread from the first frame to the last with a
22
+ draggable loop band and icon-only loop controls. The transport controls sit
23
+ centered under the footage.
24
+ - **New:** The app opens straight into the review workspace — the landing
25
+ screen is gone and no tile warm-up stands between the user and the footage.
26
+ Before a recording is loaded the workspace shows its disabled controls with
27
+ an accent **Open…** call to action in the footage pane, a quiet "No
28
+ telemetry yet" map pane and a "No recording loaded" status bar. A picked
29
+ recording loads right into the player, with map tiles streaming on demand
30
+ (rendering and exporting still prefetch their tiles beforehand).
31
+ - **New:** The export dialog is wider and shows a map-only output preview at
32
+ the export's exact size, with range, output-size and encoding choices
33
+ clearly separated and the familiar destination, progress, cancel, done and
34
+ error states beside the preview.
35
+ - **New:** New color scheme: dark neutral surfaces with a warm coral accent,
36
+ sand loop state and warmer semantic tones, plus one shared accent-colored
37
+ flight trail in the map island and in rendered frames.
38
+ - **New:** The app icon is the final branded artwork: a circular drone badge
39
+ rasterized to a metadata-free 512x512 master and re-derived for every
40
+ platform format (Windows ICO, Linux icon set).
41
+ - **Fixed:** Loading a second recording now switches the footage and the
42
+ filmstrip to the new recording instead of replaying the previous one's bytes
43
+ from a URL-keyed cache.
44
+
45
+ ## 0.6.1
46
+
47
+ - **Fixed:** Maintenance release with updated dependencies that contain
48
+ security fixes.
49
+
50
+ ## 0.6.0
51
+
52
+ - **New:** Renders and exports no longer need a local ffmpeg install:
53
+ static ffmpeg and ffprobe 7.1.0 binaries ship with the desktop app and
54
+ the npm package. `--ffmpeg <path>` and `--ffprobe <path>` override
55
+ them, PATH remains a fallback, and installing downloads both tools in
56
+ a postinstall step (~250 MB).
57
+ - **New:** The export dialog and the CLI now configure the encoder:
58
+ video codec (H.264 or H.265), quality (near-lossless down to low) and
59
+ encoding speed. The defaults reproduce the previous output exactly.
60
+ - **New:** The export dialog opens on the In–Out segment when a loop is
61
+ set and keeps the output size for the session.
62
+ - **Fixed:** Dialogs now manage keyboard focus: opening a dialog moves
63
+ focus onto it, closing hands it back to the control that opened it.
64
+
65
+ ## 0.5.0
66
+
67
+ - **New:** The player opens as soon as the map tiles around the drone at
68
+ the first frame are warm; the remaining tiles the map can show keep
69
+ loading into the cache behind a small "Warming tiles…" hint, and
70
+ changing the map style, zoom or view moves the loading onto the new
71
+ plan.
72
+ - **New:** The settings panel's look — map style, view, zoom, intro/outro
73
+ and HUD chips — is remembered between launches, and the Open dialog
74
+ starts in the folder the last recording was opened from. A fresh
75
+ install, or a state file the app cannot read, starts at the documented
76
+ defaults.
77
+ - **New:** Help now opens a full offline user manual inside the app —
78
+ how playback, settings and export fit together, keyboard shortcuts and
79
+ a CLI/config reference — from the landing card and the control bar.
80
+ - **Fixed:** All tile downloads share one polite queue, so the combined
81
+ request rate stays inside the 2-per-second tile budget even when
82
+ several loading lanes run at once.
83
+ - **Fixed:** Tile cache write failures (a full disk, an unwritable
84
+ cache, a cache path that is not a directory) now fail the affected
85
+ tile with an error naming the cache instead of silently degrading to a
86
+ placeholder.
87
+
88
+ ## 0.4.0
89
+
90
+ - **New:** The desktop app now updates itself from GitHub Releases:
91
+ packaged builds download a newer version in the background and ask
92
+ once whether to restart into it. Windows releases gain a self-updating
93
+ NSIS installer next to the portable exe (which never self-updates).
94
+ - **Fixed:** Escape now closes the Settings and Export dialogs even
95
+ while a select field is focused: the first Escape is still reserved
96
+ for the select's own dropdown, and the second one closes the dialog.
97
+ - **Fixed:** The export dialog's Width and Height fields now show
98
+ exactly what the export renders: typing an odd size and leaving the
99
+ field commits the even size (rounded down, at least 64 px), so the
100
+ fields, the export and the done summary always agree.
101
+ - **Fixed:** The preparation progress bar no longer shrinks mid-load:
102
+ its percent now grows monotonically to 100 across probing, telemetry,
103
+ view planning and the tile pre-warm.
104
+ - **Fixed:** The map trail now grows with playback and ends at the
105
+ drone: the flown path is drawn up to the current frame's position
106
+ instead of stalling on the decimated points, so the trail appears and
107
+ grows on every recording (including hovering and straight flights) in
108
+ the app and exported overlays alike.
109
+ - **Internal:** The test tree is type-checked before the unit tests
110
+ run, and the OpenTelemetry packages are up to date.
111
+
112
+ ## 0.3.0
113
+
114
+ - **New:** The desktop app — pick a recording and watch its flight path on a
115
+ map in sync with the footage, one shared timeline scrubber and a swappable
116
+ picture-in-picture layout. It ships as a Windows portable executable and a
117
+ Linux AppImage, with its own application icon and the window title
118
+ "Neo2 Flightpath".
119
+ - **New:** Export the look you see: a modal renders the preview as a video,
120
+ the full recording or the In–Out loop segment at a chosen size, written
121
+ through a native save dialog. Exports run as one cancelable job and are
122
+ verified before they replace the chosen file, so a failed or canceled
123
+ export never touches an existing file; "Reveal in folder" and "Open video"
124
+ act on the exported file, and a refused cancel explains itself.
125
+ - **New:** Playback and review: speed 1x–4x, a loop region with I/O points
126
+ that auto-engage and wrap on repeat (Esc or Clear to remove), and keyboard
127
+ shortcuts for play/pause, speed, frame stepping, one-second jumps and
128
+ swapping the views. Seeking is frame-exact: End reaches the last frame and
129
+ every step lands exactly where requested.
130
+ - **New:** A settings panel (cog button): map style, view, zoom/zoom-out,
131
+ intro/outro seconds and HUD chips mirror the CLI options and restyle the
132
+ preview instantly, fetching any missing map tiles on demand. The alt chip
133
+ hides itself when the telemetry has no altitude.
134
+ - **New:** Preparation progress on the landing card: a bar that advances one
135
+ step per preparation stage and per warmed map tile, and the status notice
136
+ names the running stage.
137
+ - **New:** Errors and progress read as plain sentences with the original
138
+ system text under "Technical details", and the control bar fits the
139
+ 1024×600 minimum window.
140
+ - **New:** The map trail is drawn with one incremental update in the app and
141
+ the CLI alike; the `--trail` option is removed — drop the `trail` key from
142
+ config files.
143
+ - **Fixed:** One rule now counts GPS fixes in every telemetry source: exactly
144
+ (0, 0) is the no-lock placeholder, so near-equator and near-prime-meridian
145
+ coordinates count as fixes again, and fix counts agree between the SRT
146
+ sidecar and camera metadata. Frames after the last GPS fix hold that fix
147
+ instead of jumping back to the flight's start.
148
+ - **Fixed:** ffmpeg/ffprobe failures surface their real cause instead of a
149
+ false "no telemetry found", mistyped numbers in config files fail fast
150
+ naming the option instead of being silently coerced, and odd canvas
151
+ dimensions normalize to even.
152
+ - **Fixed:** On Windows, output names differing only in case are one file —
153
+ collision suffixing and the overwrite guard agree on it (on Linux and macOS
154
+ they stay two distinct names).
155
+ - **Internal:** The app and the headless CLI share one map renderer, and CLI
156
+ output stays frame-exact. Option defaults live in one table, the
157
+ `--out-dir` default is documented as the `out` folder, CLI help names the
158
+ offending flag, and the agent helpers move project statuses past the first
159
+ result page.
160
+
161
+ ## 0.2.0
162
+
163
+ - **New:** See where render time goes — opt-in OpenTelemetry traces for the
164
+ render pipeline via `OTEL_EXPORTER_OTLP_ENDPOINT` (OTLP/HTTP protobuf);
165
+ nothing is loaded or sent without it.
166
+ - **Internal:** Release notes are now curated for users; Dependabot keeps
167
+ `@types/node` on the Node 24 line.
168
+
169
+ ## 0.1.1
170
+
171
+ - **Internal:** Code base restructuring and README improvements.
172
+
173
+ ## 0.1.0
174
+
175
+ - **New:** First release — flight-path map overlay videos from DJI drone
176
+ recordings at exactly the source frame rate and frame count, with telemetry
177
+ from the `.SRT` sidecar or the embedded CAM-meta (DVTM) stream; `satellite`
178
+ and `topo` map styles, batch processing, config file support, `--json`
179
+ summaries and `out` as the default output directory.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Manuel Warum
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,85 @@
1
- # Temporary Holding Version
1
+ # Drone Path
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ This handy little tool allows you to render flight-path map videos
4
+ from DJI drone recordings (DJI Neo 2 and similar).
5
+
6
+ I wanted a tool to render the actual flight-path on a 2d map,
7
+ so that I can overlay it in the actual footage of my drone flight
8
+ videos.
9
+
10
+ Currently, it supports two main ways to acquire the geo-coordinates from
11
+ DJI's telemetry:
12
+
13
+ - if an `.SRT` sidecar is available, that will be used,
14
+ - otherwise it tries to parse the embedded `CAM` meta stream (DJI's protobuf format).
15
+
16
+ It is a CLI tool, since I plan to support agentic use cases.
17
+ Meaning, if an agent wants to use it to help you create flight-path videos,
18
+ that's all cool with me.
19
+
20
+ For us humans, there is a desktop app (see *Desktop app*): it opens a window
21
+ where you pick a recording and watch its flight path on the map in sync with
22
+ the footage. The player opens as soon as the map tiles around the drone are
23
+ ready and the rest of the map keeps loading in the background.
24
+
25
+ ## Quick start
26
+
27
+ ```sh
28
+ # from GitHub
29
+ npx github:MrManny/neo2-flightpath "my-flight.mp4"
30
+
31
+ # from npm
32
+ npx drone-path "my-flight.mp4"
33
+
34
+ # topographic map, altitude + speed HUD
35
+ npx drone-path "my-flight.mp4" --style topo --hud heading,alt,speed
36
+ ```
37
+
38
+ Output lands in the `out/` folder as `<basename>_map.mp4`; both the folder
39
+ and the name are configurable. This needs Node.js 24 or newer and
40
+ ffmpeg/ffprobe — bundled with the desktop app and the npm package,
41
+ overridable via `--ffmpeg`/`--ffprobe`, with a `PATH` fallback; all
42
+ requirements and install options are in
43
+ [Getting started](docs/user/getting-started.md).
44
+
45
+ ## Documentation
46
+
47
+ The user manual lives in [docs/user/](docs/user/README.md); the desktop app
48
+ ships the same pages as offline help. Highlights:
49
+
50
+ - [Getting started](docs/user/getting-started.md) — requirements, install options, and your first render.
51
+ - [Desktop app](docs/user/desktop-app.md) — loading a recording, reviewing a flight, and exporting video from the app.
52
+ - [Keyboard shortcuts](docs/user/keyboard-shortcuts.md) — every shortcut of the review player at a glance.
53
+ - [CLI usage](docs/user/cli.md) — inputs, examples, and example output.
54
+ - [CLI and config reference](docs/user/cli-reference.md) — every option and config key with its default.
55
+ - [Config file](docs/user/config-file.md) — where `.dronepath.json` is found and how defaults apply.
56
+ - [Tiles and attribution](docs/user/tiles-and-attribution.md) — map sources, attribution, and tile caching.
57
+
58
+ ## Desktop app
59
+
60
+ For reviewing flights without the terminal, grab the packaged desktop app
61
+ (Windows NSIS installer or portable exe, Linux AppImage) from
62
+ [GitHub Releases](https://github.com/MrManny/neo2-flightpath/releases), or run
63
+ `npm run build && npm run app` from a checkout.
64
+
65
+ The app shows the footage and the synchronized flight map side by side —
66
+ swappable to a map overlay — on one shared timeline;
67
+ [the manual](docs/user/desktop-app.md) walks through loading a recording,
68
+ reviewing a flight, looping a passage, and exporting. The look settings carry
69
+ over between launches.
70
+
71
+ ![Desktop app: drone footage beside the synchronized flight map](docs/images/app-main-window.jpg)
72
+
73
+ *The desktop app playing a recording: footage beside the synchronized flight map,
74
+ with the flight trail, drone position and HUD chips on one shared timeline.*
75
+
76
+ ## Feature requests
77
+
78
+ If you want or need specific features, feel free to open an issue in this
79
+ repository's issue tracker.
80
+ I plan to maintain this project for a good bit, and hopefully making it more
81
+ useful for people in the long run.
82
+
83
+ ## License
84
+
85
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,77 @@
1
+ # Third-party notices
2
+
3
+ This repository vendors two icons from the [Lucide](https://lucide.dev) icon
4
+ set as TypeScript components under `ui/icons/`: `CloseIcon` ("x") and
5
+ `SettingsIcon` ("settings"). They are used unmodified except for JSX
6
+ serialization and fixed sizing. The ISC License below applies to both; the MIT
7
+ License additionally applies to `CloseIcon` ("x"), which Lucide derives from
8
+ the Feather project. The other glyphs under `ui/icons/` are original work in
9
+ the Lucide style and are not covered by these licenses.
10
+
11
+ ## Lucide — ISC License
12
+
13
+ Copyright (c) 2026 Lucide Icons and Contributors
14
+
15
+ Permission to use, copy, modify, and/or distribute this software for any
16
+ purpose with or without fee is hereby granted, provided that the above
17
+ copyright notice and this permission notice appear in all copies.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
20
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
21
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
22
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
23
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
24
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
25
+ PERFORMANCE OF THIS SOFTWARE.
26
+
27
+ ## Feather (icons derived from it) — MIT License
28
+
29
+ Copyright (c) 2013-present Cole Bemis
30
+
31
+ Permission is hereby granted, free of charge, to any person obtaining a copy
32
+ of this software and associated documentation files (the "Software"), to deal
33
+ in the Software without restriction, including without limitation the rights
34
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
35
+ copies of the Software, and to permit persons to whom the Software is
36
+ furnished to do so, subject to the following conditions:
37
+
38
+ The above copyright notice and this permission notice shall be included in all
39
+ copies or substantial portions of the Software.
40
+
41
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
44
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
45
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
46
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
47
+ SOFTWARE.
48
+
49
+ ## FFmpeg and FFprobe (embedded binaries) — GPL-3.0-or-later
50
+
51
+ The desktop app distributions and the npm package may carry static `ffmpeg`
52
+ and `ffprobe` binaries so renders need no local install. They are the FFmpeg
53
+ and ffprobe 7.1.0 builds downloaded by the `ffmpeg-ffprobe-static` optional
54
+ dependency from release `b7.1.0-rc.1` of
55
+ https://github.com/descriptinc/ffmpeg-ffprobe-static and are spawned as
56
+ separate processes; x264/x265 make these GPL-3.0-or-later builds.
57
+
58
+ Build provenance and corresponding source per platform:
59
+
60
+ - Windows x64: the gyan.dev `ffmpeg-release-essentials` 7.1 build
61
+ (`7.1-essentials_build-www.gyan.dev`), compiled from the FFmpeg 7.1
62
+ release — the corresponding source is
63
+ https://ffmpeg.org/releases/ffmpeg-7.1.tar.xz, also tagged `n7.1` at
64
+ https://github.com/FFmpeg/FFmpeg.
65
+ - Linux x64: the BtbN/FFmpeg-Builds autobuild
66
+ `ffmpeg-n7.1-15-g9fbbd924f2-linux64-gpl-7.1`, a git snapshot 15 commits past
67
+ the `n7.1` tag — the corresponding source is FFmpeg commit `9fbbd924f2`
68
+ (https://github.com/FFmpeg/FFmpeg/commit/9fbbd924f2), not the 7.1 release
69
+ tarball.
70
+
71
+ The full GPL license text ships with every distribution: `ff/ffmpeg.LICENSE`
72
+ (`ff/ffmpeg.exe.LICENSE` on Windows) next to the binaries in the desktop app,
73
+ and `ffmpeg.LICENSE` (`ffmpeg.exe.LICENSE` on Windows) next to the binaries in
74
+ the npm install. The `ffmpeg-ffprobe-static` wrapper code itself is not part of
75
+ the desktop distribution; its LICENSE file is BSD-3-Clause (Copyright (c) 2020,
76
+ Eugene Ware and contributors) while its npm metadata declares
77
+ GPL-3.0-or-later.