diff --git a/COMPLETED.md b/COMPLETED.md index 85d0b58..dad2cb1 100644 --- a/COMPLETED.md +++ b/COMPLETED.md @@ -6,9 +6,9 @@ ## 🏁 Release Candidate 1 (RC1) — February 28, 2026 -Phase I feature set locked. Seven modules, both platforms at parity, all data externalized to versioned JSON (v3 split-file structure with per-aircraft isolation and graceful error handling). No new features planned before Docker deployment (Phase II). +Phase I feature set locked. Eight modules, both platforms at parity, all data externalized to versioned JSON (v3 split-file structure with per-aircraft isolation and graceful error handling). -**Modules:** Fuel Order, Pavement Strength, Crosswind, Fuel Buckets, HF Frequencies, Passdown, Flight Level ↔ Meters +**Modules:** Fuel Order, Pavement Strength, Crosswind, Fuel Buckets, HF Frequencies, Passdown, Flight Level ↔ Meters, Crew Rest **Platforms:** Web (React/Vite), Android (Kotlin/Jetpack Compose) **Data:** `reference.json` + `aircraft/{G450,G500,G650,G700}.json` @@ -32,13 +32,14 @@ Phase I feature set locked. Seven modules, both platforms at parity, all data ex ### Web (React/Vite) - **Fuel Order Calculator** — ASTM D1250 Table 6B density correction replaces previous linear interpolation. Fuel density input at 15°C reference temperature with three-way unit toggle: specific gravity (SG), kg/L, or lb/US gallon (default) — values auto-convert when switching units. Default 0.810 SG / 6.76 lb/gal (typical Jet-A) so calculator works without a ticket in hand. Ambient temperature corrects the reference density using the ASTM thermal expansion coefficient and volume correction factor (K₀=346.4228, K₁=0.4388 for refined products). Results show both reference density (15°C) and corrected density at ambient temp in lb/gal. Jet-A spec range validation (0.775–0.840 SG). Outputs in US gallons, imperial gallons, and liters, all rounded up to nearest 10. Primary volume unit configurable in hamburger menu with locale-based auto-detection (US → US gal, UK/Caribbean Commonwealth → imp gal, everyone else → liters). °C/°F toggle with live value conversion on switch (integer rounding). Temperature defaults to °C (aviation standard). Auto-calc from Total Required minus On Board. Density display. Temperature warnings adjusted: danger below −40°C (freeze point), warning above +55°C. Fully supersedes the original `fuelorder.cpp` standalone calculator (retired). -- **Pavement Strength Module** — Full PCN/PCR system selector (PCR default) with ACN/ACR output, rigid and flexible pavement types, four subgrade categories (A–D). Dynamic "Airport PCN/PCR" label. Airport comparison banner (green pass / red exceed with percentage). Partial availability support for aircraft with ESWL-only or threshold-only data. +- **Pavement Strength Module** — Full PCN/PCR system selector (PCR default) with ACN/ACR output, rigid and flexible pavement types, four subgrade categories (A–D). Dynamic "Airport PCN/PCR" label. Airport comparison banner (green pass / red exceed with percentage). When exceeded, reverse-solves the formula to display maximum allowable weight (rounded down to nearest 500 lbs), or indicates pavement cannot support the aircraft if the result is below basic empty weight. Partial availability support for aircraft with ESWL-only or threshold-only data. - **Crosswind Calculator** — Combined wind direction/speed input (xxxxx format, auto-slash on blur), separate optional gust field, runway input accepting both runway number (01–36) and heading (010–360). Headwind/tailwind and crosswind components for sustained and gust winds. Tailwind values in red. - **Fuel Buckets** — Slider-based stage length lookup with interpolated fuel burn. CSV import for operator-specific data via hamburger menu. Per-aircraft localStorage persistence. Named fuel profiles (see below). - **Named Fuel Profiles** — Fuel bucket schedules are now named per operator/aircraft (e.g., "FLEXJET G450"). Both web and Android. CSV import prompts for a profile name (web: browser prompt, Android: defaults to filename). Profiles exportable as JSON files (`FUEL_PROFILE_name_aircraft.json`) with format identifier, aircraft ID, name, and bucket data — designed for sharing between crew members and devices. JSON import reads the embedded aircraft ID and name, targeting the correct aircraft automatically. Hamburger menu shows loaded profiles with name, aircraft, entry count, export/share button, and clear button. The FuelBucketsModule displays the active profile name. Backward-compatible: old anonymous bucket arrays auto-migrate to `{ name: "Custom", buckets: [...] }` on load. Android uses SharedPreferences storage (fuel_profiles), web uses localStorage. - **HF Frequencies** — ARINC Atlantic/Pacific page age check via "Valid from" HTML parsing with fallback URL chain (tries each URL in order, stops at first valid response). Atlantic uses end-of-window time for staleness ("Frequencies Valid Until"). Pacific uses start time ("Frequencies Valid From"). 4-hour staleness warning. Date mismatch detection (accepts today/yesterday UTC to handle timezone boundary). Direct link to open ARINC page in browser (points to whichever URL succeeded). - **Flight Level ↔ Meters** — Two sub-modes: Meters ↔ Feet lookup (OEM Table 15, 107 entries from 300 m / 1,000 ft through 15,100 m / 49,500 ft) with type-ahead search in either direction and exact match highlighting; and China RVSM FLAS (Figure 5, 50 entries) with dual eastbound/westbound toggle filter (both on = all levels, one off = filtered), RVSM level color coding (blue = eastbound 0°–179°, amber = westbound 186°–359°), and operational notes. Both platforms. Source: GVIII-G700 Operating Manual 06-10-00, 2024-03-29. - **JSON Data Extraction** — All data externalized from inline code into JSON files shared across platforms. Version 3 split-file structure: `reference.json` (airframe-agnostic: meters-to-feet table, China FLAS table, pavement subgrade labels) and per-aircraft files (`aircraft/G450.json`, `G500.json`, `G650.json`, `G700.json`) each containing weight limits, ESWL config, PCN/PCR coefficients, fuel buckets, and wind limitations placeholder. Graceful error handling: each aircraft file loads independently — a malformed file is skipped with a log warning rather than crashing the app. Android uses `DataLoader.init(context)` parsing from `assets/`; web uses Vite static JSON imports with per-aircraft `loadAircraft()` wrapper. ESWL uses `type` discriminator (`formula` vs `thresholds`). Both platforms refactored and build-tested. +- **Crew Rest Calculator (Basic)** — Augmented operations rest period calculator for 3–4 pilots. Inputs: departure time (Zulu), ETE (accepts HH:MM, HHMM, or total minutes), and crew member IDs. Calculates sequential equal-division rest rotation after 30-minute all-hands blocks at departure and arrival. Output: flight summary with total rest window (including total minutes) and per-crew rest schedule with Zulu times. Lock toggle prevents accidental edits while referencing mid-flight; Android state persists across tab switches via `rememberSaveable`. Both platforms. This is a basic implementation — a more sophisticated version incorporating Part 117 compliance is under consideration but may not be attainable. - **Passdown Module (Round 1)** — Crew passdown form: crew emails (PIC, SIC, Lead CA) at top, registration, date, airport (ICAO, auto-uppercase), FBO, FBO phone (auto-format 10-digit US on blur, clickable tel: link in detail view), maintenance status, narrative, oncoming crew emails (PIC, SIC) at bottom. IndexedDB storage with autocomplete dropdowns (sorted alphabetically) that learn from entries. History view with detail/edit/delete (two-tap confirm). Plain text export (copy to clipboard + email with all crew addresses auto-populated in TO field). Passdown tab in first position, Fuel tab retains default focus. Content card widens for Passdown. - **Passdown Round 2** — .ptz export/import: gzipped JSON array format (batch-capable by design, single-file workflow for now). Email attachment options: plain text body only, .ptz attachment only, or both. Import: decompress → parse → deduplicate by ID → merge into local DB. Android file association for .ptz. Stale date prompt: if passdown date ≠ today when sending, user chooses "Send Anyway", "Update to Today & Send", or "Cancel". Send tracking: `lastSentAt` timestamp stamped on each send, shown in detail view and as ✉ indicator in history list (not delivery confirmation — tracks intent only). History age styling: today's passdowns get full accent color + left border, yesterday's are muted, older entries are dimmed at 60% opacity — instant visual triage. History search/filter: filter bar at top of history view with registration autocomplete dropdown and From/To date range fields; result count shown when filters active; "Clear" resets all filters. Batch export: "Export (N)" button appears when filters are active with results — exports all matching passdowns as a single .ptz file, sorted by date. Filename convention: `PASSDOWN_BATCH_REG_DATEFROM_DATETO.ptz` (single tail) or `PASSDOWN_BATCH_Nrecords_DATEFROM_DATETO.ptz` (mixed). Maintenance log view eliminated — registration + date range filtering covers the real use case. Narrative search deferred to TBD. - **Passdown Batch Import Preview** — Import flow now shows a preview screen before committing. Each passdown in the .ptz file is listed with registration, date, location, and PIC. Duplicates (matching ID already in local DB) flagged with "DUPLICATE" badge and unchecked by default. User can select/deselect individual entries, select all, or select none. "Import (N)" commits only checked entries and learns lookups from imported data. Works for both file picker imports and Android file association (tapping .ptz in file manager). Replaces the previous all-or-nothing auto-import flow. @@ -46,13 +47,13 @@ Phase I feature set locked. Seven modules, both platforms at parity, all data ex - **Dark Mode** — Toggle in hamburger menu, persisted in localStorage. - **Hamburger Menu** — Aircraft selector, dark mode toggle, CSV import per aircraft, passdown retention settings (3/6/12/24/36 months or never, auto-purge on app open), About section. - **UI Polish** — Leading zero stripping on heading inputs, side-by-side wind/gust fields, "Flight Time" label on buckets results, temperature field proportions (2/5 input, 3/5 toggle), disclaimer footer on all modules. -- **User Documentation** — `DOCUMENTATION.md` covering all seven modules, data file structure for editors (reference.json and per-aircraft JSON schema with field-level documentation), adding new airframes, .ptz file format (field table, filename conventions, manual inspection command), fuel profile JSON format, fuel bucket CSV format, and app settings. +- **User Documentation** — `DOCUMENTATION.md` covering all eight modules (including Crew Rest), data file structure for editors (reference.json and per-aircraft JSON schema with field-level documentation), adding new airframes, .ptz file format (field table, filename conventions, manual inspection command), fuel profile JSON format, fuel bucket CSV format, and app settings. --- ### Android (Kotlin / Jetpack Compose) -- **Status:** Feature parity with web — RC1. All seven modules implemented including Passdown with SharedPreferences/JSON storage, autocomplete, history, detail view with tappable phone (ACTION_DIAL), copy to clipboard, email intent with crew addresses, two-tap delete confirmation. Passdown retention settings in hamburger menu. Fuel profiles: CSV import, JSON import/export, profile management in hamburger menu. Flight Level ↔ Meters with lookup and China FLAS. Scrollable menu. Crosswind input uses focus-loss formatting (no cursor jumping). Data loaded from `assets/` JSON files via `DataLoader.init(context)` with per-aircraft error isolation. +- **Status:** Feature parity with web. All eight modules implemented including Crew Rest with lock toggle and rememberSaveable state persistence. Passdown with SharedPreferences/JSON storage, autocomplete, history, detail view with tappable phone (ACTION_DIAL), copy to clipboard, email intent with crew addresses, two-tap delete confirmation. Passdown retention settings in hamburger menu. Fuel profiles: CSV import, JSON import/export, profile management in hamburger menu. Flight Level ↔ Meters with lookup and China FLAS. Scrollable menu. Crosswind input uses focus-loss formatting (no cursor jumping). Data loaded from `assets/` JSON files via `DataLoader.init(context)` with per-aircraft error isolation. - **Package:** `com.harshmallow.pilottoolkit` --- diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index bcf37b2..170e22b 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -26,7 +26,7 @@ The ambient temperature field corrects density using the ASTM D1250 Table 6B the Calculates ACN/ACR values for the selected aircraft at a given weight, using linear regression fits from official aircraft manual charts. Supports PCN (legacy) and PCR (ICAO 2024+ transition), rigid and flexible pavement types, and four subgrade categories (A through D). -Enter the airport's published PCN or PCR value in the comparison field to see a pass/exceed result with percentage. Airport pavement values can be found in the Jeppesen airport pages, the national AIP, or airport operator publications. +Enter the airport's published PCN or PCR value in the comparison field to see a pass/exceed result with percentage. When the aircraft's rating exceeds the pavement rating, the calculator reverse-solves the formula to determine the maximum allowable weight for that pavement, rounded down to the nearest 500 lbs. If the resulting weight is below the aircraft's basic empty weight, the message indicates the pavement cannot support the aircraft at any operational weight. Some aircraft (G450, G650) show a computed ESWL using a weight-based formula. Others (G700) show fixed ESWL thresholds (single wheel and dual wheel) because the manufacturer publishes specific values rather than a formula. @@ -69,6 +69,20 @@ ATC clears flight levels in meters; the pilot sets the altimeter to the correspo **Do not use for approach minima.** Chart values are rounded to the nearest 100 feet. +### Crew Rest (Augmented Operations) + +Basic rest period calculator for augmented crews of 3 or 4 pilots. Enter departure time (Zulu) and ETE, then enter crew member IDs or names in the crew fields (minimum 3, 4th is optional). + +**ETE input** accepts three formats: `10:30` (hours:minutes with colon), `1030` (HHMM — auto-formats to `10:30` on blur), or `630` (total minutes, 1–3 digits without colon). The leading zero disambiguates: `0630` is HHMM (6h 30m), `630` is 630 minutes. + +**Calculation:** All crew on deck for the first 30 minutes after departure and the last 30 minutes before arrival. The remaining flight time is divided equally among crew members in sequential rotation. Any remainder minutes from rounding are absorbed into the final all-hands block (crew returns to deck slightly early — conservative). + +**Output:** Flight summary showing departure, ETE, arrival, all-hands windows, total rest window with total minutes, and per-crew rest duration. Rest schedule shows each crew member's rest begin/end times in Zulu. + +**Lock toggle:** Tap the lock button to prevent accidental edits while referencing the schedule mid-flight. When locked, all fields are read-only and the Clear button is hidden. On Android, state persists across tab switches. + +This is a basic equal-division implementation. A more sophisticated version incorporating 14 CFR Part 117 rest facility classes, acclimated time zones, and regulatory compliance is under consideration for future development but may not be attainable due to the complexity and liability of making legal/illegal determinations. + --- ## Data File Structure diff --git a/ROADMAP.md b/ROADMAP.md index c202626..ffd1edb 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -6,7 +6,7 @@ --- > **RC1 locked — February 28, 2026.** Seven modules, both platforms, data externalized. -> **RC2 planning — March 2026.** FBO Contact and Passdown Audit Trail targeted for next release. +> **RC2 in progress — March 2026.** Crew Rest Calculator (basic) completed. FBO Contact and Passdown Audit Trail targeted for next release. --- @@ -20,7 +20,7 @@ ### Future Revisions -- **Crew Rest Calculator** — Simplified rest period calculator for augmented crews (3–4 pilots). Equal division of en route rest after 30-minute all-hands blocks at departure and arrival. Potential paid add-on. Timer/alarm deferred (Android foreground services, notification channels). Full Part 117 compliance may not be attainable — regulatory liability is a fundamentally different risk profile than the rest of the toolkit. +- **Crew Rest Calculator (Advanced)** — The basic equal-division calculator is implemented. Future enhancements under consideration: 14 CFR Part 117 rest facility classes (bunk vs recliner vs none), acclimated time zones, theater changes, split-duty provisions, timer/alarm capability (requires Android foreground services, notification channels). Full Part 117 compliance may not be attainable — regulatory liability is a fundamentally different risk profile than the rest of the toolkit. Potential paid add-on. - **Crosswind Limits Overlay** — Per-aircraft wind limitations. Placeholder field exists in aircraft JSON. Blocked by data sourcing complexity (OEM vs operator limits, angle-dependent calculations). - **Room/SQLite Migration (Android)** — Migrate passdown storage from SharedPreferences to Room for better query/filter scalability.