Noise offset bugfix and updated conversion code

This commit is contained in:
dario
2024-04-22 23:40:46 +02:00
parent 8cc7150526
commit 05ed167615
4 changed files with 1795 additions and 1766 deletions

View File

@@ -26,14 +26,15 @@ class Accelerometer(Sensor):
def _get_data(self) -> ArrayLike | float:
acc = self._dataset.get_acceleration(frame='FL')
acc += np.array([0, 0, g])
self._logger.write('FL_x', acc[0], self._get_name())
self._logger.write('FL_y', acc[1], self._get_name())
self._logger.write('FL_z', acc[2], self._get_name())
# Convert FL to body
acc = self._dataset.launch_rail_to_body() @ acc
mat = self._dataset.launch_rail_to_body()
acc = mat @ acc
acc += mat @ np.array([0, 0, g])
self._logger.write('B_x', acc[0], self._get_name())
self._logger.write('B_y', acc[1], self._get_name())