Pixhawk fixed-wing take-off logic analysis

The takeoff logic of pixhawk is in runwaytakeoff.cpp.

The first is the initialization init function of the state quantity, and the input quantity is the initial yaw angle, longitude and latitude. The initialized quantities include the yaw angle, the initialized enable, the current state of the aircraft (throttle_ramp), the initial time _initialized_time = hrt_absolute_time(), the climbout state entry, and the starting latitude and longitude.

The following is the update status. The take-off status of the aircraft includes: accelerator status, roll status, take-off status, and climb status.

When the aircraft is initialized, the aircraft enters the throttle_ramp state of the throttle, and the throttle response at this time is as shown in the figure:


If the throttle rise time is greater than the specified _throttle_ramp_time, the aircraft will accelerate into the CLAMPED_TO_RUNWAY state, and the throttle response at this time is shown in the figure.



If the aircraft speed is greater than the specified take-off speed _airspeed_min.get() * _min_airspeed_scaling.get(), the aircraft enters the take-off state, and the small horn on the ground station displays "#Takeoff airspeed reached". take off

If the current altitude is greater than a set altitude, the aircraft enters the climbout state;

If the current altitude is greater than another value, the aircraft enters the flight mode fly and goes to the set takeoff waypoint.


Other times the throttle is


px4 grammar learning:

1. mavlink_log_info(mavlink_log_pub, "#Takeoff airspeed reached"), is to send data to the ground station through MavLink, and the data or message displayed by mavlink_log_pub of the ground station;

2. hrt_elapsed_time(&_initialized_time) calculates the time elapsed since the start of _initialized_time, 10s is 10*1e6,


Questions: 1. What is heading hold mode?

2. How do _airspeed_min.get() * _min_airspeed_scaling.get(), nav_alt.get() get2?


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324849493&siteId=291194637