当前位置: 首页>>代码示例>>Python>>正文


Python testingtools.set_circular_orbit函数代码示例

本文整理汇总了Python中testingtools.set_circular_orbit函数的典型用法代码示例。如果您正苦于以下问题:Python set_circular_orbit函数的具体用法?Python set_circular_orbit怎么用?Python set_circular_orbit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了set_circular_orbit函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUpClass

 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})
开发者ID:artwhaley,项目名称:krpc,代码行数:26,代码来源:test_parts_engine.py

示例2: setUpClass

 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
开发者ID:NOTtheMessiah,项目名称:krpc,代码行数:7,代码来源:test_referenceframe.py

示例3: setUp

 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
开发者ID:rosalesr,项目名称:krpc,代码行数:8,代码来源:test_parts_docking_port.py

示例4: setUpClass

 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()
开发者ID:ilo,项目名称:krpc,代码行数:8,代码来源:test_node.py

示例5: test_orbital_speed

 def test_orbital_speed(self):
     testingtools.set_circular_orbit('Kerbin', 100000)
     ref = self.vessel.orbit.body.non_rotating_reference_frame
     flight = self.vessel.flight(ref)
     self.check_speed(flight, ref)
     self.assertClose(2246.1, flight.speed, error=0.1)
     self.assertClose(2246.1, flight.horizontal_speed, error=0.1)
     self.assertClose(0, flight.vertical_speed, error=0.1)
开发者ID:rosalesr,项目名称:krpc,代码行数:8,代码来源:test_flight.py

示例6: setUpClass

 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))
开发者ID:Fred4106,项目名称:krpc,代码行数:9,代码来源:test_flight.py

示例7: setUpClass

 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)
开发者ID:Fred4106,项目名称:krpc,代码行数:9,代码来源:test_control.py

示例8: setUpClass

 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
开发者ID:Kerbal007,项目名称:krpc,代码行数:10,代码来源:test_vessel.py

示例9: setUpClass

 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
开发者ID:calaveraDeluxe,项目名称:krpc,代码行数:10,代码来源:test_spacecenter.py

示例10: setUpClass

 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)
开发者ID:Kerbal007,项目名称:krpc,代码行数:10,代码来源:test_control.py

示例11: setUpClass

 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)
开发者ID:rosalesr,项目名称:krpc,代码行数:11,代码来源:test_control.py

示例12: test_staging

 def test_staging(self):
     testingtools.launch_vessel_from_vab('Staging')
     testingtools.remove_other_vessels()
     testingtools.set_circular_orbit('Kerbin', 100000)
     self.conn = krpc.connect()
     self.control = self.conn.space_center.active_vessel.control
     for i in reversed(range(12)):
         self.assertEqual(i, self.control.current_stage)
         time.sleep(3)
         self.control.activate_next_stage()
     self.assertEqual(0, self.control.current_stage)
开发者ID:Fred4106,项目名称:krpc,代码行数:11,代码来源:test_control.py

示例13: setUp

 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
开发者ID:ilo,项目名称:krpc,代码行数:11,代码来源:test_parts_docking_port.py

示例14: setUpClass

    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
开发者ID:Fred4106,项目名称:krpc,代码行数:12,代码来源:test_referenceframe.py

示例15: test_pitch_control

    def test_pitch_control(self):
        testingtools.set_circular_orbit('Kerbin', 100000)
        self.conn.testing_tools.clear_rotation()

        self.auto_pilot.sas = False
        self.control.pitch = 1
        time.sleep(1)
        self.control.pitch = 0

        # Check flight is pitching in correct direction
        pitch = self.orbital_flight.pitch
        time.sleep(0.1)
        diff = pitch - self.orbital_flight.pitch
        self.assertGreater(diff, 0)
开发者ID:602p,项目名称:krpc,代码行数:14,代码来源:test_control.py


注:本文中的testingtools.set_circular_orbit函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。