Another bugfix for the mock GPS

This commit is contained in:
dario 2024-05-22 23:47:02 +02:00
parent 537f462601
commit c056aaf069
4 changed files with 3580 additions and 123 deletions

File diff suppressed because one or more lines are too long

View File

@ -302,7 +302,7 @@ class Dataset(Advanceable):
"""
return self.get_mach_number(t) > 1
def get_velocity(self, t: float | None = None) -> float:
def get_total_velocity(self, t: float | None = None) -> float:
"""
Args:
t (float): Allows specification of a different time instead of the current time. None for current time.

View File

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

3450
test.csv Normal file

File diff suppressed because it is too large Load Diff