mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/SPATZ.git
synced 2025-06-10 18:15:59 +00:00
Generated new simulation
This commit is contained in:
parent
43bc71c742
commit
8b12d6e400
299
conversion.ipynb
299
conversion.ipynb
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
1728
data/simulations/actual_flight.txt
Normal file
1728
data/simulations/actual_flight.txt
Normal file
File diff suppressed because it is too large
Load Diff
1728
data/simulations/predicted_flight.txt
Normal file
1728
data/simulations/predicted_flight.txt
Normal file
File diff suppressed because it is too large
Load Diff
1729
data/simulations/raw/bending_Sim.txt
Normal file
1729
data/simulations/raw/bending_Sim.txt
Normal file
File diff suppressed because one or more lines are too long
@ -18,17 +18,12 @@ class BMI088(IMU):
|
|||||||
|
|
||||||
|
|
||||||
class BMI088Gyro(Gyroscope):
|
class BMI088Gyro(Gyroscope):
|
||||||
def __init__(self, dataset: Dataset, logger: Logger, offset: float = 0, transforms: List[Transform] = []):
|
def __init__(self, dataset: Dataset, logger: Logger, orientation=np.identity(3), transforms: List[Transform] = []):
|
||||||
super().__init__(dataset, logger, offset, transforms)
|
super().__init__(dataset, logger, orientation, transforms)
|
||||||
|
|
||||||
def _get_name(self) -> AnyStr:
|
def _get_name(self) -> AnyStr:
|
||||||
return 'BMI088'
|
return 'BMI088'
|
||||||
|
|
||||||
def _get_data(self) -> ArrayLike:
|
|
||||||
rots = self._dataset.fetch_values(['roll_l', 'pitch_l', 'yaw_l'])
|
|
||||||
|
|
||||||
return rots
|
|
||||||
|
|
||||||
def _sensor_specific_effects(self, x: ArrayLike) -> ArrayLike:
|
def _sensor_specific_effects(self, x: ArrayLike) -> ArrayLike:
|
||||||
return x
|
return x
|
||||||
|
|
||||||
|
@ -23,9 +23,6 @@ class MS5611(PressureSensor):
|
|||||||
def _sensor_specific_effects(self, x: ArrayLike | float) -> ArrayLike | float:
|
def _sensor_specific_effects(self, x: ArrayLike | float) -> ArrayLike | float:
|
||||||
t = self._dataset.get_time()
|
t = self._dataset.get_time()
|
||||||
|
|
||||||
# Transform from Pa to hPa
|
|
||||||
x /= 1e2
|
|
||||||
|
|
||||||
noisy = self.__noise(t, x) # self.__pad_noise(t, x) if self._dataset.get_phase() == Phase.ONPAD else self.__flight_noise(t, x)
|
noisy = self.__noise(t, x) # self.__pad_noise(t, x) if self._dataset.get_phase() == Phase.ONPAD else self.__flight_noise(t, x)
|
||||||
|
|
||||||
# Log the noise added to the pressure measurements.
|
# Log the noise added to the pressure measurements.
|
||||||
|
53
spatz/simulations/astos_source.py
Normal file
53
spatz/simulations/astos_source.py
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import numpy as np
|
||||||
|
|
||||||
|
from typing import Literal
|
||||||
|
from numpy.typing import NDArray
|
||||||
|
|
||||||
|
from spatz.simulations.csv_source import CSVSource
|
||||||
|
|
||||||
|
|
||||||
|
class ASTOSSource(CSVSource):
|
||||||
|
def __init__(self, path: str, interpolation: Literal['linear'] = 'linear') -> None:
|
||||||
|
super().__init__(path, 'time', interpolation)
|
||||||
|
|
||||||
|
def get_length(self) -> float:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_position(self) -> NDArray:
|
||||||
|
return self.fetch_values(['x', 'y', 'z'])
|
||||||
|
|
||||||
|
def get_velocity(self, frame: Literal['global', 'local']) -> NDArray:
|
||||||
|
if frame == 'local':
|
||||||
|
pass
|
||||||
|
|
||||||
|
return self.fetch_values(['vx', 'vy', 'vz'])
|
||||||
|
|
||||||
|
def get_acceleration(self, frame: Literal['global', 'local']) -> NDArray:
|
||||||
|
if frame == 'local':
|
||||||
|
pass
|
||||||
|
|
||||||
|
return self.fetch_values(['ax', 'ay', 'az'])
|
||||||
|
|
||||||
|
def get_attitude(self) -> NDArray:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def local_to_global(self) -> NDArray:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def global_to_local(self) -> NDArray:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_angular_velocity(self) -> NDArray:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_static_pressure(self) -> float:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_longitude(self) -> float:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_latitude(self) -> float:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_altitude(self) -> float:
|
||||||
|
pass
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user