Rescue mission almost done docking part behaves weirdly)

This commit is contained in:
2023-09-05 20:30:18 +02:00
parent 1499e737c1
commit 84b9d10c85
11 changed files with 377 additions and 231 deletions

View File

@@ -18,18 +18,18 @@ class RendezvousManeuver(MechJebManeuver):
if vessel.orbit.distance_at_closest_approach(target.orbit) > 1000:
if vessel.orbit.relative_inclination(target.orbit) > 0.0001:
AlignOrbitPlaneWithTarget(self.conn, vessel).prepare_maneuver()
AlignOrbitPlaneWithTarget(self.conn, self.mission_control).prepare_maneuver()
elif vessel.orbit.distance_at_closest_approach(target.orbit) > 10000:
InterceptTargetOrbit(self.conn, vessel).prepare_maneuver()
InterceptTargetOrbit(self.conn, self.mission_control).prepare_maneuver()
else:
TuneClosestApproach(self.conn, vessel).prepare_maneuver()
TuneClosestApproach(self.conn, self.mission_control).prepare_maneuver()
return False
elif vessel.orbit.distance_at_closest_approach(target.orbit) <= 1000 < magnitude(
np.array(vessel.position(vessel.reference_frame)) - np.array(target.position(vessel.reference_frame))):
MatchVelocityWithTarget(self.conn, vessel).prepare_maneuver()
MatchVelocityWithTarget(self.conn, self.mission_control).prepare_maneuver()
return False
else:
return True