mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/SPATZ.git
synced 2025-09-29 05:17:33 +00:00
Updated sensors and added empty logger for speedup
This commit is contained in:
@@ -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.
|
||||
|
||||
|
Reference in New Issue
Block a user