mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-16 17:22:10 +08:00
7e87930a20
* add T_IDXS
* refactor
* fix test
* unused
* typo
* needs casting
* Update selfdrive/controls/lib/drive_helpers.py
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* deprecate field
* regen all
* new segs
* add todo
* split back
* clean
* bad names
* do in controls
* add arg
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 6838e1c82c
9 lines
201 B
Python
9 lines
201 B
Python
import numpy as np
|
|
IDX_N = 33
|
|
|
|
def index_function(idx, max_val=192):
|
|
return (max_val/1024)*(idx**2)
|
|
|
|
|
|
T_IDXS = np.array([index_function(idx, max_val=10.0) for idx in range(IDX_N)], dtype=np.float64)
|