-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.py
40 lines (25 loc) · 1.17 KB
/
configuration.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import numpy as np
class state_space_hub():
def __init__(self):
#sample time of the simulation
self.dt = 1.0
self.x_sub_k_minus_1 = np.array([0.0,0.0,0.0]).T
self.u_sub_k_minus_1 = np.array([4.5,0.0]).T
self.F_matrix = np.array([[1.0,0.0,0.0],[0.0,1.0,0.0],[0.0,0.0,1.0]])
self.B_matrix = np.array([[np.cos(self.x_sub_k_minus_1[2]) * self.dt,0.0],[np.sin(self.x_sub_k_minus_1[2]),0.0],[0.0,self.dt]])
self.state_noise = np.array([0.01,0.01,0.003]).T
class measurement_model_hub():
def __init__(self):
self.H_matrix = np.array([[1.0,0.0,0.0],[0.0,1.0,0.0],[0.0,0.0,1.0]])
self.measurement_noise = np.array([0.07,0.07,0.04]).T
class predicted_covariance_hub():
def __init__(self):
self.P_sub_k_minus_1_d = np.array([[0.1,0.0,0.0],[0.0,0.1,0.0],[0.0,0.0,0.1]])
self.Q_sub_k = np.array([[1.0,0.0,0.0],[0.0,1.0,0.0],[0.0,0.0,1.0]])
class sensor_hub():
def __init__(self):
self.z_sub_k = [4.721,0.143,0.006]
#If we are sure about our sensor measurements, the values along the diagonal of R decrease to zero.
class rasidual_covariance_hub():
def __init__(self):
self.R_sub_k = np.array([[1.0,0.0,0.0],[0.0,1.0,0.0],[0.0,0.0,1.0]])