knolo-core icon indicating copy to clipboard operation
knolo-core copied to clipboard

Feature request: knolo-flight, offline verifiable Knowledge Images from drone flight logs (ULog, DataFlash, rosbag2) and mission docs

Open HiveForensicsAI opened this issue 1 month ago • 1 comments

For human review. This feature request was drafted for human review. A human maintainer will review it and implement it manually. No code or PR accompanies it.

Summary

Add a knolo-flight ingest and verification profile that turns drone flight logs (PX4 ULog, ArduPilot DataFlash, ROS 2 bags) plus mission and inspection documents into an offline, attested Knowledge Image, so operators and auditors can ask questions about a flight and get answers bound to hashed, replayable evidence.

Problem and buyer pain

  • Inspection, utility, public safety and agriculture operators collect large volumes of flight logs and mission paperwork (checklists, waivers, inspection reports). Reconstructing "what happened on flight X and was it within our procedures" is manual and slow.
  • Operators under FAA Part 107 and the proposed BVLOS rule (Part 108), or EASA drone rules, need to show records to customers, insurers and regulators. Existing log tools show charts but do not produce a tamper-evident, citable answer.
  • Many of these buyers (defense, public safety, critical infrastructure) cannot send logs to a cloud service and need fully offline or on-prem tooling.

Proposal

  1. A domain pack domains/flight-ops with rules for flight events (arming, mode changes, failsafes, geofence breaches, battery thresholds, link loss) and mission-document checks.
  2. A CLI ingest step (knolo flight ingest) that converts a ULog, DataFlash .bin or rosbag2 file into deterministic, hashed evidence records (event segments with timestamps and source byte ranges), and packs them with mission docs into a V5 Knowledge Image. Parsing uses existing open-source parsers (for example pyulog) as an external producer, not new parsing in core.
  3. KAR requirements for common questions (for example "was the flight inside the approved geofence", "did any failsafe trigger"), evaluated deterministically over the CEG.
  4. Cortex traces for free-form questions, verifiable with verifyCortexAnswer, and exposure through the existing @knolo/mcp KAR and Cortex tools so a ground-station or ops agent can query offline.
  5. An attestation that binds the Knowledge Image to the source log hash, so knolo-verify can check a flight dossier in CI or in an archive.

Scope

In scope: offline post-flight ingest for ULog, DataFlash and rosbag2; a flight-ops domain pack; example fixtures from public sample logs; KAR requirement examples; docs.

Out of scope: real-time onboard flight control or any safety-of-flight function; live MAVLink streaming (open question below); DJI proprietary log decryption; any claim of regulatory certification or compliance approval; hosted services.

Fit with existing knolo-core

  • Knowledge Images and composition: one image per flight, composed with a mission-doc image.
  • CEG and KAR: flight events become graph evidence; requirements become KAR checks.
  • Domain Packs: follows the existing operations and policy packs.
  • Attestation and knolo-verify Action: tamper-evident flight dossiers checked in CI.
  • Cortex and @knolo/mcp (PR #87): verifiable Q and A for agents, with no model call in core.
  • Offline by design: core makes no network calls, which matches air-gapped and edge buyers.

Differentiation versus alternatives

Log analysis and fleet tools (PX4 Flight Review, ArduPilot Mission Planner log tools, Airdata, DroneLogbook) visualize and store logs. They do not produce deterministic, replayable, citation-bound answers or an attestation tying an answer to the exact source bytes. Generic RAG stacks can search documents but cannot prove what evidence an answer used. Knolo would add the verification layer on top of these, not replace them.

Acceptance criteria

  • knolo flight ingest produces byte-identical Knowledge Images from the same input on repeated runs.
  • At least one public ULog and one DataFlash sample log are included as fixtures with expected roots.
  • At least three KAR requirements evaluate to deterministic results over the fixtures.
  • A Cortex trace over a fixture verifies with verifyCortexAnswer, and fails closed if the log bytes change.
  • knolo-verify validates the flight attestation.
  • Docs state clearly that a pass means the evidence requirement was met, not that a flight was safe or compliant.

Open questions

  • Should a later phase accept live MAVLink telemetry (for example via MAVLink FTP log download) on a companion computer?
  • Which parser runs as the producer (Python pyulog versus a JS port), and how is its version pinned?
  • How to handle DJI logs given proprietary formats?
  • Size limits for long flights and high-rate sensor topics.

Related issues

No existing drone, UAV or telemetry issue found. Related: #84 / PR #87 (MCP KAR and Cortex tools), #85 / PR #86 (knolo-verify Action), #81 (Cortex), PR #78 (composition and attestation), #28 (ClaimGraph logs).

Sources

  • PX4 ULog format: https://docs.px4.io/main/en/dev_log/ulog_file_format.html
  • pyulog: https://github.com/PX4/pyulog
  • ArduPilot logs: https://ardupilot.org/copter/docs/common-downloading-and-analyzing-data-logs-in-mission-planner.html
  • MAVLink: https://mavlink.io/en/ and MAVLink FTP: https://mavlink.io/en/services/ftp.html
  • ROS 2 rosbag2: https://github.com/ros2/rosbag2
  • DJI Mobile SDK: https://developer.dji.com/mobile-sdk/
  • FAA Part 107 commercial operators: https://www.faa.gov/uas/commercial_operators
  • FAA BVLOS proposed rule (Part 108), Federal Register, Aug 7 2025: https://www.federalregister.gov/documents/2025/08/07/2025-14992/normalizing-unmanned-aircraft-systems-beyond-visual-line-of-sight-operations
  • EASA civil drones: https://www.easa.europa.eu/en/domains/civil-drones
  • Airdata: https://airdata.com and DroneLogbook: https://www.dronelogbook.com

Knolo is open source under Apache-2.0, built by Hive Forensics AI Inc. R&D.

HiveForensicsAI avatar Oct 31 '26 09:10 HiveForensicsAI

This is an outstanding and timely feature request. Bringing deterministic, verifiable attestation to flight telemetry (FAA Part 107/108 & EASA compliance) fits Knolo's offline-first and cryptographic model perfectly.

I would love to help take this on and contribute Phase 1. Here are a few thoughts on the architecture and the open questions raised:

1. Handling High-Rate Sensor Topics & Size Limits (Crucial for V5 Images)

Drone logs can reach hundreds of megabytes with raw IMU / actuator topics running at 100Hz–400Hz. Ingesting raw sensor ticks directly into the CEG would bloat the Knowledge Image unnecessarily.

  • Proposed approach: The ingest producer extracts discrete flight state transitions and boundary events (e.g., ARMING_STATE, NAV_STATE mode switches, FAILSAFE assertion/deassertion, GEOFENCE_BREACH, battery threshold crossings, and telemetry summary envelopes).
  • Each extracted evidence record keeps its exact timestamp and source byte-range offsets mapped back to the raw log file.
  • The root attestation binds to the SHA-256 of the complete raw flight log, guaranteeing fail-closed tamper evidence without exploding the .knolo image size.

2. External Producer & Parser Pinning

  • For reproducibility, parsing should strictly live outside the core runtime. For Phase 1, pyulog can be executed as a deterministic producer outputting structured JSON event streams, with its exact package version and environment pinned in the producer manifest.
  • Proprietary formats (like encrypted DJI .DAT / .txt) should remain out of scope for the initial profile, prioritizing open, standardized formats (.ulg first, then DataFlash .bin).

Proposed Phase 1 Scope (MVP):

  1. Domain Pack (domains/flight-ops):
    • Implement domain.yaml under ceg-domain-1 defining flight concepts (flight-event, geofence, failsafe, battery-state, mission-precondition) and relations (violates, triggers, precedes).
  2. Ingest CLI (knolo flight ingest):
    • Producer integration for PX4 ULog (.ulg) generating byte-identical evidence segments and packing into a V5 Knowledge Image.
  3. Fixtures & Deterministic KAR Checks:
    • Include a public PX4 sample flight log fixture with fixed root expectations.
    • Implement 3 baseline KAR rules:
      1. flight-inside-geofence (boundary check against mission waiver/plan).
      2. no-unhandled-failsafe (failsafe trigger verification).
      3. pre-flight-checklist-completion (verifying mission doc checklist against arming timestamp).
  4. Attestation & Cortex Verification:
    • Ensure verifyCortexAnswer passes over the flight fixture and fails closed if the log source bytes mutate.

If you're open to an external contribution for Phase 1, I can prepare a draft PR implementing the domain pack and ULog ingest profile with full test coverage and fixtures. Let me know what you think!

ghazy2001 avatar Oct 31 '26 09:10 ghazy2001