File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from ._constants import (
2- ERR_ACC_MOTION1 ,
32 ERR_ACC_MOTION2 ,
4- ERR_GYRO_MOTION1 ,
53 ERR_GYRO_MOTION2 ,
64 P0 ,
75)
86
97__all__ = [
10- "ERR_ACC_MOTION1" ,
118 "ERR_ACC_MOTION2" ,
12- "ERR_GYRO_MOTION1" ,
139 "ERR_GYRO_MOTION2" ,
1410 "P0" ,
1511]
Original file line number Diff line number Diff line change 11import numpy as np
22
3- ERR_ACC_MOTION1 = {
4- "N" : 0.004 , # (m/s^2)/sqrt(Hz)
5- "B" : 0.0007 , # m/s^2
6- "tau_cb" : 50.0 , # s
7- }
8-
9- ERR_GYRO_MOTION1 = {
10- "N" : 0.00009 , # (rad/s)/sqrt(Hz)
11- "B" : 0.00003 , # rad/s
12- "tau_cb" : 50.0 , # s
13- }
3+ P0 = np .eye (12 ) * 1e-6
144
5+ # Noise and bias parameters for SMS Motion Gen 2
156ERR_ACC_MOTION2 = {
167 "N" : 0.0007 , # (m/s^2)/sqrt(Hz)
178 "B" : 0.0005 , # m/s^2
2011
2112ERR_GYRO_MOTION2 = {
2213 "N" : 0.00005 , # (rad/s)/sqrt(Hz)
23- "B" : 0.00003 , # rad/s
14+ "B" : 0.00005 , # rad/s
2415 "tau_cb" : 50.0 , # s
2516}
26-
27- P0 = np .eye (12 ) * 1e-6
Original file line number Diff line number Diff line change 44from smsfusion import constants
55
66
7- def test_ERR_ACC_MOTION1 ():
8- err_expect = {
9- "N" : 0.004 ,
10- "B" : 0.0007 ,
11- "tau_cb" : 50.0 ,
12- }
13-
14- err_out = constants .ERR_ACC_MOTION1
15-
16- assert set (err_out .keys ()) == set (err_expect .keys ())
17-
18- for key_i in err_expect :
19- assert err_out [key_i ] == approx (err_expect [key_i ])
20-
21-
22- def test_ERR_GYRO_MOTION1 ():
23- err_expect = {
24- "N" : 0.00009 ,
25- "B" : 0.00003 ,
26- "tau_cb" : 50.0 ,
27- }
28-
29- err_out = constants .ERR_GYRO_MOTION1
30-
31- assert set (err_out .keys ()) == set (err_expect .keys ())
32-
33- for key_i in err_expect :
34- assert err_out [key_i ] == approx (err_expect [key_i ])
35-
36-
377def test_ERR_ACC_MOTION2 ():
388 err_expect = {
399 "N" : 0.0007 ,
@@ -52,7 +22,7 @@ def test_ERR_ACC_MOTION2():
5222def test_ERR_GYRO_MOTION2 ():
5323 err_expect = {
5424 "N" : 0.00005 ,
55- "B" : 0.00003 ,
25+ "B" : 0.00005 ,
5626 "tau_cb" : 50.0 ,
5727 }
5828
Original file line number Diff line number Diff line change @@ -122,10 +122,10 @@ def test__init__default(self):
122122 assert noise ._seed is None
123123
124124 def test__init__constants (self ):
125- noise = NoiseModel (** sf .constants .ERR_ACC_MOTION1 )
126- assert noise ._N == sf .constants .ERR_ACC_MOTION1 ["N" ]
127- assert noise ._B == sf .constants .ERR_ACC_MOTION1 ["B" ]
128- assert noise ._tau_cb == sf .constants .ERR_ACC_MOTION1 ["tau_cb" ]
125+ noise = NoiseModel (** sf .constants .ERR_ACC_MOTION2 )
126+ assert noise ._N == sf .constants .ERR_ACC_MOTION2 ["N" ]
127+ assert noise ._B == sf .constants .ERR_ACC_MOTION2 ["B" ]
128+ assert noise ._tau_cb == sf .constants .ERR_ACC_MOTION2 ["tau_cb" ]
129129 assert noise ._K is None
130130 assert noise ._tau_ck is None
131131 assert noise ._bc == 0.0
You can’t perform that action at this time.
0 commit comments