mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/SPATZ.git
synced 2025-09-29 05:17:33 +00:00
Another bugfix for the mock GPS
This commit is contained in:
@@ -26,16 +26,16 @@ class GPS(Sensor):
|
||||
super().__init__(dataset, logger, transforms)
|
||||
|
||||
def _get_data(self) -> ArrayLike:
|
||||
vel = norm(self._dataset.get_velocity())
|
||||
vel = self._dataset.get_total_velocity()
|
||||
|
||||
# TODO: At which speed do we assume that GPS becomes unreliable?
|
||||
if vel / self._dataset.get_mach_number() > 1:
|
||||
if vel / self._dataset.get_speed_of_sound() > 1:
|
||||
return np.array([0, 0, 0])
|
||||
|
||||
x = self._dataset.fetch_values(['latitude', 'longitude', 'altitude'])
|
||||
x = self._sensor_specific_effects(x)
|
||||
|
||||
# Convert to degrees.
|
||||
x * 180 / math.pi
|
||||
x *= 180 / math.pi
|
||||
|
||||
return x
|
||||
|
Reference in New Issue
Block a user