mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 05:24:06 +08:00
Faster a_ego filter (#25646)
* Faster a_ego filter * :x Update ref * typo * update ref
This commit is contained in:
@@ -271,12 +271,12 @@ class CarStateBase(ABC):
|
||||
self.left_blinker_prev = False
|
||||
self.right_blinker_prev = False
|
||||
|
||||
# Q = np.matrix([[10.0, 0.0], [0.0, 100.0]])
|
||||
# R = 1e3
|
||||
# Q = np.matrix([[0.0, 0.0], [0.0, 100.0]])
|
||||
# R = 0.3
|
||||
self.v_ego_kf = KF1D(x0=[[0.0], [0.0]],
|
||||
A=[[1.0, DT_CTRL], [0.0, 1.0]],
|
||||
C=[1.0, 0.0],
|
||||
K=[[0.12287673], [0.29666309]])
|
||||
K=[[0.17406039], [1.65925647]])
|
||||
|
||||
def update_speed_kf(self, v_ego_raw):
|
||||
if abs(v_ego_raw - self.v_ego_kf.x[0][0]) > 2.0: # Prevent large accelerations when car starts at non zero speed
|
||||
|
||||
@@ -1 +1 @@
|
||||
cad0c6a23a9baea9853fe2117ff9127a83f9e884
|
||||
5cb8e7ea92f333bdb49682b0593ab2ae5a5f3824
|
||||
|
||||
Reference in New Issue
Block a user