Added 40km simulation and some experiments with balloon data

This commit is contained in:
dario
2024-04-22 20:00:14 +02:00
parent cadfb29272
commit 8cc7150526
9 changed files with 7038 additions and 1906 deletions

View File

@@ -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())