def transfer(self):
# -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# L U N A R #
# T R A N S F E R #
# -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
self.control.rcs = False
self.control.throttle = 0
time.sleep(1)
self.ap.reference_frame = self.vessel.orbital_reference_frame
self.ap.target_direction = (0, 1, 0)
self.ap.engage()
print(self.mode)
while self.mode != "Xfered":
self.injection_ETA = self.xfer_ETA(self.ut() + self.seconds_finder(5, 16, 00),
self.moon_LAN(), self.moon_argument_of_periapsis())
if self.mode == "Testing":
print(np.rad2deg(self.moon_mean_anomaly()))
self.mode = "Xfered"
if self.mode == "LEO Cruise":
self.KSC.warp_to(self.ut() + self.injection_ETA - 140)
if self.injection_ETA < 130: self.mode = "AoA"; print(self.mode); time.sleep(2)
if self.mode == "AoA":
print(self.injection_ETA)
if self.injection_ETA > 170: self.mode = "LEO Cruise"
if self.injection_ETA > 25: self.fix_aoa(self.injection_ETA)
elif self.injection_ETA <= 25: self.xfer()
if self.mode == "Injection":
self.flameout("Transfer")
if self.vessel.mass < 20: self.mode = "Xfered"; print(self.mode)
time.sleep(.1)
print("Done")
评论列表
文章目录