File tree 3 files changed +9
-10
lines changed 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 5
5
from rocketpy .simulation .flight import Flight as RocketPyFlight
6
6
from rocketpy .utilities import get_instance_attributes
7
7
8
- from lib .models .flight import Flight
9
8
from lib .services .environment import EnvironmentService
10
9
from lib .services .rocket import RocketService
11
- from lib .views .flight import FlightSummary
10
+ from lib .views .flight import FlightSummary , FlightView
12
11
13
12
14
13
class FlightService :
@@ -18,7 +17,7 @@ def __init__(self, flight: RocketPyFlight = None):
18
17
self ._flight = flight
19
18
20
19
@classmethod
21
- def from_flight_model (cls , flight : Flight ) -> Self :
20
+ def from_flight_model (cls , flight : FlightView ) -> Self :
22
21
"""
23
22
Get the rocketpy flight object.
24
23
Original file line number Diff line number Diff line change 15
15
TankGeometry ,
16
16
)
17
17
18
- from lib .models .motor import Motor , MotorKinds , TankKinds
19
- from lib .views .motor import MotorSummary
18
+ from lib .models .motor import MotorKinds , TankKinds
19
+ from lib .views .motor import MotorSummary , MotorView
20
20
21
21
22
22
class MotorService :
@@ -26,7 +26,7 @@ def __init__(self, motor: RocketPyMotor = None):
26
26
self ._motor = motor
27
27
28
28
@classmethod
29
- def from_motor_model (cls , motor : Motor ) -> Self :
29
+ def from_motor_model (cls , motor : MotorView ) -> Self :
30
30
"""
31
31
Get the rocketpy motor object.
32
32
@@ -46,7 +46,7 @@ def from_motor_model(cls, motor: Motor) -> Self:
46
46
"reshape_thrust_curve" : False or motor .reshape_thrust_curve ,
47
47
}
48
48
49
- match motor .motor_kind :
49
+ match MotorKinds ( motor .selected_motor_kind ) :
50
50
case MotorKinds .LIQUID :
51
51
rocketpy_motor = LiquidMotor (** motor_core )
52
52
case MotorKinds .HYBRID :
Original file line number Diff line number Diff line change 14
14
from rocketpy .utilities import get_instance_attributes
15
15
16
16
from lib import logger
17
- from lib .models .rocket import Rocket , Parachute
17
+ from lib .models .rocket import Parachute
18
18
from lib .models .aerosurfaces import NoseCone , Tail , Fins
19
19
from lib .services .motor import MotorService
20
- from lib .views .rocket import RocketSummary
20
+ from lib .views .rocket import RocketView , RocketSummary
21
21
22
22
23
23
class RocketService :
@@ -27,7 +27,7 @@ def __init__(self, rocket: RocketPyRocket = None):
27
27
self ._rocket = rocket
28
28
29
29
@classmethod
30
- def from_rocket_model (cls , rocket : Rocket ) -> Self :
30
+ def from_rocket_model (cls , rocket : RocketView ) -> Self :
31
31
"""
32
32
Get the rocketpy rocket object.
33
33
You can’t perform that action at this time.
0 commit comments