Skip to content

feat: improve aircraft grouping — match by craft name from log header and/or filename #148

@nerdCopter

Description

@nerdCopter

Context

Aircraft grouping currently uses extract_aircraft_key() which strips the _YYYYMMDD_HHMMSS timestamp from the filename stem. For BLACKBOX_LOG-prefixed files (Betaflight/EmuFlight generic naming), the craft name from the post-date suffix is appended.

This works well when pilots use default firmware naming. It breaks or produces unexpected groups when:

  • Pilots rename log files manually
  • The craft name is absent from the filename
  • Logs from different aircraft happen to share the same filename prefix

Proposal

Augment grouping to also consider the craft name embedded in the blackbox log header (the craft_name field present in Betaflight/EmuFlight blackbox headers). Using the header craft name as the primary grouping key — with filename stem as fallback — would make grouping robust regardless of how pilots name their files.

Considerations

  • Header parsing already happens during log processing; the craft name field would need to be surfaced to the grouping logic before profiling begins.
  • Pilots sometimes fly the same physical airframe under different craft names (e.g. after a firmware flash); this could inadvertently split what should be one group.
  • Graceful fallback needed when the header craft name is absent or empty.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions