mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-29 18:42:07 +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: 6838e1c82c5abb9f347228006219d96744b3fbb5
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)
|