Updated observers and Kalman Filter, added running average

This commit is contained in:
dario
2024-04-19 10:52:34 +02:00
parent 8b80a6d9d5
commit 475270e1a1
21 changed files with 20865 additions and 3544 deletions

View File

@@ -4,7 +4,7 @@ import numpy as np
import pandas as pd
from enum import Enum
from typing import List
from typing import List, Literal
from numpy.typing import ArrayLike
from scipy.spatial.transform import Rotation
@@ -338,7 +338,7 @@ class Dataset(Advanceable):
"""
return self.fetch_values(['OMEGA_X', 'OMEGA_Y', 'OMEGA_Z'], t)
def get_velocity(self, frame='FL', t: float | None = None) -> ArrayLike:
def get_velocity(self, frame: Literal['L', 'B', 'LF'] = 'LF', t: float | None = None) -> ArrayLike:
"""
Args:
frame (str, optional): The coordinate frame to compute the velocity for. Defaults to 'FL'.
@@ -352,6 +352,8 @@ class Dataset(Advanceable):
if frame == 'B':
return self.launch_rail_to_body(t) @ vel
elif frame == 'L':
return np.linalg.inv(self.local_to_launch_rail()) @ vel
return vel