Repository navigation
Exports
The Export PDF action on a flight or trip creates a print-ready report with statistics, notes, route maps, and altitude profiles. Attached flight-plan PDFs can be appended.
| Endpoint | Output |
|---|---|
GET /api/flights/:id/export.pdf |
Flight report plus optional attachment |
GET /api/trips/:id/export.pdf |
Trip overview, each leg, and optional attachments |
| Parameter | Default | Effect |
|---|---|---|
plans |
1 |
Set to 0 or false to omit attachments |
tz |
Server timezone | IANA timezone for timestamps |
locale |
Server locale | BCP 47 locale for dates |
The web UI supplies browser timezone and locale automatically.
The server renders hidden React print routes with Puppeteer, then uses
pdf-lib to append uploaded plans. Consequences:
- the client must be built;
- map tiles require access to OpenStreetMap, or the export has blank maps;
- Chromium is installed with Puppeteer outside Docker;
- one export is generated at a time and a shared browser closes after five minutes idle;
- in development, use
EXPORT_BASE_URL=http://127.0.0.1:5173to render the live Vite client instead of the last build.
Attachments can dominate page count, so clear Include flight plans when they are unnecessary.
KML contains recorded track geometry for Google Earth or another GIS program.
| Endpoint | Output |
|---|---|
GET /api/flights/:id/export.kml |
One flight |
GET /api/trips/:id/export.kml |
Every trip leg in start-time order |
POST /api/flights/export.kml |
An arbitrary selected set |
The POST body is:
{"ids":[63,59,57]}ids must contain 1–100 integers. Duplicates are removed and output is sorted
by flight start time.
Each track is a KML LineString using longitude, latitude, and altitude in
metres. Tracks over 5,000 points are decimated. Multi-flight output gives each
flight its own folder and colour. Notes, PDF attachments, and planned-leg links
are intentionally omitted.