ManeuverPlanner#
- class MechJeb.ManeuverPlanner#
The Maneuver Planner window, which makes maneuver nodes for its operations, and executes them.
Note
MechJeb shares the operations, and most of their settings, between vessels.
-
operation_advanced_transfer:
MechJeb.OperationAdvancedTransfer# The operation that transfers to another planet, at the departure that needs the least delta-v.
- Attribute:
Read-only, cannot be set
-
operation_apoapsis:
MechJeb.OperationApoapsis# The operation that changes the apoapsis.
- Attribute:
Read-only, cannot be set
-
operation_circularize:
MechJeb.OperationCircularize# The operation that circularizes the orbit.
- Attribute:
Read-only, cannot be set
-
operation_course_correction:
MechJeb.OperationCourseCorrection# The operation that fine tunes the closest approach to the target.
- Attribute:
Read-only, cannot be set
-
operation_eccentricity:
MechJeb.OperationEccentricity# The operation that changes the eccentricity.
- Attribute:
Read-only, cannot be set
-
operation_ellipticize:
MechJeb.OperationEllipticize# The operation that changes both the periapsis and the apoapsis.
- Attribute:
Read-only, cannot be set
-
operation_inclination:
MechJeb.OperationInclination# The operation that changes the inclination.
- Attribute:
Read-only, cannot be set
-
operation_kill_rel_vel:
MechJeb.OperationKillRelVel# The operation that matches velocities with the target.
- Attribute:
Read-only, cannot be set
-
operation_lambert:
MechJeb.OperationLambert# The operation that intercepts the target at a chosen time.
- Attribute:
Read-only, cannot be set
-
operation_lan:
MechJeb.OperationLan# The operation that changes the longitude of the ascending node.
- Attribute:
Read-only, cannot be set
-
operation_longitude:
MechJeb.OperationLongitude# The operation that changes the surface longitude of the apsis.
- Attribute:
Read-only, cannot be set
-
operation_moon_return:
MechJeb.OperationMoonReturn# The operation that returns from a moon.
- Attribute:
Read-only, cannot be set
-
operation_periapsis:
MechJeb.OperationPeriapsis# The operation that changes the periapsis.
- Attribute:
Read-only, cannot be set
-
operation_plane:
MechJeb.OperationPlane# The operation that matches planes with the target.
- Attribute:
Read-only, cannot be set
-
operation_resonant_orbit:
MechJeb.OperationResonantOrbit# The operation that changes to a resonant orbit.
- Attribute:
Read-only, cannot be set
-
operation_semi_major:
MechJeb.OperationSemiMajor# The operation that changes the semi-major axis.
- Attribute:
Read-only, cannot be set
-
operation_transfer:
MechJeb.OperationTransfer# The operation that transfers to the target.
- Attribute:
Read-only, cannot be set
- abort_node_execution()#
Stop executing the maneuver nodes.
- execute_all_nodes()#
Execute all the maneuver nodes. Throws an exception if the vessel has no maneuver node.
- execute_next_node()#
Execute the next maneuver node. Throws an exception if the vessel has no maneuver node.
-
autowarp:
boolean# Whether to warp time to the burn.
- Attribute:
Can be read or written
Note
The same setting as
MechJeb.RendezvousAutopilot.autowarp.
-
executing_node:
boolean# Whether a maneuver node is being executed.
- Attribute:
Read-only, cannot be set
-
lead_time:
number# The time before the burn at which time warp stops, in seconds.
- Attribute:
Can be read or written
-
rcs_only:
boolean# Whether to burn with the RCS thrusters in place of the engines.
- Attribute:
Can be read or written
-
kill_roll_rotation:
boolean# Whether to stop the vessel’s roll before the burn.
- Attribute:
Can be read or written
-
operation_stationary_orbit:
MechJeb.OperationStationaryOrbit# The operation that transfers to the stationary orbit of the body.
- Attribute:
Read-only, cannot be set
-
initial_warp_lead_time:
number# The time before the burn at which the first, coarse time warp stops, in seconds.
- Attribute:
Can be read or written
Note
A burn further away than this is warped to in two steps: to this time before it, then to
MechJeb.ManeuverPlanner.lead_timeonce the vessel is aligned.
-
aligned_tolerance:
number# The angle from the burn direction within which the burn starts, in degrees.
- Attribute:
Can be read or written
-
warp_aligned_tolerance:
number# The angle from the burn direction within which time warp to the burn starts, in degrees.
- Attribute:
Can be read or written
-
operation_advanced_transfer:
- class MechJeb.OperationException#
Thrown when an operation cannot make its nodes, such as when it needs a target and there is none.
Raised as a
krpc.ServerErrorwhoseserviceandnameare'MechJeb'and'OperationException'.
TimeSelector#
- class MechJeb.TimeSelector#
The time of a maneuver.
-
circularize_altitude:
number# The altitude, in meters.
- Attribute:
Can be read or written
Note
Applies to
MechJeb.TimeReference.altitude.
-
lead_time:
number# The time from now, in seconds.
- Attribute:
Can be read or written
Note
Applies to
MechJeb.TimeReference.x_from_now.
-
time_reference:
MechJeb.TimeReference# The time reference. Throws an exception if set to a reference the operation does not allow.
- Attribute:
Can be read or written
-
circularize_altitude:
- class MechJeb.TimeReference#
The time reference of a maneuver. See
MechJeb.TimeSelector.time_reference.- computed#
At the optimum time.
- x_from_now#
- apoapsis#
At the next apoapsis.
- periapsis#
At the next periapsis.
- altitude#
- eq_ascending#
At the equatorial ascending node.
- eq_descending#
At the equatorial descending node.
- rel_ascending#
At the next ascending node with the target.
- rel_descending#
At the next descending node with the target.
- closest_approach#
At the closest approach to the target.
- eq_highest_ad#
At the cheaper of the equatorial ascending and descending nodes.
- eq_nearest_ad#
At the nearer of the equatorial ascending and descending nodes.
- rel_highest_ad#
At the cheaper of the ascending and descending nodes with the target.
- rel_nearest_ad#
At the nearer of the ascending and descending nodes with the target.
Operations#
OperationAdvancedTransfer#
- class MechJeb.OperationAdvancedTransfer#
An interplanetary transfer to the target body. The departure and transfer time come from a search, chosen as
MechJeb.OperationAdvancedTransfer.modesets.Note
MechJeb searches in the background. The first call to
MakeNodesstarts the search, and throws anMechJeb.OperationExceptionuntil it finishes. SeeMechJeb.OperationAdvancedTransfer.searching.-
max_arrival_time:
number# The latest arrival time, as a time from now, in seconds.
- Attribute:
Can be read or written
Note
Applies in the
MechJeb.AdvancedTransferMode.limited_timemode.MakeNodescomputes a default for a new target, from the synodic period and the transfer time, unless it was set while the target was selected.
-
include_capture_burn:
boolean# Whether to plan a capture burn at the destination.
- Attribute:
Can be read or written
-
periapsis_height:
number# The altitude of the periapsis at the destination, in meters.
- Attribute:
Can be read or written
-
searching:
boolean# Whether MechJeb is searching for the departure.
- Attribute:
Read-only, cannot be set
-
search_progress:
number# The progress of the search for the departure, as a percentage.
- Attribute:
Read-only, cannot be set
-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
mode:
MechJeb.AdvancedTransferMode# How the search chooses the departure and transfer time.
- Attribute:
Can be read or written
Note
Setting it stops a search, so the next
MakeNodesstarts one.
-
target_inclination_flag:
boolean# Whether to aim for
MechJeb.OperationAdvancedTransfer.target_inclinationat the target.- Attribute:
Can be read or written
-
target_inclination:
number# The inclination of the orbit at the target, in degrees.
- Attribute:
Can be read or written
Note
Requires
MechJeb.OperationAdvancedTransfer.target_inclination_flag.
-
search_failed:
boolean# Whether the search finished and found no transfer.
- Attribute:
Read-only, cannot be set
- select_lowest_delta_v()#
Select the departure and transfer time that need the least delta-v. The search selects them when it finishes. Throws an exception if
MechJeb.OperationAdvancedTransfer.modeis notMechJeb.AdvancedTransferMode.porkchop, or the search has not finished.
- select_asap()#
Select the earliest departure, with the transfer time that needs the least delta-v for it. Throws an exception if
MechJeb.OperationAdvancedTransfer.modeis notMechJeb.AdvancedTransferMode.porkchop, or the search has not finished.
-
select(departure_time:
number, duration:number)# Select the departure and transfer time nearest the given ones. Throws an exception if
MechJeb.OperationAdvancedTransfer.modeis notMechJeb.AdvancedTransferMode.porkchop, the search has not finished, or there is no transfer near those times.- Parameters:
departure_time – The universal time of the departure, in seconds.
duration – The transfer time, in seconds.
-
selected_departure_time:
number# The universal time of the selected departure, in seconds. Throws an exception if the search has not finished.
- Attribute:
Read-only, cannot be set
-
selected_duration:
number# The selected transfer time, in seconds. Throws an exception if the search has not finished.
- Attribute:
Read-only, cannot be set
-
selected_delta_v:
number# The delta-v of the selected transfer that the search estimates, in \(\mathrm{m/s}\). Throws an exception if the search has not finished.
- Attribute:
Read-only, cannot be set
-
max_arrival_time:
- class MechJeb.AdvancedTransferMode#
How the advanced transfer chooses the departure and transfer time. See
MechJeb.OperationAdvancedTransfer.mode.- limited_time#
The transfer that needs the least delta-v and arrives before
MechJeb.OperationAdvancedTransfer.max_arrival_time.
- porkchop#
A transfer from a grid of departures and transfer times, the porkchop plot of MechJeb’s window. The one that needs the least delta-v, unless another is selected.
OperationApoapsis#
- class MechJeb.OperationApoapsis#
Change the apoapsis.
-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
new_apoapsis:
number# The new apoapsis altitude, in meters.
- Attribute:
Can be read or written
-
time_selector:
MechJeb.TimeSelector# The time of the maneuver.
- Attribute:
Read-only, cannot be set
-
error_message:
OperationCircularize#
- class MechJeb.OperationCircularize#
Circularize the orbit.
Note
To raise the periapsis to the apoapsis, set the time to
MechJeb.TimeReference.apoapsis, and to lower the apoapsis to the periapsis, set it toMechJeb.TimeReference.periapsis. These are the cheapest.-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
time_selector:
MechJeb.TimeSelector# The time of the maneuver.
- Attribute:
Read-only, cannot be set
-
error_message:
OperationCourseCorrection#
- class MechJeb.OperationCourseCorrection#
Fine tune the closest approach to the target.
-
final_periapsis_altitude:
number# The periapsis altitude at a target body, in meters.
- Attribute:
Can be read or written
-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
intercept_distance:
number# The closest approach distance to a target vessel, in meters.
- Attribute:
Can be read or written
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
inclination_flag:
boolean# Whether to aim for
MechJeb.OperationCourseCorrection.inclinationat the target.- Attribute:
Can be read or written
Note
Applies when the target is a celestial body.
-
inclination:
number# The inclination of the orbit at the target, in degrees.
- Attribute:
Can be read or written
Note
Requires
MechJeb.OperationCourseCorrection.inclination_flag.
-
final_periapsis_altitude:
OperationEccentricity#
- class MechJeb.OperationEccentricity#
Change the eccentricity.
-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
new_eccentricity:
number# The new eccentricity.
- Attribute:
Can be read or written
-
time_selector:
MechJeb.TimeSelector# The time of the maneuver.
- Attribute:
Read-only, cannot be set
-
error_message:
OperationEllipticize#
- class MechJeb.OperationEllipticize#
Change both the periapsis and the apoapsis.
-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
new_apoapsis:
number# The new apoapsis altitude, in meters.
- Attribute:
Can be read or written
-
new_periapsis:
number# The new periapsis altitude, in meters.
- Attribute:
Can be read or written
-
time_selector:
MechJeb.TimeSelector# The time of the maneuver.
- Attribute:
Read-only, cannot be set
-
error_message:
OperationInclination#
- class MechJeb.OperationInclination#
Change the inclination.
-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
new_inclination:
number# The new inclination, in degrees.
- Attribute:
Can be read or written
-
time_selector:
MechJeb.TimeSelector# The time of the maneuver.
- Attribute:
Read-only, cannot be set
-
error_message:
OperationKillRelVel#
- class MechJeb.OperationKillRelVel#
Match velocities with the target.
-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
time_selector:
MechJeb.TimeSelector# The time of the maneuver.
- Attribute:
Read-only, cannot be set
-
error_message:
OperationLambert#
- class MechJeb.OperationLambert#
Intercept the target at a chosen time.
-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
intercept_interval:
number# The time from the maneuver to the intercept, in seconds.
- Attribute:
Can be read or written
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
time_selector:
MechJeb.TimeSelector# The time of the maneuver.
- Attribute:
Read-only, cannot be set
-
error_message:
OperationLan#
- class MechJeb.OperationLan#
Change the longitude of the ascending node.
-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
new_lan:
number# The new longitude of the ascending node, in degrees.
- Attribute:
Can be read or written
Note
MechJeb holds this value in the target controller of each vessel, as the longitude of the position target. Setting it also moves the position target.
-
time_selector:
MechJeb.TimeSelector# The time of the maneuver.
- Attribute:
Read-only, cannot be set
-
error_message:
OperationLongitude#
- class MechJeb.OperationLongitude#
Change the surface longitude of the apsis.
-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
new_surface_longitude:
number# The new surface longitude of the apsis after one orbit, in degrees.
- Attribute:
Can be read or written
Note
MechJeb holds this value in the target controller of each vessel, as the longitude of the position target. Setting it also moves the position target.
-
time_selector:
MechJeb.TimeSelector# The time of the maneuver.
- Attribute:
Read-only, cannot be set
-
error_message:
OperationMoonReturn#
- class MechJeb.OperationMoonReturn#
Return from a moon to the body it orbits.
-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
moon_return_altitude:
number# The approximate periapsis altitude at the body, in meters.
- Attribute:
Can be read or written
-
inclination_flag:
boolean# Whether to aim for
MechJeb.OperationMoonReturn.inclination.- Attribute:
Can be read or written
-
inclination:
number# The inclination of the orbit around the body after the return, in degrees.
- Attribute:
Can be read or written
Note
-
error_message:
OperationPeriapsis#
- class MechJeb.OperationPeriapsis#
Change the periapsis.
-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
new_periapsis:
number# The new periapsis altitude, in meters.
- Attribute:
Can be read or written
-
time_selector:
MechJeb.TimeSelector# The time of the maneuver.
- Attribute:
Read-only, cannot be set
-
error_message:
OperationPlane#
- class MechJeb.OperationPlane#
Match planes with the target.
-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
time_selector:
MechJeb.TimeSelector# The time of the maneuver.
- Attribute:
Read-only, cannot be set
-
error_message:
OperationResonantOrbit#
- class MechJeb.OperationResonantOrbit#
Change to a resonant orbit, to place satellites in a constellation.
Note
Start from an orbit in the plane of the constellation. To deploy satellites, set the denominator to their number. A numerator one less than the denominator is the cheapest, though not the fastest. The two numbers must have no common factor.
-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
resonance_denominator:
number# The denominator of the ratio of the new orbital period to the current one.
- Attribute:
Can be read or written
-
resonance_numerator:
number# The numerator of the ratio of the new orbital period to the current one.
- Attribute:
Can be read or written
-
time_selector:
MechJeb.TimeSelector# The time of the maneuver.
- Attribute:
Read-only, cannot be set
-
error_message:
OperationSemiMajor#
- class MechJeb.OperationSemiMajor#
Change the semi-major axis.
-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
new_semi_major_axis:
number# The new semi-major axis, in meters.
- Attribute:
Can be read or written
-
time_selector:
MechJeb.TimeSelector# The time of the maneuver.
- Attribute:
Read-only, cannot be set
-
error_message:
OperationStationaryOrbit#
- class MechJeb.OperationStationaryOrbit#
A transfer to the stationary orbit of the body, above
MechJeb.OperationStationaryOrbit.target_longitude.Note
The transfer is a Hohmann transfer with a second node to circularize. Throws an
MechJeb.OperationExceptionfromMakeNodesif the stationary orbit is outside the body’s sphere of influence.-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
target_longitude:
number# The surface longitude to stay above, in degrees.
- Attribute:
Can be read or written
-
error_message:
OperationTransfer#
- class MechJeb.OperationTransfer#
A bi-impulsive (Hohmann) transfer to the target, within one sphere of influence. It suits a rendezvous with a vessel or a transfer to a moon.
Note
Despite the name, the transfer is often uni-impulsive. It happens at the selected time, or at the optimum time.
-
error_message:
string# The warning or error from the last call to
MakeNodes, or an empty string.- Attribute:
Read-only, cannot be set
-
make_nodes():
List# Make the maneuver nodes of the operation. Throws an
MechJeb.OperationExceptionif the operation cannot make them.- Returns:
The maneuver nodes.
Note
The nodes follow the vessel’s last maneuver node, if it has one. A warning may be left in
ErrorMessage.
-
capture:
boolean# Whether the transfer ends in the target’s orbit. Without capture, it is an impact or a flyby.
- Attribute:
Can be read or written
-
plan_capture:
boolean# Whether to make a second node for the capture burn.
- Attribute:
Can be read or written
Note
Requires
MechJeb.OperationTransfer.capture. For a celestial body target, also requiresMechJeb.OperationTransfer.match_orbitor aMechJeb.OperationTransfer.lag_time.
-
match_orbit:
boolean# Whether to reach the target’s orbit, ahead of or behind the target, rather than meet the target.
- Attribute:
Can be read or written
Note
Requires
MechJeb.OperationTransfer.capture.
-
lag_time:
number# The time by which the vessel arrives behind the target, in seconds.
- Attribute:
Can be read or written
Note
Ignored with
MechJeb.OperationTransfer.match_orbit.
-
coplanar:
boolean# Whether the transfer stays in the vessel’s orbital plane.
- Attribute:
Can be read or written
-
time_selector:
MechJeb.TimeSelector# The time of the maneuver.
- Attribute:
Read-only, cannot be set
-
error_message: