.. default-domain:: cpp
.. highlight:: cpp
.. namespace:: krpc::services::MechJeb

ManeuverPlanner
===============


.. class:: ManeuverPlanner



   .. function:: OperationApoapsis operation_apoapsis()



      :Game Scenes: Flight

   .. function:: OperationCircularize operation_circularize()



      :Game Scenes: Flight

   .. function:: OperationCourseCorrection operation_course_correction()



      :Game Scenes: Flight

   .. function:: OperationEllipticize operation_ellipticize()



      :Game Scenes: Flight

   .. function:: OperationInclination operation_inclination()



      :Game Scenes: Flight

   .. function:: OperationInterplanetaryTransfer operation_interplanetary_transfer()



      :Game Scenes: Flight

   .. function:: OperationKillRelVel operation_kill_rel_vel()



      :Game Scenes: Flight

   .. function:: OperationLambert operation_lambert()



      :Game Scenes: Flight

   .. function:: OperationLan operation_lan()



      :Game Scenes: Flight

   .. function:: OperationLongitude operation_longitude()



      :Game Scenes: Flight

   .. function:: OperationMoonReturn operation_moon_return()



      :Game Scenes: Flight

   .. function:: OperationPeriapsis operation_periapsis()



      :Game Scenes: Flight

   .. function:: OperationPlane operation_plane()



      :Game Scenes: Flight

   .. function:: OperationResonantOrbit operation_resonant_orbit()



      :Game Scenes: Flight

   .. function:: OperationSemiMajor operation_semi_major()



      :Game Scenes: Flight

   .. function:: OperationTransfer operation_transfer()



      :Game Scenes: Flight



.. namespace:: krpc::services::MechJeb
.. class:: OperationException

   This exception is thrown when there is something wrong with the operation (e.g. the target is not set when the operation needs it).



TimeSelector
------------


.. class:: TimeSelector



   .. function:: double circularize_altitude()
   .. function:: void set_circularize_altitude(double value)

      To be used with :enumerator:`TimeReference::altitude`.

      :Game Scenes: Flight

   .. function:: double lead_time()
   .. function:: void set_lead_time(double value)

      To be used with :enumerator:`TimeReference::x_from_now`.

      :Game Scenes: Flight

   .. function:: TimeReference time_reference()
   .. function:: void set_time_reference(TimeReference value)



      :Game Scenes: Flight



.. namespace:: krpc::services::MechJeb
.. enum-struct:: TimeReference




   .. enumerator:: altitude

      At the selected :func:`TimeSelector::circularize_altitude`.


   .. enumerator:: apoapsis

      At the next apoapsis.


   .. enumerator:: closest_approach

      At the closest approach to the target.


   .. enumerator:: computed

      At the optimum time.


   .. enumerator:: eq_ascending

      At the equatorial ascending node.


   .. enumerator:: eq_descending

      At the equatorial descending node.


   .. enumerator:: eq_highest_ad

      At the cheapest equatorial AN/DN.


   .. enumerator:: eq_nearest_ad

      At the nearest equatorial AN/DN.


   .. enumerator:: periapsis

      At the next periapsis.


   .. enumerator:: rel_ascending

      At the next ascending node with the target.


   .. enumerator:: rel_descending

      At the next descending node with the target.


   .. enumerator:: rel_highest_ad

      At the cheapest AN/DN with the target.


   .. enumerator:: rel_nearest_ad

      At the nearest AN/DN with the target.


   .. enumerator:: x_from_now

      After a fixed :func:`TimeSelector::lead_time`.



Operations
----------

OperationApoapsis
^^^^^^^^^^^^^^^^^


.. class:: OperationApoapsis

   Create a maneuver to set a new apoapsis

   .. function:: std::string error_message()

      A warning may be stored there during MakeNode() call.

      :Game Scenes: Flight

   .. function:: SpaceCenter::Node make_node()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: The first maneuver node necessary to perform this operation.
      :Game Scenes: Flight


      .. note::

         This method is deprecated, use MakeNodes instead.

   .. function:: std::vector<SpaceCenter::Node> make_nodes()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: A list of maneuver nodes necessary to perform this operation
      :Game Scenes: Flight

   .. function:: double new_apoapsis()
   .. function:: void set_new_apoapsis(double value)



      :Game Scenes: Flight

   .. function:: TimeSelector time_selector()



      :Game Scenes: Flight



OperationCircularize
^^^^^^^^^^^^^^^^^^^^


.. class:: OperationCircularize

   This mode creates a manevuer to match your apoapsis to periapsis.
   To match apoapsis to periapsis, set the time to :enumerator:`TimeReference::periapsis`; to match periapsis to apoapsis, set the time to :enumerator:`TimeReference::apoapsis`. These are the most efficient, but it can also create node at specific height or after specific time.

   .. function:: std::string error_message()

      A warning may be stored there during MakeNode() call.

      :Game Scenes: Flight

   .. function:: SpaceCenter::Node make_node()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: The first maneuver node necessary to perform this operation.
      :Game Scenes: Flight


      .. note::

         This method is deprecated, use MakeNodes instead.

   .. function:: std::vector<SpaceCenter::Node> make_nodes()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: A list of maneuver nodes necessary to perform this operation
      :Game Scenes: Flight

   .. function:: TimeSelector time_selector()



      :Game Scenes: Flight



OperationCourseCorrection
^^^^^^^^^^^^^^^^^^^^^^^^^


.. class:: OperationCourseCorrection

   Create a maneuver to fine-tune closest approach to target

   .. function:: double course_correct_final_pe_a()
   .. function:: void set_course_correct_final_pe_a(double value)



      :Game Scenes: Flight

   .. function:: std::string error_message()

      A warning may be stored there during MakeNode() call.

      :Game Scenes: Flight

   .. function:: double intercept_distance()
   .. function:: void set_intercept_distance(double value)



      :Game Scenes: Flight

   .. function:: SpaceCenter::Node make_node()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: The first maneuver node necessary to perform this operation.
      :Game Scenes: Flight


      .. note::

         This method is deprecated, use MakeNodes instead.

   .. function:: std::vector<SpaceCenter::Node> make_nodes()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: A list of maneuver nodes necessary to perform this operation
      :Game Scenes: Flight



OperationEllipticize
^^^^^^^^^^^^^^^^^^^^


.. class:: OperationEllipticize

   Create a maneuver to change both periapsis and apoapsis

   .. function:: std::string error_message()

      A warning may be stored there during MakeNode() call.

      :Game Scenes: Flight

   .. function:: SpaceCenter::Node make_node()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: The first maneuver node necessary to perform this operation.
      :Game Scenes: Flight


      .. note::

         This method is deprecated, use MakeNodes instead.

   .. function:: std::vector<SpaceCenter::Node> make_nodes()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: A list of maneuver nodes necessary to perform this operation
      :Game Scenes: Flight

   .. function:: double new_apoapsis()
   .. function:: void set_new_apoapsis(double value)



      :Game Scenes: Flight

   .. function:: double new_periapsis()
   .. function:: void set_new_periapsis(double value)



      :Game Scenes: Flight

   .. function:: TimeSelector time_selector()



      :Game Scenes: Flight



OperationInclination
^^^^^^^^^^^^^^^^^^^^


.. class:: OperationInclination

   Create a maneuver to change inclination

   .. function:: std::string error_message()

      A warning may be stored there during MakeNode() call.

      :Game Scenes: Flight

   .. function:: SpaceCenter::Node make_node()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: The first maneuver node necessary to perform this operation.
      :Game Scenes: Flight


      .. note::

         This method is deprecated, use MakeNodes instead.

   .. function:: std::vector<SpaceCenter::Node> make_nodes()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: A list of maneuver nodes necessary to perform this operation
      :Game Scenes: Flight

   .. function:: double new_inclination()
   .. function:: void set_new_inclination(double value)



      :Game Scenes: Flight

   .. function:: TimeSelector time_selector()



      :Game Scenes: Flight



OperationInterplanetaryTransfer
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


.. class:: OperationInterplanetaryTransfer

   Create a maneuver to transfer to another planet

   .. function:: std::string error_message()

      A warning may be stored there during MakeNode() call.

      :Game Scenes: Flight

   .. function:: SpaceCenter::Node make_node()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: The first maneuver node necessary to perform this operation.
      :Game Scenes: Flight


      .. note::

         This method is deprecated, use MakeNodes instead.

   .. function:: std::vector<SpaceCenter::Node> make_nodes()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: A list of maneuver nodes necessary to perform this operation
      :Game Scenes: Flight

   .. function:: bool wait_for_phase_angle()
   .. function:: void set_wait_for_phase_angle(bool value)



      :Game Scenes: Flight



OperationKillRelVel
^^^^^^^^^^^^^^^^^^^


.. class:: OperationKillRelVel

   Match velocities with target

   .. function:: std::string error_message()

      A warning may be stored there during MakeNode() call.

      :Game Scenes: Flight

   .. function:: SpaceCenter::Node make_node()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: The first maneuver node necessary to perform this operation.
      :Game Scenes: Flight


      .. note::

         This method is deprecated, use MakeNodes instead.

   .. function:: std::vector<SpaceCenter::Node> make_nodes()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: A list of maneuver nodes necessary to perform this operation
      :Game Scenes: Flight

   .. function:: TimeSelector time_selector()



      :Game Scenes: Flight



OperationLambert
^^^^^^^^^^^^^^^^


.. class:: OperationLambert

   Create a maneuver to set the chosen time

   .. function:: std::string error_message()

      A warning may be stored there during MakeNode() call.

      :Game Scenes: Flight

   .. function:: double intercept_interval()
   .. function:: void set_intercept_interval(double value)



      :Game Scenes: Flight

   .. function:: SpaceCenter::Node make_node()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: The first maneuver node necessary to perform this operation.
      :Game Scenes: Flight


      .. note::

         This method is deprecated, use MakeNodes instead.

   .. function:: std::vector<SpaceCenter::Node> make_nodes()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: A list of maneuver nodes necessary to perform this operation
      :Game Scenes: Flight

   .. function:: TimeSelector time_selector()



      :Game Scenes: Flight



OperationLan
^^^^^^^^^^^^


.. class:: OperationLan

   Change longitude of ascending node

   .. function:: std::string error_message()

      A warning may be stored there during MakeNode() call.

      :Game Scenes: Flight

   .. function:: SpaceCenter::Node make_node()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: The first maneuver node necessary to perform this operation.
      :Game Scenes: Flight


      .. note::

         This method is deprecated, use MakeNodes instead.

   .. function:: std::vector<SpaceCenter::Node> make_nodes()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: A list of maneuver nodes necessary to perform this operation
      :Game Scenes: Flight

   .. function:: double new_lan()
   .. function:: void set_new_lan(double value)



      :Game Scenes: Flight

   .. function:: TimeSelector time_selector()



      :Game Scenes: Flight



OperationLongitude
^^^^^^^^^^^^^^^^^^


.. class:: OperationLongitude

   Change surface longitude of apsis

   .. function:: std::string error_message()

      A warning may be stored there during MakeNode() call.

      :Game Scenes: Flight

   .. function:: SpaceCenter::Node make_node()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: The first maneuver node necessary to perform this operation.
      :Game Scenes: Flight


      .. note::

         This method is deprecated, use MakeNodes instead.

   .. function:: std::vector<SpaceCenter::Node> make_nodes()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: A list of maneuver nodes necessary to perform this operation
      :Game Scenes: Flight

   .. function:: double new_surface_longitude()
   .. function:: void set_new_surface_longitude(double value)



      :Game Scenes: Flight

   .. function:: TimeSelector time_selector()



      :Game Scenes: Flight



OperationMoonReturn
^^^^^^^^^^^^^^^^^^^


.. class:: OperationMoonReturn

   Create a maneuver to return from a moon approximately at the specified altitude

   .. function:: std::string error_message()

      A warning may be stored there during MakeNode() call.

      :Game Scenes: Flight

   .. function:: SpaceCenter::Node make_node()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: The first maneuver node necessary to perform this operation.
      :Game Scenes: Flight


      .. note::

         This method is deprecated, use MakeNodes instead.

   .. function:: std::vector<SpaceCenter::Node> make_nodes()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: A list of maneuver nodes necessary to perform this operation
      :Game Scenes: Flight

   .. function:: double moon_return_altitude()
   .. function:: void set_moon_return_altitude(double value)

      Approximate return altitude from a moon (from an orbiting body to the parent body).

      :Game Scenes: Flight



OperationPeriapsis
^^^^^^^^^^^^^^^^^^


.. class:: OperationPeriapsis

   Create a maneuver to set a new periapsis

   .. function:: std::string error_message()

      A warning may be stored there during MakeNode() call.

      :Game Scenes: Flight

   .. function:: SpaceCenter::Node make_node()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: The first maneuver node necessary to perform this operation.
      :Game Scenes: Flight


      .. note::

         This method is deprecated, use MakeNodes instead.

   .. function:: std::vector<SpaceCenter::Node> make_nodes()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: A list of maneuver nodes necessary to perform this operation
      :Game Scenes: Flight

   .. function:: double new_periapsis()
   .. function:: void set_new_periapsis(double value)



      :Game Scenes: Flight

   .. function:: TimeSelector time_selector()



      :Game Scenes: Flight



OperationPlane
^^^^^^^^^^^^^^


.. class:: OperationPlane

   Create a maneuver to match planes with target

   .. function:: std::string error_message()

      A warning may be stored there during MakeNode() call.

      :Game Scenes: Flight

   .. function:: SpaceCenter::Node make_node()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: The first maneuver node necessary to perform this operation.
      :Game Scenes: Flight


      .. note::

         This method is deprecated, use MakeNodes instead.

   .. function:: std::vector<SpaceCenter::Node> make_nodes()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: A list of maneuver nodes necessary to perform this operation
      :Game Scenes: Flight

   .. function:: TimeSelector time_selector()



      :Game Scenes: Flight



OperationResonantOrbit
^^^^^^^^^^^^^^^^^^^^^^


.. class:: OperationResonantOrbit

   Resonant orbit is useful for placing satellites to a constellation. This mode should be used starting from a orbit in the desired orbital plane. Important parameter to this mode is the desired orbital ratio, which is the ratio between period of your current orbit and the new orbit.
   To deploy satellites, set the denominator to number of satellites you want to have in the constellation. Setting the nominator to one less than denominator is the most efficient, but not necessary the fastest. To successfully deploy all satellites, make sure the numbers are incommensurable.

   .. function:: std::string error_message()

      A warning may be stored there during MakeNode() call.

      :Game Scenes: Flight

   .. function:: SpaceCenter::Node make_node()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: The first maneuver node necessary to perform this operation.
      :Game Scenes: Flight


      .. note::

         This method is deprecated, use MakeNodes instead.

   .. function:: std::vector<SpaceCenter::Node> make_nodes()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: A list of maneuver nodes necessary to perform this operation
      :Game Scenes: Flight

   .. function:: int32_t resonance_denominator()
   .. function:: void set_resonance_denominator(int32_t value)



      :Game Scenes: Flight

   .. function:: int32_t resonance_numerator()
   .. function:: void set_resonance_numerator(int32_t value)



      :Game Scenes: Flight

   .. function:: TimeSelector time_selector()



      :Game Scenes: Flight



OperationSemiMajor
^^^^^^^^^^^^^^^^^^


.. class:: OperationSemiMajor

   Create a maneuver to set a new semi-major axis

   .. function:: std::string error_message()

      A warning may be stored there during MakeNode() call.

      :Game Scenes: Flight

   .. function:: SpaceCenter::Node make_node()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: The first maneuver node necessary to perform this operation.
      :Game Scenes: Flight


      .. note::

         This method is deprecated, use MakeNodes instead.

   .. function:: std::vector<SpaceCenter::Node> make_nodes()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: A list of maneuver nodes necessary to perform this operation
      :Game Scenes: Flight

   .. function:: double new_semi_major_axis()
   .. function:: void set_new_semi_major_axis(double value)



      :Game Scenes: Flight

   .. function:: TimeSelector time_selector()



      :Game Scenes: Flight



OperationTransfer
^^^^^^^^^^^^^^^^^


.. class:: OperationTransfer

   Bi-impulsive (Hohmann) transfer to target.

   This option is used to plan transfer to target in single sphere of influence. It is suitable for rendezvous with other vessels or moons.
   Contrary to the name, the transfer is often uni-impulsive. You can select when you want the manevuer to happen or select optimum time.

   .. function:: std::string error_message()

      A warning may be stored there during MakeNode() call.

      :Game Scenes: Flight

   .. function:: SpaceCenter::Node make_node()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: The first maneuver node necessary to perform this operation.
      :Game Scenes: Flight


      .. note::

         This method is deprecated, use MakeNodes instead.

   .. function:: std::vector<SpaceCenter::Node> make_nodes()

      Execute the operation and create appropriate maneuver nodes.
      A warning may be stored in ErrorMessage during this process; so it may be useful to check its value.

      OperationException is thrown when there is something wrong with the operation.
      MJServiceException - Internal service error.


      :returns: A list of maneuver nodes necessary to perform this operation
      :Game Scenes: Flight

   .. function:: bool intercept_only()
   .. function:: void set_intercept_only(bool value)

      Intercept only, no capture burn (impact/flyby)

      :Game Scenes: Flight

   .. function:: double period_offset()
   .. function:: void set_period_offset(double value)

      Fractional target period offset

      :Game Scenes: Flight

   .. function:: bool simple_transfer()
   .. function:: void set_simple_transfer(bool value)

      Simple coplanar Hohmann transfer.
      Set it to true if you are used to the old version of transfer maneuver.

      :Game Scenes: Flight


      .. note::

         If set to true, TimeSelector property is ignored.

   .. function:: TimeSelector time_selector()



      :Game Scenes: Flight