Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print('Program Started');
- import math
- import krpc
- import time
- #SETUP
- conn = krpc.connect(name='Duna Launcher')
- ship = conn.space_center.active_vessel
- gravityTurn = 30000
- target_apoapsis = 100000
- target_periapsis = 100000
- ut = conn.add_stream(getattr, conn.space_center, 'ut')
- ######## DOES NOT WANT TO ROTATE TO PROGRADE
- ship.control.rcs = True
- for rcs in ship.parts.rcs:
- rcs.enabled = True
- print('RCS ACTIVE: ' + str(rcs.active))
- print('RCS ENABLED: ' + str(rcs.enabled))
- #ship.auto_pilot.target_pitch_and_heading(1,90)
- ## ALIGN ROCKET WITH PITCH & HEADING
- print('TESTING ROTATION')
- ship.control.sas = True
- if ship.auto_pilot.sas_mode == True:
- pass
- else:
- ship.auto_pilot.sas = True
- print('SAS ENABLED: ' + str(ship.control.sas))
- ship.auto_pilot.target_pitch = (1)
- ship.auto_pilot.target_heading = (90)
- #ship.auto_pilot.sas_mode.maneuver
- print('Orienting Ship with Maneuver Node')
- print('OVERALL ERROR: ' + str(ship.auto_pilot.error))
- print('PITCH ERROR: ' + str(ship.auto_pilot.pitch_error))
- print('HEADING ERROR: ' + str(ship.auto_pilot.heading_error))
- ship.auto_pilot.wait()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement