ACC (Adaptive Cruise Control) - code of the lessons on electronics-engineering.com
==================================================================================

Python (3.8 or newer, numpy; matplotlib only for the charts)

    python acc_sim.py          self test of every block
    python test_scenarios.py   14 scenarios with pass/fail criteria (exit code 1 if one fails)
    python make_plots.py       all the charts of the lessons, in ./plots

acc_sim.py      the whole chain: vehicle (powertrain, brakes, wind, grade, payload, IMU), radar and camera,
                Kalman tracker with association and track management, path prediction, target selection with
                state machine, rule-based planner (cruise, follow, elastic approach, overtaking preboost, stop & go),
                torque controller (feedforward + PI, three zones, grade and mass estimation, standstill hold),
                ACC function state machine.
make_plots.py   the scenarios behind every chart.
test_scenarios.py  the validation catalogue of lesson 7.

C99 (AUTOSAR-style software components, no dynamic memory)

    cd c
    gcc -std=c99 -O2 -Wall -Wextra -Wpedantic -o test_acc acc.c test_acc.c -lm
    ./test_acc                 13 scenarios on a vehicle model, same results as the Python version

c/acc.h, c/acc.c   path prediction, target selection, planner, state machine, longitudinal control
c/test_acc.c       vehicle model (plant) and test scenarios

Free to study and modify. This is teaching code: a production ACC needs calibration on the vehicle,
functional safety analysis (ISO 26262) and validation (ISO 15622 / ISO 22179, Euro NCAP).
