I'm analysing the ArduPlane code(2.6) in order to design a Simulink model of the Ardu-Pilot flight controller.

Now I have a question about the navigate() function in navigation.pde. After calculating the target_bearing_cd the nav_bearing_cd should be calculated to include cross-track correction. But I can't find a call-up of the cross-trackfunction in AUTO mode.

Can anyone help me?

    // target_bearing is where we should be heading
    // --------------------------------------------
    target_bearing_cd       = get_bearing_cd(&current_loc, &next_WP);
    // nav_bearing will includes xtrac correction
    // ------------------------------------------
    nav_bearing_cd = target_bearing_cd;

Views: 181

Reply to This

Replies to This Discussion


I am attempting to create a simulink/matlab model of the APM controller, were you successful in getting a simulink model in your work?

Hello, yes I was successful! It was a part of my bachelor's thesis. However it's two years ago so it's an old version of ArduPlane now.

Reply to Discussion


© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service