SpaceCenter#

Provides functionality to interact with Kerbal Space Program: vessels and their parts, celestial bodies and orbits, flight control, maneuver nodes and the auto-pilot.

Example#

The following example prints the name of the active vessel:

import krpc.client.Connection;
import krpc.client.services.SpaceCenter;


public class SpaceCenterExample {
    public static void main(String[] args) {
        Connection connection =
            Connection.newInstance("SpaceCenter Example");
        System.out.println(SpaceCenter.newInstance(connection)
            .getActiveVessel().getName());
        connection.close();
    }
}

Mods#

The SpaceCenter service supports several mods, such as Ferram Aerospace Research. The mods guide lists them, with the versions kRPC is tested with.