mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/SPATZ.git
synced 2025-06-11 18:35:58 +00:00
Better atmosphere model
This commit is contained in:
parent
d1f24f0201
commit
cadfb29272
@ -2,6 +2,7 @@ from typing import Any
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from ambiance import Atmosphere
|
||||||
|
|
||||||
|
|
||||||
class PressUnit:
|
class PressUnit:
|
||||||
@ -42,3 +43,11 @@ class AltitudeModel:
|
|||||||
press = to_hpa[unit]
|
press = to_hpa[unit]
|
||||||
|
|
||||||
return 44330 * (1 - (press / self.__press_0)**(1 / 5.255))
|
return 44330 * (1 - (press / self.__press_0)**(1 / 5.255))
|
||||||
|
|
||||||
|
|
||||||
|
class StandardAtmosphere:
|
||||||
|
def __init__(self) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def predict(self, press: float, unit: PressUnit = PressUnit.Pa) -> float:
|
||||||
|
return Atmosphere.from_pressure(press).h[0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user