RoverAutopilot#
- class MechJeb.RoverAutopilot#
The Rover Autopilot window, which drives a rover at a heading and speed, or along its waypoints.
-
control_heading:
boolean# Whether the autopilot holds
MechJeb.RoverAutopilot.heading.- Attribute:
Can be read or written
-
heading:
number# The heading to hold, in degrees.
- Attribute:
Can be read or written
Note
Requires
MechJeb.RoverAutopilot.control_heading.
-
heading_error:
number# The difference between the vessel’s heading and the heading to hold, in degrees.
- Attribute:
Read-only, cannot be set
-
control_speed:
boolean# Whether the autopilot holds
MechJeb.RoverAutopilot.speed.- Attribute:
Can be read or written
-
speed:
number# The speed to hold, in \(\mathrm{m/s}\).
- Attribute:
Can be read or written
Note
Requires
MechJeb.RoverAutopilot.control_speed.
-
speed_error:
number# The difference between the vessel’s speed and the speed to hold, in \(\mathrm{m/s}\).
- Attribute:
Read-only, cannot be set
-
target_speed:
number# The speed the autopilot drives at now, in \(\mathrm{m/s}\).
- Attribute:
Read-only, cannot be set
-
stability_control:
boolean# Whether the autopilot keeps the rover upright.
- Attribute:
Can be read or written
-
brake_on_eject:
boolean# Whether to brake when the crew leaves the rover.
- Attribute:
Can be read or written
-
brake_on_energy_depletion:
boolean# Whether to brake when the rover runs out of electric charge.
- Attribute:
Can be read or written
-
warp_to_daylight:
boolean# Whether to warp time to daylight after braking for a lack of electric charge.
- Attribute:
Can be read or written
Note
-
waypoints:
List# The waypoints, in the order the rover drives to them.
- Attribute:
Read-only, cannot be set
-
waypoint_index:
number# The index of the waypoint the autopilot drives to, or -1 if there is none.
- Attribute:
Read-only, cannot be set
-
loop_waypoints:
boolean# Whether to return to the first waypoint after the last one.
- Attribute:
Can be read or written
-
add_waypoint(latitude:
number, longitude:number):MechJeb.RoverWaypoint# Add a waypoint at a position on the surface of the body the vessel is at.
- Parameters:
latitude – The latitude, in degrees.
longitude – The longitude, in degrees.
- Returns:
The waypoint.
- clear_waypoints()#
Remove all the waypoints.
-
add_target():
MechJeb.RoverWaypoint# Add a waypoint at the target. Throws an exception if the target is not a vessel or a position on the surface.
- Returns:
The waypoint.
- drive_to_target()#
Replace the waypoints with the target, and drive to it. Throws an exception if the target is not a vessel or a position on the surface.
- drive()#
Drive along the waypoints. Throws an exception if there are none.
- stop()#
Stop driving along the waypoints.
-
control_heading:
RoverWaypoint#
- class MechJeb.RoverWaypoint#
A waypoint of the
MechJeb.RoverAutopilot, as the Waypoints window shows it.Note
The object is destroyed once the waypoints are cleared or replaced, as by
MechJeb.RoverAutopilot:clear_waypoints()andMechJeb.RoverAutopilot:drive_to_target().-
latitude:
number# The latitude of the waypoint, in degrees. Throws an exception when set if the waypoint is at a vessel.
- Attribute:
Can be read or written
-
longitude:
number# The longitude of the waypoint, in degrees. Throws an exception when set if the waypoint is at a vessel.
- Attribute:
Can be read or written
-
radius:
number# The distance from the waypoint at which the rover has reached it, in meters.
- Attribute:
Can be read or written
-
name:
string# The name of the waypoint.
- Attribute:
Can be read or written
-
min_speed:
number# The lowest speed on the way to the waypoint, in \(\mathrm{m/s}\), or 0 for no limit.
- Attribute:
Can be read or written
-
max_speed:
number# The highest speed on the way to the waypoint, in \(\mathrm{m/s}\), or 0 for no limit.
- Attribute:
Can be read or written
-
latitude: