mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/SPATZ.git
synced 2025-12-16 17:28:04 +00:00
Updated observers and Kalman Filter, added running average
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user