mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/SPATZ.git
synced 2025-09-29 05:17:33 +00:00
Added 40km simulation and some experiments with balloon data
This commit is contained in:
@@ -4,7 +4,7 @@ from numpy.typing import ArrayLike
|
||||
from spatz.sensors import PressureSensor
|
||||
from spatz.dataset import Dataset, Phase
|
||||
from spatz.logger import Logger
|
||||
from spatz.transforms import GaussianNoise, Transform
|
||||
from spatz.transforms import GaussianNoise, Transform, ProportionalGaussian
|
||||
|
||||
|
||||
class MS5611_01BA03(PressureSensor):
|
||||
@@ -12,8 +12,9 @@ class MS5611_01BA03(PressureSensor):
|
||||
super().__init__(dataset, logger, transforms, ts_effects)
|
||||
|
||||
# Noise model obtained by a test flight using this sensor.
|
||||
self.__pad_noise = GaussianNoise(0, 0.03)
|
||||
self.__flight_noise = GaussianNoise(0, 1.5)
|
||||
# self.__pad_noise = GaussianNoise(0, 0.03)
|
||||
# self.__flight_noise = GaussianNoise(0, 1.5)
|
||||
self.__noise = ProportionalGaussian(0, 0.0015)
|
||||
|
||||
def _get_name(self) -> AnyStr:
|
||||
return 'MS5611_01BA03'
|
||||
@@ -24,7 +25,7 @@ class MS5611_01BA03(PressureSensor):
|
||||
# Transform from Pa to hPa
|
||||
x /= 1e2
|
||||
|
||||
noisy = 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.
|
||||
self._logger.write('noise', noisy - x, domain=self._get_name())
|
||||
|
Reference in New Issue
Block a user