# 精准着陆

PX4 支持多旋翼精准着陆（从 PX4 1.7.4版本），这一功能使用 IR-LOCK 传感器和 IR 信标（如 IR-LOCK MarkOne ）以及朝下的距离传感器。 这使飞行器能以约 10 cm 的精度着陆（相比之下，GPS 的精度可能达到几米）。

## 设置

### 固件配置

drivers/irlock
modules/landing_target_estimator


## 执行精准着陆

### 通过命令

commander mode auto:precland


### In a Mission

Precision landing can be initiated as part of a mission using MAV_CMD_NAV_LAND with param2 set appropriately:

• param2 = 0: 正常着陆而不使用信标。
• param2 = 1：随机的 精准着陆。
• param2 = 2：必需的 精准着陆。

## 仿真

Precision landing with the IR-LOCK sensor and beacon can be simulated in SITL Gazebo.

To start the simulation with the world that contains a IR-LOCK beacon and a vehicle with a range sensor and IR-LOCK camera, run:

make px4_sitl gazebo_iris_irlock


You can change the location of the beacon either by moving it in the Gazebo GUI or by changing its location in the Gazebo world.

## 工作原理

### 着陆目标估计器

The landing_target_estimator takes measurements from the irlock driver as well as the estimated terrain height to estimate the beacon's position relative to the vehicle.

The measurements in irlock_report contain the tangent of the angles from the image center to the beacon. In other words, the measurements are the x and y components of the vector pointing towards the beacon, where the z component has length "1". This means that scaling the measurement by the distance from the camera to the beacon results in the vector from the camera to the beacon. This relative position is then rotated into the north-aligned, level body frame using the vehicle's attitude estimate. Both x and y components of the relative position measurement are filtered in separate Kalman Filters, which act as simple low-pass filters that also produce a velocity estimate and allow for outlier rejection.

The landing_target_estimator publishes the estimated relative position and velocity whenever a new irlock_report is fused into the estimate. Nothing is published if the beacon is not seen or beacon measurements are rejected. The landing target estimate is published in the landing_target_pose uORB message.

### 改进的飞行器位置估计

If the beacon is specified to be stationary using the parameter LTEST_MODE, the vehicle's position/velocity estimate can be improved with the help of the beacon measurements. This is done by fusing the beacon's velocity as a measurement of the negative velocity of the vehicle.

### 精准着陆过程

The precision land procedure consists of three phases:

1. 水平接近：飞行器在保持其当前高度的同时水平接近信标。 一旦信标相对于车辆的位置差异低于阈值（ PLD_HACC_RAD ），就进入下一阶段。 如果信标在此阶段丢失（不可见超过时长 PLD_BTOUT ），则启动搜索程序（在必须的精准降落模式）或飞行器正常着陆（在随机的精准降落模式）。

2. 信标上方降落：飞行器下降，同时保持在信标中心上方。 如果信标在此阶段丢失（不可见超过时长PLD_BTOUT），则启动搜索程序（在必须的精准降落模式）或飞行器正常着陆（在随机的精准降落模式）。

3. 最终接近：当飞行器接近地面（高度小于 PLD_FAPPR_ALT ）时，飞行器会下降，同时保持在信标中心上方。 如果信标在此阶段丢失，则会继续下降，与精准着陆的类型无关。

Search procedures are initiated in 1. and 2. a maximum of PLD_MAX_SRCH times.