File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 55from rocketpy .simulation .flight import Flight as RocketPyFlight
66from rocketpy .utilities import get_instance_attributes
77
8- from lib .models .flight import Flight
98from lib .services .environment import EnvironmentService
109from lib .services .rocket import RocketService
11- from lib .views .flight import FlightSummary
10+ from lib .views .flight import FlightSummary , FlightView
1211
1312
1413class FlightService :
@@ -18,7 +17,7 @@ def __init__(self, flight: RocketPyFlight = None):
1817 self ._flight = flight
1918
2019 @classmethod
21- def from_flight_model (cls , flight : Flight ) -> Self :
20+ def from_flight_model (cls , flight : FlightView ) -> Self :
2221 """
2322 Get the rocketpy flight object.
2423
Original file line number Diff line number Diff line change 1515 TankGeometry ,
1616)
1717
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
2020
2121
2222class MotorService :
@@ -26,7 +26,7 @@ def __init__(self, motor: RocketPyMotor = None):
2626 self ._motor = motor
2727
2828 @classmethod
29- def from_motor_model (cls , motor : Motor ) -> Self :
29+ def from_motor_model (cls , motor : MotorView ) -> Self :
3030 """
3131 Get the rocketpy motor object.
3232
@@ -46,7 +46,7 @@ def from_motor_model(cls, motor: Motor) -> Self:
4646 "reshape_thrust_curve" : False or motor .reshape_thrust_curve ,
4747 }
4848
49- match motor .motor_kind :
49+ match MotorKinds ( motor .selected_motor_kind ) :
5050 case MotorKinds .LIQUID :
5151 rocketpy_motor = LiquidMotor (** motor_core )
5252 case MotorKinds .HYBRID :
Original file line number Diff line number Diff line change 1414from rocketpy .utilities import get_instance_attributes
1515
1616from lib import logger
17- from lib .models .rocket import Rocket , Parachute
17+ from lib .models .rocket import Parachute
1818from lib .models .aerosurfaces import NoseCone , Tail , Fins
1919from lib .services .motor import MotorService
20- from lib .views .rocket import RocketSummary
20+ from lib .views .rocket import RocketView , RocketSummary
2121
2222
2323class RocketService :
@@ -27,7 +27,7 @@ def __init__(self, rocket: RocketPyRocket = None):
2727 self ._rocket = rocket
2828
2929 @classmethod
30- def from_rocket_model (cls , rocket : Rocket ) -> Self :
30+ def from_rocket_model (cls , rocket : RocketView ) -> Self :
3131 """
3232 Get the rocketpy rocket object.
3333
You can’t perform that action at this time.
0 commit comments