mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/SPATZ.git
synced 2025-06-10 01:55:59 +00:00
bugfixes for GPS and updated demo project
This commit is contained in:
parent
05ed167615
commit
bf715a3f31
File diff suppressed because one or more lines are too long
350
demo.ipynb
350
demo.ipynb
File diff suppressed because one or more lines are too long
@ -11,6 +11,9 @@ class Erinome_I(GPS):
|
||||
def __init__(self, dataset: Dataset, logger: Logger, transforms: List[Transform] = []):
|
||||
super().__init__(dataset, logger, transforms)
|
||||
|
||||
def _get_name(self):
|
||||
return "Erinome-I"
|
||||
|
||||
def _sensor_specific_effects(self, x: ArrayLike) -> ArrayLike:
|
||||
# TODO: What's the GPS module's behavior?
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
import numpy as np
|
||||
|
||||
from typing import Any, List
|
||||
from numpy.linalg import norm
|
||||
|
||||
@ -27,7 +29,7 @@ class GPS(Sensor):
|
||||
|
||||
# TODO: At which speed do we assume that GPS becomes unreliable?
|
||||
if vel / self._dataset.get_mach_number() > 1:
|
||||
return NA
|
||||
return np.array([0, 0, 0])
|
||||
|
||||
x = self._dataset.fetch_values(['latitude', 'longitude', 'altitude'])
|
||||
x = self._sensor_specific_effects(x)
|
||||
|
@ -15,6 +15,6 @@ class Gyroscope(Sensor):
|
||||
|
||||
def _get_data(self) -> ArrayLike | float:
|
||||
# Rotation in rad/sec
|
||||
x = self._dataset.get_rotation_rates()
|
||||
x = self._dataset.get_angular_velocities()
|
||||
|
||||
return x
|
||||
|
@ -4,6 +4,7 @@ import numpy as np
|
||||
from abc import abstractmethod
|
||||
from typing import List, AnyStr
|
||||
from numpy.typing import ArrayLike
|
||||
from pandas import NA
|
||||
|
||||
from spatz.transforms import *
|
||||
from spatz.logger import *
|
||||
|
Loading…
x
Reference in New Issue
Block a user