mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-09-04 15:23:42 +08:00
00eb0e983d
* dec with kalmanfilter * updat pytest * Update sunnypilot/selfdrive/controls/lib/dec/constants.py Co-authored-by: DevTekVE <devtekve@gmail.com> --------- Co-authored-by: DevTekVE <devtekve@gmail.com>
18 lines
721 B
Python
18 lines
721 B
Python
class WMACConstants:
|
|
# Lead detection parameters
|
|
LEAD_WINDOW_SIZE = 6 # Stable detection window
|
|
LEAD_PROB = 0.45 # Balanced threshold for lead detection
|
|
|
|
# Slow down detection parameters
|
|
SLOW_DOWN_WINDOW_SIZE = 5 # Responsive but stable
|
|
SLOW_DOWN_PROB = 0.3 # Balanced threshold for slow down scenarios
|
|
|
|
# Optimized slow down distance curve - smooth and progressive
|
|
SLOW_DOWN_BP = [0., 10., 20., 30., 40., 50., 55., 60.]
|
|
SLOW_DOWN_DIST = [32., 46., 64., 86., 108., 130., 145., 165.]
|
|
|
|
# Slowness detection parameters
|
|
SLOWNESS_WINDOW_SIZE = 10 # Stable slowness detection
|
|
SLOWNESS_PROB = 0.55 # Clear threshold for slowness
|
|
SLOWNESS_CRUISE_OFFSET = 1.025 # Conservative cruise speed offset
|