Skip to content

Commit e1192d9

Browse files
test update
1 parent e668395 commit e1192d9

1 file changed

Lines changed: 37 additions & 1 deletion

File tree

tests/test_smoothing.py

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Test_FixedIntervalSmoother:
1515
def ains(self):
1616
x0 = np.zeros(16)
1717
x0[6:10] = np.array([1.0, 0.0, 0.0, 0.0])
18-
ains = sf.AidedINS(10.24, x0)
18+
ains = sf.AidedINS(10.24, x0, g=sf.gravity())
1919
return ains
2020

2121
@pytest.fixture
@@ -38,6 +38,42 @@ def test_ains(self, ains):
3838
smoother = FixedIntervalSmoother(ains)
3939
assert smoother.ains is ains
4040

41+
def test_update(self, smoother):
42+
g = sf.gravity()
43+
44+
smoother.update(
45+
np.array([0.0, 0.0, -g]),
46+
np.zeros(3),
47+
degrees=True,
48+
)
49+
assert smoother.x.shape == (1, 16)
50+
51+
smoother.update(
52+
np.array([0.0, 0.0, -g]),
53+
np.zeros(3),
54+
degrees=True,
55+
pos=np.zeros(3),
56+
pos_var=np.ones(3),
57+
vel=np.zeros(3),
58+
vel_var=np.ones(3),
59+
head=0.0,
60+
head_var=1.0,
61+
head_degrees=True,
62+
g_ref=True,
63+
g_var=np.ones(3),
64+
)
65+
assert smoother.x.shape == (2, 16)
66+
67+
smoother.update(
68+
np.array([0.0, 0.0, -g]),
69+
np.zeros(3),
70+
degrees=True,
71+
head=0.0,
72+
head_var=1.0,
73+
head_degrees=True,
74+
)
75+
assert smoother.x.shape == (3, 16)
76+
4177
def test_clear(self, smoother):
4278
smoother.update(
4379
np.zeros(3),

0 commit comments

Comments
 (0)