Skip to content

vehicle-dynamics-7

Latest

Choose a tag to compare

@lamb2k lamb2k released this 23 Nov 19:24
c8e2869

The closest-point search of the vehicle dynamics gains two build-time changes for a body far off the line, both off by default. With both off, the objects of the vehicle units are identical to vehicle-dynamics-6. Approximation, in the approved class.

  • Change: SH2Z_VD_LOCATE_DAMP (passes, default 0): after that many passes of a call, the secant step through the last two passes replaces the pass's step when it is not longer and has its sign. It fixes the swing of a body near the centre of curvature, where the step is about twice the Newton step. SH2Z_VD_LOCATE_FLIP (flips, default 0): ends a search that flips between two nodes and returns to the same parameter every second pass, on the parity the 99th pass has.
  • API: two new build-time macros in sh2zam/vehicle_dynamics_experimental.h; no new entry points, no change to existing signatures. Every translation unit of one image must use the same values.
  • Objects: no libc memcpy, memset or memmove in the SH-2 objects; compiled with -Wall -Wextra -Werror. With the macros off, the objects of sh2zam_vehicle_dynamics, sh2zam_vehicle_dynamics2 and sh2zam_vehicle_contact are byte-identical to main (cmp).
  • Evidence: HOST: test_vehicle_locate7 under GCC and Clang strict and ASan/UBSan (506,265 checks; 120,000 randomised searches against the 99-pass library as oracle: untouched searches equal word for word, damped steps never longer than the step they replace, flip stops on the right parity, converged end states within the bounds in the record); mutate_vehicle_locate7.sh catches 12 of 12 controls. No instruction model, no console run. CI on the head passes (host, SH-2 cross compile, math lab, docs). Validation record.
  • Merge: PR #85, merge c8e2869.
  • Guide: saturn/VEHICLE_DYNAMICS.md.