Updated sensors and added empty logger for speedup

This commit is contained in:
dario
2024-06-13 22:16:22 +02:00
parent 382cb9aad4
commit c0ccd93acf
14 changed files with 5080 additions and 5035 deletions

View File

@@ -27,6 +27,11 @@ class WSEN_ISDS_ACC(Accelerometer):
def _sensor_specific_effects(self, x: ArrayLike) -> ArrayLike:
t = self._dataset.get_time()
g = 9.81
# Convert to milli-g.
x = x / g * 1000
# Apply noise to the true values.
y = self.__noise(t, x)
noise = y - x
@@ -37,8 +42,7 @@ class WSEN_ISDS_ACC(Accelerometer):
self._logger.write('acc_z_noise', noise[2], self._get_name())
# The WSEN-ISDS accelerometer only measures acceleration between -16g and 16g.
g = 9.81
y = np.clip(y, -16*g, +16*g)
y = np.clip(y, -16000, +16000)
return y
@@ -51,8 +55,8 @@ class WSEN_ISDS_GYRO(Gyroscope):
return 'WSEN_ISDS_GYRO'
def _sensor_specific_effects(self, x: ArrayLike) -> ArrayLike:
# Convert to degrees per second.
x = (x / np.pi) * 180
# Convert to milli-degrees per second.
x = (x / np.pi) * 180 * 1000
# TODO: Noise model.