ardupilot/libraries/AP_NavEKF3/derivation/generate_nix
Thomas Watson ef1c31bd50 AP_NavEKF3: document provenance of yaw fusion equations
Requires digging up old versions of the generator script.

The equations have been rearranged somewhat after generation to choose
the appropriate method but they do match overall. The auto-substitution
of the power functions caused slight changes to the generated syntax so
we make those to the real code as well.

Delete `yaw_generated.cpp` as we know exactly how to generate it now.
2024-10-01 09:28:54 +10:00

15 lines
546 B
Plaintext
Executable File

#!/usr/bin/env nix-shell
#! nix-shell --pure -i bash -p "python3.withPackages (p: [ p.numpy p.sympy ])"
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/eabc38219184cc3e04a974fe31857d8e0eac098d.tar.gz
# above pins Python 3.9.13, Numpy 1.21.2, and Sympy 1.9 (and deps)
# using the last nixos-21.11 branch commit
cd "$(dirname "$0")"
rm -rf generated # ensure generated directory exists and is empty
mkdir -p generated
# explicitly invoke python3 to use interpreter from nix-shell
python3 ./generate_1.py
python3 ./generate_2.py