mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-23 14:53:53 +08:00
* 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>
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)
|