mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/SPATZ.git
synced 2025-06-10 01:55:59 +00:00
Another bugfix for the mock GPS
This commit is contained in:
parent
537f462601
commit
c056aaf069
245
demo.ipynb
245
demo.ipynb
File diff suppressed because one or more lines are too long
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user