Skip to main content

Module view

Module view 

Source
Expand description

View: runs a Guidance or Stabilizer in a body frame rotated by a constant, so a tailsitter hovers nose up on the copter controllers.

A tailsitter’s body frame is the airplane’s (x along the nose), so hover sits at pitch 90°, the Euler singularity, where roll and heading turn about the same axis. Like ArduPilot, the hover controllers run in a view rotated 90° in pitch, where nose-up hover reads level: ArduPilot builds its tailsitter’s VTOL attitude, position, and navigation controllers on an AHRS view with ROTATION_PITCH_90 (ArduPlane/quadplane.cpp, create_view), which rotates the attitude and gyro into the view (libraries/AP_AHRS/AP_AHRS_View.cpp). PX4 rotates the other way: its tailsitter’s body frame is the hover frame, and its fixed-wing controllers take the rotated view (_q_mc_to_fw in fw_att_control); a View serves either.

In the view the vehicle’s belly is forward: tilting the nose toward the belly is how a tailsitter tips into forward flight, belly down. Its axes are the airplane’s turned: view roll is airplane yaw, view pitch is pitch, and view yaw is airplane −roll. Gains for a viewed controller are in those view axes.

The view’s Euler angles are singular at view pitch ±90°, which is forward flight, not hover. The transition pitches toward it, so a viewed CopterStabilizer works from a quaternion attitude error, not Euler differences.

Structs§

View
A Guidance or Stabilizer run in a body frame rotated by a constant.

Functions§

tailsitter_rotation
A tailsitter’s hover view rotation: the airplane body frame turned −90° in pitch, so nose-up hover reads level (ArduPilot’s ROTATION_PITCH_90 view). View::tailsitter flies in it, and a ground station shows hover attitude in it.