CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/ArduPlane/mode_fbwb.cpp
Views: 1798
1
#include "mode.h"
2
#include "Plane.h"
3
4
bool ModeFBWB::_enter()
5
{
6
#if HAL_SOARING_ENABLED
7
// for ArduSoar soaring_controller
8
plane.g2.soaring_controller.init_cruising();
9
#endif
10
11
plane.set_target_altitude_current();
12
13
return true;
14
}
15
16
void ModeFBWB::update()
17
{
18
// Thanks to Yury MonZon for the altitude limit code!
19
plane.nav_roll_cd = plane.channel_roll->norm_input() * plane.roll_limit_cd;
20
plane.update_load_factor();
21
plane.update_fbwb_speed_height();
22
23
}
24
25
26