Skip to content

feat(log-analysis): add timestamped parameter history - #1995

Open
nflyernz wants to merge 2 commits into
ArduPilot:masterfrom
nflyernz:parameter-history
Open

feat(log-analysis): add timestamped parameter history#1995
nflyernz wants to merge 2 commits into
ArduPilot:masterfrom
nflyernz:parameter-history

Conversation

@nflyernz

Copy link
Copy Markdown
Contributor

Description

Description

Adds reusable timestamped parameter-history support to AMC log analysis.

AMC currently reduces PARM messages to a single final value per parameter. That is sufficient for log-level analysis, but can give incorrect results when a parameter changes during a log containing multiple flights.

This adds:

  • ParameterHistory.from_log_data(log_data)
  • ParameterHistory.value_at(parameter_name, time_s) -> float | None

LogAnalysisContext.parameters remains unchanged and continues to expose the final logged value.

ArduPilot writes its initial parameter snapshot progressively at log startup. Therefore, the first logged PARM occurrence for a parameter is treated as the log-start baseline, even when that record has a later timestamp. Subsequent records take effect at their timestamps.

No Plane-specific analysis, landing detection, frontend, or log extraction changes are included.

Checklist

  • Run pre-commit checks locally
  • Verified by a human programmer
  • All commits are signed off (use git commit --signoff)
  • Code follows our coding standards
  • Documentation updated if needed
  • No breaking changes or properly documented

Testing

  • Unit tests pass
  • Integration tests pass
  • Manual testing performed
  • Tested on flight controller hardware

Validation:

  • Focused/affected tests: 40 passed
  • Full non-SITL suite: 4821 passed, 6 skipped, 4 xfailed, 53 deselected
  • Ruff: passed
  • Ruff format: passed
  • Pylint: 10.00/10
  • MyPy: passed
  • Pyright: passed
  • git diff --check: passed
  • Real-log validation with log_17.bin: passed

pre-commit run --all-files reached the existing external markdownlint-cli npm EALLOWGIT installation failure; no source-related pre-commit failure was observed.

Checklist

  • Run pre-commit checks locally
  • Verified by a human programmer
  • All commits are signed off (use git commit --signoff)
  • Code follows our coding standards
  • Documentation updated if needed
  • No breaking changes or properly documented

Testing

Describe how you tested these changes:

  • Unit tests pass
  • Integration tests pass
  • Manual testing performed
  • Tested on flight controller hardware

Signed-off-by: nflyernz <319460892+nflyernz@users.noreply.github.com>
@nflyernz
nflyernz requested a review from amilcarlucas as a code owner August 29, 2026 22:53
Signed-off-by: nflyernz <319460892+nflyernz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant