.. default-domain:: cs .. highlight:: csharp .. namespace:: KRPC.Client.Services.MechJeb RoverAutopilot ============== .. class:: RoverAutopilot The Rover Autopilot window, which drives a rover at a heading and speed, or along its waypoints. .. property:: bool ControlHeading { get; set; } Whether the autopilot holds :prop:`RoverAutopilot.Heading`. :Game Scenes: Flight .. property:: double Heading { get; set; } The heading to hold, in degrees. :Game Scenes: Flight .. note:: Requires :prop:`RoverAutopilot.ControlHeading`. .. property:: double HeadingError { get; } The difference between the vessel's heading and the heading to hold, in degrees. :Game Scenes: Flight .. property:: bool ControlSpeed { get; set; } Whether the autopilot holds :prop:`RoverAutopilot.Speed`. :Game Scenes: Flight .. property:: double Speed { get; set; } The speed to hold, in :math:`\mathrm{m/s}`. :Game Scenes: Flight .. note:: Requires :prop:`RoverAutopilot.ControlSpeed`. .. property:: double SpeedError { get; } The difference between the vessel's speed and the speed to hold, in :math:`\mathrm{m/s}`. :Game Scenes: Flight .. property:: double TargetSpeed { get; } The speed the autopilot drives at now, in :math:`\mathrm{m/s}`. :Game Scenes: Flight .. property:: bool StabilityControl { get; set; } Whether the autopilot keeps the rover upright. :Game Scenes: Flight .. property:: bool BrakeOnEject { get; set; } Whether to brake when the crew leaves the rover. :Game Scenes: Flight .. property:: bool BrakeOnEnergyDepletion { get; set; } Whether to brake when the rover runs out of electric charge. :Game Scenes: Flight .. property:: bool WarpToDaylight { get; set; } Whether to warp time to daylight after braking for a lack of electric charge. :Game Scenes: Flight .. note:: Requires :prop:`RoverAutopilot.BrakeOnEnergyDepletion`. .. property:: System.Collections.Generic.IList Waypoints { get; } The waypoints, in the order the rover drives to them. :Game Scenes: Flight .. property:: int WaypointIndex { get; } The index of the waypoint the autopilot drives to, or -1 if there is none. :Game Scenes: Flight .. property:: bool LoopWaypoints { get; set; } Whether to return to the first waypoint after the last one. :Game Scenes: Flight .. function:: RoverWaypoint AddWaypoint(double latitude, double longitude) 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. :Game Scenes: Flight .. function:: void ClearWaypoints() Remove all the waypoints. :Game Scenes: Flight .. function:: RoverWaypoint AddTarget() 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. :Game Scenes: Flight .. function:: void DriveToTarget() 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. :Game Scenes: Flight .. function:: void Drive() Drive along the waypoints. Throws an exception if there are none. :Game Scenes: Flight .. function:: void Stop() Stop driving along the waypoints. :Game Scenes: Flight RoverWaypoint ------------- .. class:: RoverWaypoint A waypoint of the :type:`RoverAutopilot`, as the Waypoints window shows it. .. note:: The object is destroyed once the waypoints are cleared or replaced, as by :meth:`RoverAutopilot.ClearWaypoints` and :meth:`RoverAutopilot.DriveToTarget`. .. property:: double Latitude { get; set; } The latitude of the waypoint, in degrees. Throws an exception when set if the waypoint is at a vessel. :Game Scenes: Flight .. property:: double Longitude { get; set; } The longitude of the waypoint, in degrees. Throws an exception when set if the waypoint is at a vessel. :Game Scenes: Flight .. property:: float Radius { get; set; } The distance from the waypoint at which the rover has reached it, in meters. :Game Scenes: Flight .. property:: string Name { get; set; } The name of the waypoint. :Game Scenes: Flight .. property:: float MinSpeed { get; set; } The lowest speed on the way to the waypoint, in :math:`\mathrm{m/s}`, or 0 for no limit. :Game Scenes: Flight .. property:: float MaxSpeed { get; set; } The highest speed on the way to the waypoint, in :math:`\mathrm{m/s}`, or 0 for no limit. :Game Scenes: Flight