# GeoVLogSvc **Headless Windows Service that captures airborne‑survey sensor data and writes encrypted HDF5 logs** ``` Startup ─► GeoVLogSvc ├─ SerialPort readers (gamma, mag, VLF, GPS…) ├─ Ring buffer (loss‑less, lock‑free) ├─ HDF5 writer (hourly file, chunked, gzip) └─ AES‑GCM encrypt + RSA‑wrap file key ↓ D:\SurveyData\20250521_0930_GeoVLog.h5 ``` GeoVLogSvc runs **unattended** on the aircraft’s Windows 10 MIC‑7500 computer. It starts with the OS, records every sensor sample, rotates files hourly, and shuts down cleanly on power loss. All data are encrypted so that only the office (with the private key) can read them. --- ## 1 · Key features * **Real‑time logging** up to 5 MB s⁻¹ sustained (1 kHz mag, 20 Hz gamma, 200 Hz VLF). * **HDF5 storage** — self‑describing, chunked, gzip‑compressed. * **Per‑file AES‑256‑GCM encryption**; AES key wrapped with an **embedded RSA‑2048 public key** (OAEP‑SHA‑256). * **Crash‑resilient** — worst‑case data loss < 0.2 s thanks to buffered flush. * **YAML manifest** auto‑generated per flight (`manifest.yaml`). * **Windows‑Service model** — auto‑starts, restarts, runs under least‑privilege service SID. * **Self‑integrity check** — refuses to start if Authenticode signature invalid (prevents key tampering). * **gRPC health endpoint** — used by GeoVLogMon for live telemetry. --- ## 2 · Directory layout on aircraft SSD ``` D:└─ SurveyData └─ 2025-05-21-FLT05 ├─ manifest.yaml ├─ 20250521_09_GeoVLog.h5 ├─ 20250521_10_GeoVLog.h5 └─ ... ``` * Hourly files named `YYYYMMDD_HH_GeoVLog.h5`. * Manifest contains aircraft, crew, sensor configs, SHA‑256 of each log file. --- ## 3 · Installation ### 3.1 Prerequisites | Component | Version | |-----------|---------| | Windows | 10 Pro / LTSC | | .NET Runtime | **8.0** (self‑contained publish bundles it) | | Advantech MIC‑7500 drivers | Serial & GPIO | | H5Z‑AES plugin | DLL shipped in `plugins\` | ### 3.2 MSI install (recommended) ```powershell msiexec /i GeoVLogSvc‑1.0.0.msi /qn ``` * Registers **GeoVLogSvc** Windows Service (`StartupType=Automatic (Delayed)`). * Sets `HDF5_PLUGIN_PATH=%ProgramFiles%\GeoVLog\plugins`. * Creates `C:\ProgramData\GeoVLog\config\flight.yaml` template. ### 3.3 Manual install (dev) ```powershell sc create GeoVLogSvc binPath= "C:\GeoVLog\GeoVLogSvc.exe --config C:\ProgramData\GeoVLog\config\flight.yaml" start= delayed-auto sc sidtype GeoVLogSvc unrestricted ``` --- ## 4 · Configuration (`flight.yaml`) ```yaml flight_id: 2025-05-21-FLT05 output_root: D:/SurveyData flush_interval_ms: 200 row_group_size: 64000 # HDF5 chunk rows sensors: gamma: port: COM3 baud: 115200 decoder: GammaDecoder mag: port: COM4 baud: 460800 decoder: MagDecoder vlf: port: COM5 baud: 230400 decoder: VlfDecoder ``` Reload requires service restart. --- ## 5 · Service account & security * Runs as **Virtual‑service account `NT SERVICE\GeoVLogSvc`**. * Folder ACLs: service SID gets `F` on `SurveyData\` and `C:\ProgramData\GeoVLog\config`. * Embedded public key (non‑secret) lives in `GeoVLog.Core.EmbeddedKeys`. * EXE is **code‑signed**; service verifies its own signature on startup. --- ## 6 · Event‑log sources | Event ID | Level | Message | |----------|-------|---------| | 1000 | Information | Service started – build + file‑format version | | 1010 | Information | New log file opened (`20250521_09_GeoVLog.h5`) | | 2010 | Warning | Serial buffer overrun detected, dropped 12 frames | | 4000 | Error | Integrity check failed – signature invalid | | 4005 | Error | AES key wrap failed – shutting down | --- ## 7 · Building from source ```powershell cd GeoVLog/src/GeoVLogSvc dotnet publish -c Release -r win-x64 ` /p:PublishSingleFile=true ` /p:PublishTrimmed=true ` /p:IncludeNativeLibrariesForSelfExtract=true ``` The publish folder contains: ``` GeoVLogSvc.exe (signed) plugins\h5z_aes.dll config light.yaml ``` Package these into an MSI (Wix/NSIS) or copy manually. --- ## 8 · Development run (non‑service) ```powershell GeoVLogSvc.exe --console --config .\config\flight.yaml ``` Logs to console instead of Event Log; Ctrl‑C for graceful shutdown. --- ## 9 · Roadmap | Version | Planned features | |---------|------------------| | 1.1 | Live file‑upload over VPN after rotation | | 1.2 | Optional double‑logging to an unencrypted “quicklook” file | | 1.3 | Sensor hot‑plug detection (USB serial) | --- ## 10 · License GeoVLogSvc © 2025 Your Company Name – MIT licence. --- ### Support *Operations hotline:* **+351 XXX XXX XXX** *Email:* **support@your‑company.com**