def setUpClass(cls):
        testingtools.new_save()
        testingtools.remove_other_vessels()
        testingtools.launch_vessel_from_vab('PartsDockingPort')
        cls.conn = testingtools.connect(name='TestPartsDockingPort')
        cls.vessel = cls.conn.space_center.active_vessel
        cls.parts = cls.vessel.parts
        cls.state = cls.conn.space_center.DockingPortState

        # Get the three undocked ports
        ports = cls.parts.docking_ports
        cls.port1 = next(
            iter(
                filter(
                    lambda p: p.part.title == 'Clamp-O-Tron Docking Port Jr.',
                    ports)))
        cls.port2 = next(
            iter(
                filter(
                    lambda p: p.part.title ==
                    'Clamp-O-Tron Shielded Docking Port', ports)))
        cls.port3 = next(
            iter(filter(lambda p: p.part.title == 'Mk2 Clamp-O-Tron', ports)))
        cls.port4 = next(
            iter(filter(lambda p: p.part.title == 'Inline Clamp-O-Tron',
                        ports)))
Beispiel #2
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('PartsEngine')
     testingtools.remove_other_vessels()
     cls.conn = testingtools.connect(name='TestPartsEngineMSL')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
     cls.add_engine_data('LV-T30 "Reliant" Liquid Fuel Engine', {
         'max_thrust': 201000,
         'isp': 280.5
     })
     cls.add_engine_data('LV-T45 "Swivel" Liquid Fuel Engine', {
         'max_thrust': 169200,
         'isp': 270.7
     })
     cls.add_engine_data('LV-N "Nerv" Atomic Rocket Motor', {
         'max_thrust': 14300,
         'isp': 190.6
     })
     cls.add_engine_data('IX-6315 "Dawn" Electric Propulsion System', {
         'max_thrust': 63,
         'isp': 128.0
     })
     cls.add_engine_data('O-10 "Puff" MonoPropellant Fuel Engine', {
         'max_thrust': 9700,
         'isp': 121.2
     })
     cls.add_engine_data('RT-10 "Hammer" Solid Fuel Booster', {
         'max_thrust': 197897,
         'isp': 170.4
     })
     cls.add_engine_data('J-33 "Wheesley" Basic Jet Engine', {
         'max_thrust': 80000,
         'isp': 9600
     })
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.set_circular_orbit('Kerbin', 100000)
     cls.conn = krpc.connect(name='TestReferenceFrame')
     cls.sc = cls.conn.space_center
     cls.vessel = cls.conn.space_center.active_vessel
     cls.bodies = cls.conn.space_center.bodies
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('PartsSolarPanel')
     testingtools.remove_other_vessels()
     cls.conn = krpc.connect(name='TestPartsLaunchClamp')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
Beispiel #5
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Basic')
     cls.conn = krpc.connect(name='TestFlightAtLaunchpad')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.conn.testing_tools.remove_other_vessels()
     cls.far = cls.conn.space_center.far_available
Beispiel #6
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('PartsEngine')
     testingtools.remove_other_vessels()
     cls.conn = testingtools.connect(name='TestPartsEngine')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('PartsSolarPanel')
     testingtools.remove_other_vessels()
     cls.conn = testingtools.connect(name='TestPartsLaunchClamp')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
Beispiel #8
0
    def setUpClass(cls):
        testingtools.new_save()
        testingtools.launch_vessel_from_vab('PartsDockingPortPreAttachedTo')
        testingtools.remove_other_vessels()
        cls.conn = krpc.connect(name='TestPartsDockingPortPreAttachedTo')
        cls.vessel = cls.conn.space_center.active_vessel
        cls.state = cls.conn.space_center.DockingPortState

        # Stack is as follows, from top to bottom:
        # parts[0] - Pod
        # parts[1] - Docking port (facing down)
        # parts[2] - Docking port (facing up)
        # parts[3] - Tank
        # parts[4] - Docking port (facing up)
        # parts[5] - Tank
        # parts[6] - Docking port (facing down)
        # parts[7] - Tank

        cls.parts = [cls.vessel.parts.root]
        cls.parts.append(filter(lambda p: p.docking_port != None, cls.parts[0].children)[0])
        part = cls.parts[-1]
        while len(part.children) == 1:
            part = part.children[0]
            cls.parts.append(part)

        cls.port1 = cls.parts[1].docking_port
        cls.port2 = cls.parts[2].docking_port
        cls.port4 = cls.parts[4].docking_port
        cls.port6 = cls.parts[6].docking_port
Beispiel #9
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('PartsEngine')
     testingtools.remove_other_vessels()
     cls.conn = testingtools.connect(name='TestPartsEngineMSL')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
     cls.add_engine_data(
         'LV-T30 "Reliant" Liquid Fuel Engine',
         {'max_thrust': 201000, 'isp': 280.5})
     cls.add_engine_data(
         'LV-T45 "Swivel" Liquid Fuel Engine',
         {'max_thrust': 169200, 'isp': 270.7})
     cls.add_engine_data(
         'LV-N "Nerv" Atomic Rocket Motor',
         {'max_thrust': 14300, 'isp': 190.6})
     cls.add_engine_data(
         'IX-6315 "Dawn" Electric Propulsion System',
         {'max_thrust': 63, 'isp': 128.0})
     cls.add_engine_data(
         'O-10 "Puff" MonoPropellant Fuel Engine',
         {'max_thrust': 9700, 'isp': 121.2})
     cls.add_engine_data(
         'RT-10 "Hammer" Solid Fuel Booster',
         {'max_thrust': 197897, 'isp': 170.4})
     cls.add_engine_data(
         'J-33 "Wheesley" Basic Jet Engine',
         {'max_thrust': 80000, 'isp': 9600})
Beispiel #10
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.set_circular_orbit('Kerbin', 100000)
     cls.conn = testingtools.connect(name='TestReferenceFrame')
     cls.sc = cls.conn.space_center
     cls.vessel = cls.conn.space_center.active_vessel
     cls.bodies = cls.conn.space_center.bodies
Beispiel #11
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('PartsEngine')
     testingtools.remove_other_vessels()
     testingtools.set_circular_orbit('Kerbin', 250000)
     cls.conn = testingtools.connect(name='TestPartsEngineMSL')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
     cls.add_engine_data(
         'LV-T30 "Reliant" Liquid Fuel Engine',
         {'max_thrust': 215000, 'isp': 300})
     cls.add_engine_data(
         'LV-T45 "Swivel" Liquid Fuel Engine',
         {'max_thrust': 200000, 'isp': 320})
     cls.add_engine_data(
         'LV-N "Nerv" Atomic Rocket Motor',
         {'max_thrust': 60000, 'isp': 800})
     cls.add_engine_data(
         'IX-6315 "Dawn" Electric Propulsion System',
         {'max_thrust': 2000, 'isp': 4200})
     cls.add_engine_data(
         'O-10 "Puff" MonoPropellant Fuel Engine',
         {'max_thrust': 20000, 'isp': 250})
     cls.add_engine_data(
         'RT-10 "Hammer" Solid Fuel Booster',
         {'max_thrust': 227000, 'isp': 195})
    def setUpClass(cls):
        testingtools.new_save()
        testingtools.remove_other_vessels()
        testingtools.launch_vessel_from_vab('PartsDockingPortPreAttachedTo')
        cls.conn = testingtools.connect(
            name='TestPartsDockingPortPreAttachedTo')
        cls.vessel = cls.conn.space_center.active_vessel
        cls.state = cls.conn.space_center.DockingPortState

        # Stack is as follows, from top to bottom:
        # parts[0] - Pod
        # parts[1] - Docking port (facing down)
        # parts[2] - Docking port (facing up)
        # parts[3] - Tank
        # parts[4] - Docking port (facing up)
        # parts[5] - Tank
        # parts[6] - Docking port (facing down)
        # parts[7] - Tank

        cls.parts = [cls.vessel.parts.root]
        cls.parts.append(
            next(
                iter(
                    filter(lambda p: p.docking_port != None,
                           cls.parts[0].children))))
        part = cls.parts[-1]
        while len(part.children) == 1:
            part = part.children[0]
            cls.parts.append(part)

        cls.port1 = cls.parts[1].docking_port
        cls.port2 = cls.parts[2].docking_port
        cls.port4 = cls.parts[4].docking_port
        cls.port6 = cls.parts[6].docking_port
Beispiel #13
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('PartsEngine')
     testingtools.remove_other_vessels()
     testingtools.set_circular_orbit('Kerbin', 250000)
     cls.conn = testingtools.connect(name='TestPartsEngineMSL')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
     cls.add_engine_data('LV-T30 "Reliant" Liquid Fuel Engine', {
         'max_thrust': 215000,
         'isp': 300
     })
     cls.add_engine_data('LV-T45 "Swivel" Liquid Fuel Engine', {
         'max_thrust': 200000,
         'isp': 320
     })
     cls.add_engine_data('LV-N "Nerv" Atomic Rocket Motor', {
         'max_thrust': 60000,
         'isp': 800
     })
     cls.add_engine_data('IX-6315 "Dawn" Electric Propulsion System', {
         'max_thrust': 2000,
         'isp': 4200
     })
     cls.add_engine_data('O-10 "Puff" MonoPropellant Fuel Engine', {
         'max_thrust': 20000,
         'isp': 250
     })
     cls.add_engine_data('RT-10 "Hammer" Solid Fuel Booster', {
         'max_thrust': 227000,
         'isp': 195
     })
Beispiel #14
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.set_circular_orbit('Kerbin', 100000)
     cls.conn = testingtools.connect(name='TestNode')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.control = cls.vessel.control
     for node in cls.control.nodes:
         node.remove()
 def setUp(self):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('PartsDockingPortInFlight')
     testingtools.set_circular_orbit('Kerbin', 100000)
     testingtools.remove_other_vessels()
     self.conn = krpc.connect(name='TestPartsDockingPortInFlight')
     self.sc = self.conn.space_center
     self.state = self.sc.DockingPortState
Beispiel #16
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('PartsRadiator')
     testingtools.remove_other_vessels()
     cls.conn = testingtools.connect(name='TestPartsRadiator')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
     cls.state = cls.conn.space_center.RadiatorState
Beispiel #17
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Rover')
     testingtools.remove_other_vessels()
     cls.conn = krpc.connect(name='TestControlRover')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.control = cls.vessel.control
     cls.flight = cls.vessel.flight(cls.vessel.orbit.body.reference_frame)
Beispiel #18
0
 def setUpClass(cls):
     if testingtools.connect().space_center.active_vessel.name != 'Parts':
         testingtools.new_save()
         testingtools.launch_vessel_from_vab('Parts')
         testingtools.remove_other_vessels()
     cls.conn = testingtools.connect(name='TestParts')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
 def setUpClass(cls):
     if testingtools.connect().space_center.active_vessel.name != "Parts":
         testingtools.new_save()
         testingtools.launch_vessel_from_vab("Parts")
         testingtools.remove_other_vessels()
     cls.conn = testingtools.connect(name="TestPartsReactionWheel")
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
Beispiel #20
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.remove_other_vessels()
     testingtools.launch_vessel_from_vab('Basic')
     cls.conn = testingtools.connect(name='TestFlightAtLaunchpad')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.conn.testing_tools.remove_other_vessels()
     cls.far = cls.conn.space_center.far_available
Beispiel #21
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Rover')
     testingtools.remove_other_vessels()
     cls.conn = testingtools.connect(name='TestControlRover')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.control = cls.vessel.control
     cls.flight = cls.vessel.flight(cls.vessel.orbit.body.reference_frame)
Beispiel #22
0
 def setUp(self):
     self.conn = testingtools.connect(name='TestComms')
     if not self.conn.space_center.remote_tech_available:
         self.skipTest('RemoteTech not installed')
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Comms')
     testingtools.remove_other_vessels()
     self.vessel = self.conn.space_center.active_vessel
Beispiel #23
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('PartsDecoupler')
     testingtools.remove_other_vessels()
     cls.conn = testingtools.connect(name='TestPartsDecoupler')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
     cls.state = cls.conn.space_center.SolarPanelState
Beispiel #24
0
 def setUp(self):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('PartsParachute')
     testingtools.remove_other_vessels()
     self.conn = testingtools.connect(name='TestPartsParachute')
     self.vessel = self.conn.space_center.active_vessel
     self.parts = self.vessel.parts
     self.state = self.conn.space_center.ParachuteState
 def setUp(self):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('PartsParachute')
     testingtools.remove_other_vessels()
     self.conn = krpc.connect(name='TestPartsParachute')
     self.vessel = self.conn.space_center.active_vessel
     self.parts = self.vessel.parts
     self.state = self.conn.space_center.ParachuteState
Beispiel #26
0
 def setUpClass(cls):
     if krpc.connect().space_center.active_vessel.name != 'Parts':
         testingtools.new_save()
         testingtools.launch_vessel_from_vab('Parts')
         testingtools.remove_other_vessels()
     cls.conn = krpc.connect(name='TestPartsReactionWheel')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
Beispiel #27
0
 def setUp(self):
     self.conn = krpc.connect(name='TestComms')
     if not self.conn.space_center.remote_tech_available:
         self.skipTest('RemoteTech not installed')
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Comms')
     testingtools.remove_other_vessels()
     self.vessel = self.conn.space_center.active_vessel
Beispiel #28
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.set_circular_orbit('Kerbin', 100000)
     cls.conn = krpc.connect(name='TestNode')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.control = cls.vessel.control
     for node in cls.control.nodes:
         node.remove()
Beispiel #29
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('PartsRadiator')
     testingtools.remove_other_vessels()
     cls.conn = krpc.connect(name='TestPartsRadiator')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
     cls.state = cls.conn.space_center.RadiatorState
 def setUp(self):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('PartsDockingPortInFlight')
     testingtools.remove_other_vessels()
     testingtools.set_circular_orbit('Kerbin', 100000)
     self.conn = testingtools.connect(name='TestPartsDockingPortInFlight')
     self.sc = self.conn.space_center
     self.state = self.sc.DockingPortState
Beispiel #31
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Basic')
     testingtools.remove_other_vessels()
     cls.conn = testingtools.connect(name='TestWarpOnLaunchpad')
     cls.sc = cls.conn.space_center
     cls.vessel = cls.sc.active_vessel
     cls.maximum_rails_warp_factor = 7
     cls.landed = True
 def setUpClass(cls):
     if testingtools.connect().space_center.active_vessel.name != 'PartsLandingGear':
         testingtools.new_save()
         testingtools.launch_vessel_from_vab('PartsLandingGear')
         testingtools.remove_other_vessels()
     cls.conn = testingtools.connect(name='TestPartsLandingGear')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
     cls.state = cls.conn.space_center.LandingGearState
Beispiel #33
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Basic')
     testingtools.remove_other_vessels()
     testingtools.set_circular_orbit('Kerbin', 100000)
     cls.conn = krpc.connect()
     cls.control = cls.conn.space_center.active_vessel.control
     vessel = cls.conn.space_center.active_vessel
     cls.orbital_flight = vessel.flight(vessel.orbit.reference_frame)
Beispiel #34
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Basic')
     testingtools.remove_other_vessels()
     cls.conn = krpc.connect(name='TestWarpOnLaunchpad')
     cls.sc = cls.conn.space_center
     cls.vessel = cls.sc.active_vessel
     cls.maximum_rails_warp_factor = 7
     cls.landed = True
Beispiel #35
0
 def setUpClass(cls):
     if krpc.connect().space_center.active_vessel.name != 'Parts':
         testingtools.new_save()
         testingtools.launch_vessel_from_vab('Parts')
         testingtools.remove_other_vessels()
     cls.conn = krpc.connect(name='TestParts')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
     cls.expectedAmbientTemperature = 273+20
Beispiel #36
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.remove_other_vessels()
     testingtools.launch_vessel_from_vab('Multi')
     testingtools.set_orbit('Eve', 1070000, 0.15, 16.2, 70.5, 180.8, 1.83, 251.1)
     cls.conn = testingtools.connect(name='TestAutoPilotOtherVessel')
     next(iter(cls.conn.space_center.active_vessel.parts.docking_ports)).undock()
     cls.vessel = cls.conn.space_center.active_vessel
     cls.other_vessel = next(iter(filter(lambda v: v != cls.vessel, cls.conn.space_center.vessels)))
Beispiel #37
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.set_circular_orbit('Kerbin', 100000)
     cls.conn = krpc.connect()
     cls.vessel = cls.conn.space_center.active_vessel
     cls.conn.testing_tools.clear_rotation()
     cls.conn.testing_tools.apply_rotation(116, (0,0,-1))
     cls.conn.testing_tools.apply_rotation(27, (-1,0,0))
     cls.conn.testing_tools.apply_rotation(40, (0,-1,0))
Beispiel #38
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Basic')
     testingtools.remove_other_vessels()
     testingtools.set_circular_orbit('Kerbin', 100000)
     cls.conn = testingtools.connect(name='TestVessel')
     cls.vtype = cls.conn.space_center.VesselType
     cls.vsituation = cls.conn.space_center.VesselSituation
     cls.vessel = cls.conn.space_center.active_vessel
     cls.far = cls.conn.space_center.far_available
Beispiel #39
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Basic')
     testingtools.remove_other_vessels()
     testingtools.set_circular_orbit('Kerbin', 100000)
     cls.conn = testingtools.connect(name='TestVessel')
     cls.vtype = cls.conn.space_center.VesselType
     cls.vsituation = cls.conn.space_center.VesselSituation
     cls.vessel = cls.conn.space_center.active_vessel
     cls.far = cls.conn.space_center.far_available
Beispiel #40
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Basic')
     testingtools.remove_other_vessels()
     testingtools.set_circular_orbit('Kerbin', 100000)
     cls.conn = testingtools.connect(name='TestControl')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.control = cls.vessel.control
     cls.auto_pilot = cls.vessel.auto_pilot
     cls.orbital_flight = cls.vessel.flight(cls.vessel.orbital_reference_frame)
 def setUpClass(cls):
     if krpc.connect().space_center.active_vessel.name != 'Parts':
         testingtools.new_save()
         testingtools.launch_vessel_from_vab('Parts')
         testingtools.remove_other_vessels()
     cls.conn = krpc.connect(name='TestPartsLandingLeg')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
     cls.state = cls.conn.space_center.LandingLegState
     cls.leg = cls.parts.landing_legs[0]
Beispiel #42
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Basic')
     testingtools.remove_other_vessels()
     testingtools.set_circular_orbit('Kerbin', 700000)
     cls.conn = krpc.connect(name='TestWarpInOrbit')
     cls.sc = cls.conn.space_center
     cls.vessel = cls.sc.active_vessel
     cls.maximum_rails_warp_factor = 7
     cls.landed = False
Beispiel #43
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Basic')
     testingtools.remove_other_vessels()
     testingtools.set_circular_orbit('Kerbin', 700000)
     cls.conn = testingtools.connect(name='TestWarpInOrbit')
     cls.sc = cls.conn.space_center
     cls.vessel = cls.sc.active_vessel
     cls.maximum_rails_warp_factor = 7
     cls.landed = False
Beispiel #44
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Basic')
     testingtools.remove_other_vessels()
     testingtools.set_circular_orbit('Kerbin', 100000)
     cls.conn = testingtools.connect(name='TestControl')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.control = cls.vessel.control
     cls.auto_pilot = cls.vessel.auto_pilot
     cls.orbital_flight = cls.vessel.flight(
         cls.vessel.orbital_reference_frame)
Beispiel #45
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.remove_other_vessels()
     testingtools.set_circular_orbit('Kerbin', 100000)
     cls.conn = testingtools.connect()
     cls.vessel = cls.conn.space_center.active_vessel
     cls.conn.testing_tools.clear_rotation()
     cls.conn.testing_tools.apply_rotation(116, (0,0,-1))
     cls.conn.testing_tools.apply_rotation(27, (-1,0,0))
     cls.conn.testing_tools.apply_rotation(40, (0,-1,0))
     cls.far = cls.conn.space_center.far_available
Beispiel #46
0
 def setUp(self):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('PartsDockingPortInFlight')
     testingtools.set_circular_orbit('Kerbin', 100000)
     testingtools.remove_other_vessels()
     #FIXME: sleep to prevent undocking tests from running too soon and the undocked vessel
     #       getting deleted by the previous call
     time.sleep(1)
     self.conn = krpc.connect(name='TestPartsDockingPortInFlight')
     self.sc = self.conn.space_center
     self.state = self.sc.DockingPortState
Beispiel #47
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Basic')
     testingtools.remove_other_vessels()
     testingtools.set_orbit('Eve', 1070000, 0.15, 16.2, 70.5, 180.8, 1.83, 251.1)
     time.sleep(5) #FIXME: remove sleep
     cls.conn = krpc.connect()
     cls.vessel = cls.conn.space_center.active_vessel
     cls.ap = cls.vessel.auto_pilot
     cls.sas_mode = cls.conn.space_center.SASMode
     cls.speed_mode = cls.conn.space_center.SpeedMode
Beispiel #48
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Multi')
     testingtools.remove_other_vessels()
     testingtools.set_circular_orbit('Kerbin', 100000)
     cls.conn = krpc.connect(name='TestControlOtherVessel')
     next(iter(cls.conn.space_center.active_vessel.parts.docking_ports)).undock()
     cls.vessel = next(iter(filter(lambda v: v != cls.conn.space_center.active_vessel, cls.conn.space_center.vessels)))
     cls.control = cls.vessel.control
     cls.auto_pilot = cls.vessel.auto_pilot
     cls.orbital_flight = cls.vessel.flight(cls.vessel.orbital_reference_frame)
Beispiel #49
0
    def setUpClass(cls):
        testingtools.new_save()
        testingtools.set_circular_orbit('Kerbin', 100000)
        cls.conn = krpc.connect()
        cls.sc = cls.conn.space_center

        cls.vessel = cls.conn.space_center.active_vessel
        cls.ref_vessel = cls.vessel.reference_frame
        cls.ref_obt_vessel = cls.vessel.orbital_reference_frame
        cls.ref_srf_vessel = cls.vessel.surface_reference_frame

        cls.bodies = cls.conn.space_center.bodies
Beispiel #50
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.remove_other_vessels()
     testingtools.launch_vessel_from_vab('Basic')
     testingtools.set_orbit('Eve', 1070000, 0.15, 16.2, 70.5, 180.8, 1.83,
                            251.1)
     cls.conn = testingtools.connect()
     cls.vessel = cls.conn.space_center.active_vessel
     cls.ap = cls.vessel.auto_pilot
     cls.sas_mode = cls.conn.space_center.SASMode
     cls.speed_mode = cls.conn.space_center.SpeedMode
     cls.ap.rotation_speed_multiplier = 2
     cls.ap.roll_speed_multiplier = 2
     cls.ap.set_pid_parameters(3, 0, 0)
Beispiel #51
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.remove_other_vessels()
     testingtools.launch_vessel_from_vab('Multi')
     testingtools.set_orbit('Eve', 1070000, 0.15, 16.2, 70.5, 180.8, 1.83,
                            251.1)
     cls.conn = testingtools.connect(name='TestAutoPilotOtherVessel')
     next(iter(
         cls.conn.space_center.active_vessel.parts.docking_ports)).undock()
     cls.vessel = cls.conn.space_center.active_vessel
     cls.other_vessel = next(
         iter(
             filter(lambda v: v != cls.vessel,
                    cls.conn.space_center.vessels)))
Beispiel #52
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Multi')
     testingtools.remove_other_vessels()
     testingtools.set_circular_orbit('Kerbin', 100000)
     cls.conn = testingtools.connect(name='TestControlOtherVessel')
     next(iter(
         cls.conn.space_center.active_vessel.parts.docking_ports)).undock()
     cls.vessel = next(
         iter(
             filter(lambda v: v != cls.conn.space_center.active_vessel,
                    cls.conn.space_center.vessels)))
     cls.control = cls.vessel.control
     cls.auto_pilot = cls.vessel.auto_pilot
     cls.orbital_flight = cls.vessel.flight(
         cls.vessel.orbital_reference_frame)
 def setUpClass(cls):
     if testingtools.connect(
     ).space_center.active_vessel.name != 'PartsHarvester':
         testingtools.new_save()
         testingtools.launch_vessel_from_vab('PartsHarvester')
         testingtools.remove_other_vessels()
     cls.conn = testingtools.connect(name='TestPartsResourceHarvester')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.parts = cls.vessel.parts
     cls.state = cls.conn.space_center.ResourceHarvesterState
     cls.drill = next(
         iter(
             filter(
                 lambda e: e.part.title ==
                 '\'Drill-O-Matic\' Mining Excavator',
                 cls.parts.resource_harvesters)))
Beispiel #54
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Basic')
     testingtools.remove_other_vessels()
     testingtools.set_circular_orbit('Kerbin', 1000000)
     testingtools.launch_vessel_from_vab('Basic')
     testingtools.set_circular_orbit('Kerbin', 1010000)
     cls.conn = testingtools.connect(name='TestSpaceCenter')
     cls.sc = cls.conn.space_center
     cls.vessel = cls.sc.active_vessel
     cls.other_vessel = next(iter(filter(lambda v: v != cls.vessel, cls.sc.vessels)))
     cls.vessel.name = 'Vessel'
     cls.other_vessel.name = 'OtherVessel'
     cls.ref_vessel = cls.vessel.reference_frame
     bodies = cls.sc.bodies
     cls.sun = bodies['Sun']
     cls.kerbin = bodies['Kerbin']
     cls.mun = bodies['Mun']
     cls.ref_sun = cls.sun.reference_frame
     cls.ref_kerbin = cls.kerbin.reference_frame
     cls.ref_mun = cls.mun.reference_frame
     cls.ref_nr_sun = cls.sun.non_rotating_reference_frame
     cls.ref_nr_kerbin = cls.kerbin.non_rotating_reference_frame
     cls.ref_nr_mun = cls.mun.non_rotating_reference_frame
Beispiel #55
0
 def setUpClass(cls):
     testingtools.new_save()
     cls.conn = testingtools.connect(name='TestOrbit')
Beispiel #56
0
    def setUpClass(cls):
        testingtools.new_save()
        testingtools.launch_vessel_from_vab('PartsEngine')
        testingtools.remove_other_vessels()
        testingtools.set_circular_orbit('Kerbin', 100000)
        cls.conn = testingtools.connect(name='TestVesselEngines')
        cls.vessel = cls.conn.space_center.active_vessel
        cls.control = cls.vessel.control

        cls.engines = []
        for engine in cls.vessel.parts.engines:
            if 'IntakeAir' not in engine.propellants and engine.can_shutdown:
                cls.engines.append(engine)

        cls.engine_info = {
            'IX-6315 "Dawn" Electric Propulsion System': {
                'max_thrust': 2000,
                'available_thrust': 2000,
                'isp': 4200,
                'vac_isp': 4200,
                'msl_isp': 100
            },
            'LV-T45 "Swivel" Liquid Fuel Engine': {
                'max_thrust': 200000,
                'available_thrust': 200000,
                'isp': 320,
                'vac_isp': 320,
                'msl_isp': 270
            },
            'LV-T30 "Reliant" Liquid Fuel Engine': {
                'max_thrust': 215000,
                'available_thrust': 215000,
                'isp': 300,
                'vac_isp': 300,
                'msl_isp': 280
            },
            'LV-N "Nerv" Atomic Rocket Motor': {
                'max_thrust': 60000,
                'available_thrust': 60000,
                'isp': 800,
                'vac_isp': 800,
                'msl_isp': 185
            },
            'O-10 "Puff" MonoPropellant Fuel Engine': {
                'max_thrust': 20000,
                'available_thrust': 20000,
                'isp': 250,
                'vac_isp': 250,
                'msl_isp': 120
            },
            'RT-10 "Hammer" Solid Fuel Booster': {
                'max_thrust': 0,
                'available_thrust': 0,
                'isp': 195,
                'vac_isp': 195,
                'msl_isp': 170
            },
            'LV-909 "Terrier" Liquid Fuel Engine': {
                'max_thrust': 60000,
                'available_thrust': 0,
                'isp': 345,
                'vac_isp': 345,
                'msl_isp': 85
            },
            'J-33 "Wheesley" Basic Jet Engine': {
                'max_thrust': 0,
                'available_thrust': 0,
                'isp': 0,
                'vac_isp': 0,
                'msl_isp': 0
            }
        }
        max_thrusts = [x['max_thrust'] for x in cls.engine_info.values()]
        available_thrusts = [
            x['available_thrust'] for x in cls.engine_info.values()
        ]
        isps = [x['isp'] for x in cls.engine_info.values()]
        vac_isps = [x['vac_isp'] for x in cls.engine_info.values()]
        msl_isps = [x['msl_isp'] for x in cls.engine_info.values()]
        cls.max_thrust = sum(max_thrusts)
        cls.available_thrust = sum(available_thrusts)
        cls.combined_isp = sum(max_thrusts) / sum(
            t / i if i > 0 else 0 for t, i in zip(max_thrusts, isps))
        cls.vac_combined_isp = sum(max_thrusts) / sum(
            t / i if i > 0 else 0 for t, i in zip(max_thrusts, vac_isps))
        cls.msl_combined_isp = sum(max_thrusts) / sum(
            t / i if i > 0 else 0 for t, i in zip(max_thrusts, msl_isps))
Beispiel #57
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.remove_other_vessels()
     cls.conn = testingtools.connect(name='TestFlightVerticalSpeed')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.conn.testing_tools.remove_other_vessels()
Beispiel #58
0
 def setUpClass(cls):
     testingtools.new_save()
     testingtools.launch_vessel_from_vab('Resources')
     cls.conn = testingtools.connect(name='TestResources')
     cls.vessel = cls.conn.space_center.active_vessel
     cls.num_stages = len(cls.expected.keys())
Beispiel #59
0
 def setUpClass(cls):
     testingtools.new_save()
     cls.conn = testingtools.connect()
     cls.control = cls.conn.space_center.active_vessel.control