Exemple #1
0
void control_init() {
    // initialize the autopilot class and build the structures from the
    // configuration file values
    ap.init();
    ap.build();

    // initialize the flight control output property nodes
    aileron_out_node = fgGetNode("/controls/flight/aileron", true);
    elevator_out_node = fgGetNode("/controls/flight/elevator", true);
    throttle_out_node = fgGetNode("/engines/engine[0]/throttle", true);
    rudder_out_node = fgGetNode("/controls/flight/rudder", true);

    ap_target = fgGetNode("/autopilot/settings/target-roll-deg", true);

    elevon_mix = fgGetNode("/config/autopilot/elevon-mixing", true);
}
Exemple #2
0
void control_init() {
    // initialize the autopilot class and build the structures from the
    // configuration file values

    bind_properties();

    ap.init();
    ap.build();

    // set default autopilot modes
    // ap_heading_mode_node->setStringValue("route");
    // ap_roll_mode_node->setStringValue("aileron");
    // ap_yaw_mode_node->setStringValue("turn-coord");
    // ap_altitude_mode_node->setStringValue("pitch");
    // ap_speed_mode_node->setStringValue("throttle");
    // ap_pitch_mode_node->setStringValue("elevator");

    if ( display_on ) {
	printf("Autopilot initialized\n");
    }
}