Updated sensors and added empty logger for speedup

This commit is contained in:
dario
2024-06-13 22:16:22 +02:00
parent 382cb9aad4
commit c0ccd93acf
14 changed files with 5080 additions and 5035 deletions

View File

@@ -0,0 +1 @@
from spatz.simulations.rocketpy import RocketPyCSV

View File

@@ -20,6 +20,9 @@ class DataSource(Advanceable):
speed = np.linalg.norm(self.get_velocity('global'))
return speed / self.get_speed_of_sound()
def get_temperature(self) -> float:
return Atmosphere(self.get_altitude()).temperature
@abstractmethod
def get_length(self) -> float:
@@ -57,10 +60,6 @@ class DataSource(Advanceable):
def get_static_pressure(self) -> float:
pass
@abstractmethod
def get_temperature(self) -> float:
pass
@abstractmethod
def get_longitude(self) -> float:
pass

View File

@@ -72,9 +72,6 @@ class RocketPyCSV(CSVSource):
def get_static_pressure(self) -> float:
return self.fetch_value(' Pressure (Pa)')
def get_temperature(self) -> float:
raise NotImplementedError()
def get_longitude(self) -> float:
return self.fetch_value(' Longitude (°)')