guided_above_terrain_posvelaccel_sub.lua integrates its position target
forward by the time since the last callback. When a callback arrived
later than 2/RUN_HZ it substituted 1/RUN_HZ for the real interval:
if (dt > 2.0 / RUN_HZ) then
dt = 1.0 / RUN_HZ
end
so a callback 243ms late advanced the target by 50ms and the remaining
193ms was discarded. The position target then falls behind the clock,
and the vehicle - which tracks that target accurately - covers less
ground than the commanded speed implies.
Measured from a failing Sub.GuidedAboveTerrain run under autotest at
--parallel=16, over the 60 simulated seconds the test watches:
GUIP updates 1047 at 17.2Hz (nominal 20Hz)
late callbacks 76 of 1047 (7.3%), worst 243ms
time discarded 5.82s, so 55.08s integrated of 60.90s elapsed
distance 27.90m of an expected 30.00m, +-1.00m -> failed
The dataflash shows the loss is upstream of the controller, not in it:
the script commanded 0.495m/s and the position controller achieved
0.442m/s against a desired 0.443m/s - it tracked what it was given to
within 0.001m/s, and what it was given was slow.
Cap the step at a fixed MAX_DT instead, so ordinary jitter is
integrated honestly and only a real stall is bounded. Pinning the
simulation speedup was tried first and is not a fix: at
context_set_speedup(10) the run still lost ground, reaching 28.93m,
because it reduces how often callbacks are late without changing what
happens when they are.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Every CAN driver had grown its own option bit to log raw frames as CANF
messages. That is now redundant: CAN_Pn_OPTIONS bit 0 (LogAllFrames)
logs every frame on the bus, and unlike the script option it covers
transmitted frames as well as received ones, as the logging callback is
run from both CANIface::receive() and CANIface::send().
Removed the option and its logging from BattMon_ANX, EFI_HFE,
EFI_Halo6000, EFI_NMEA2k and UltraMotion, and dropped the CAN_logger
example, which did nothing else.
BATT_ANX_OPTIONS, EFI_HFE_OPTIONS, EFI_H6K_OPTIONS and EFI_2K_OPTIONS
had no other bits defined, so those parameters are gone. UM_OPTIONS
keeps ParseTelemetry and SendPosAsNamedValueFloat at their existing bit
positions.
ahrs:wind_estimate() is deprecated. Scripts which already checked the
returned value for nil now get a check which actually means something;
the rest fall back to a zero wind vector, which is what they were
already getting from an invalid estimate in most cases.
The rangefinder_quality_test.lua example (driving the Sub RngfndQuality
autotest) pushes a distance/quality/status through the scripting range
finder driver interface, waits UPDATE_PERIOD_MS, then reads it back
through the client interface and checks it matches. The value is copied
from the driver state to the client-facing state by a periodic task on
the main loop, which is a different thread to the scripting VM. Under
host load (e.g. parallel autotest) or high SIM_SPEEDUP that copy can land
after the read, so the client still reports the previous test's value and
the script emits a spurious failure -- reproduced at --speedup=40, where
the 28m test read back 27m and reported "#complete#: !!failure!!".
Retry the read up to MAX_EVAL_RETRIES times (UPDATE_PERIOD_MS apart)
before declaring a mismatch, so a slow cross-thread copy is waited out
while a genuine mismatch still fails once the retries are exhausted.
With this RngfndQuality passes 20/20 at --speedup=40 and 100 (was ~1 in 6
failing).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fix MD034/no-bare-urls lint errors by converting bare URLs to proper
markdown link syntax [text](url). Link text is derived from the URL:
- GitHub repos use the repository name
- ArduPilot ecosystem URLs use descriptive names
- Vendor/product URLs use the vendor name
- Documentation sites include "documentation" suffix
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
global: fix MD007 unordered list indentation in markdown files
Normalize unordered list indentation to use 2-space multiples:
- Top-level list items start at column 0
- Nested list items use 2 additional spaces per level
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
global: fix MD009 trailing whitespace in markdown files
Remove trailing whitespace from all affected markdown files.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
global: fix MD010 hard tabs in markdown files
Replace hard tab characters with 4 spaces.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
global: fix MD012 multiple consecutive blank lines in markdown
Collapse multiple consecutive blank lines to single blank lines
across all markdown files (excluding vendored code).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
global: fix MD007 list indentation base level in markdown
Shift list indentation left by 2 spaces so top-level list items
start at column 0 instead of column 2.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools/scripts: fix MD022 blank lines around headings in markdown
Ensure headings are surrounded by blank lines as required by
markdownlint MD022 rule.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools/scripts: fix MD032 blank lines around lists in markdown
Ensure lists are surrounded by blank lines as required by
markdownlint MD032 rule.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools/scripts: fix MD031 blank lines around code blocks in markdown
Ensure fenced code blocks are surrounded by blank lines as required
by markdownlint MD031 rule.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools/scripts: fix MD047 files should end with single newline
Ensure all markdown files end with exactly one newline character
as required by markdownlint MD047 rule.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools/scripts: fix MD023 headings must start at beginning of line
Remove leading whitespace from heading lines as required by
markdownlint MD023 rule.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools/scripts: fix MD007 remaining list indentation in markdown
Fix unordered list indentation to use correct spacing as required
by markdownlint MD007 rule.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools/scripts: fix MD030 spaces after list markers in markdown
Reduce multiple spaces after list markers to single space as
required by markdownlint MD030 rule.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools/scripts: fix MD022 blank lines around setext headings
Ensure setext-style headings (underlined with === or ---) are
surrounded by blank lines as required by markdownlint MD022 rule.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools/scripts: fix MD018 missing space after hash in headings
Add space after hash marks in atx-style headings as required by
markdownlint MD018 rule.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools/scripts: fix MD019 multiple spaces after hash in headings
Reduce multiple spaces after hash marks to single space in
atx-style headings as required by markdownlint MD019 rule.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools/scripts: fix MD012 multiple consecutive blank lines in markdown
Remove multiple consecutive blank lines and ensure files end with
exactly one newline as required by markdownlint MD012 rule.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools/scripts: fix MD023 headings with leading whitespace
Remove leading whitespace from setext-style heading text lines
as required by markdownlint MD023 rule.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools/scripts: fix MD022 blank line after heading in markdown
Add missing blank line after heading as required by markdownlint
MD022 rule.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools/scripts: fix MD009 trailing non-breaking space in markdown
Remove trailing non-breaking space (U+00A0) as required by
markdownlint MD009 rule.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools/scripts: fix MD012 remaining multiple blank lines in markdown
Remove leading blank lines and whitespace-only lines that create
multiple consecutive blank lines.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Despite the implications of the example and the
`MAVLINK_COMM_NUM_BUFFERS` limit in the description, the actual first
argument to this function is the serial port number.
Correct the argument range to allow any possible port number (no need to
limit as the list is sparse) and enhance the example to give more port
numbers.
add CRSF menu example
add scripted CRSF menu events
custom CRSFMenu helpers
play Beethoven's 5th on CRSF command
use native packed strings for CRSF menus and payloads
support CRSF submenus