Skip to content

Commit

Permalink
增减了飞控安装说明
Browse files Browse the repository at this point in the history
  • Loading branch information
ComerLater committed Apr 2, 2024
1 parent bfa32ba commit 4fa755e
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 19 deletions.
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

# HOME
# Home

NextPilot是一款的高性能高可靠的自动驾驶仪,支持多旋翼、复合翼、固定翼等。软件框架(param/workq)、通信中间层(uorb/mavlink)、控制算法等参考或移植于[PX4 V1.14.2](https://github.com/px4/px4-autopilot.git)项目,并基于国产[RT-Thread V5.0.2](https://github.com/RT-Thread/rt-thread/tree/v5.0.2)实时操作系统进行打造。

1. 采用国产[RT-Thread](https://rt-thread.org)实时嵌入式操作系统,拥有高可靠和自主可控等特性;
1. 支持[MATLAB/Simulink](https://www.mathworks.com)工具链,应用MBD进行飞控算法设计、仿真、验证;
1. 支持模型在环(MIL)、软件在环(SIL)、硬件在环(HIL)、仿真在环(SIH)等各种飞行验证。
1. 支持模型在环(MIL)、软件在环(SIL)、硬件在环(HIL)、仿真在环(SIH)等各种飞行验证。
4 changes: 0 additions & 4 deletions docs/develop/01.快速入门/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/develop/03.系统框架/README.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,50 @@
# 安装飞控
# 飞控安装

## 飞控朝向
The flight controller should be placed on the frame as close as possible to the centre-of-gravity (CoG), top-side up, and oriented so that the _heading mark arrow_ points towards the front of the vehicle.
[Vibration isolation](#vibration-isolation) is often needed, and you should follow the manufacturer recommendations.
If mounted in this way, no further PX4 configuration is required.

## 减震隔离
## Orientation

## 升级固件
Almost all Flight Controllers have a _heading mark arrow_ (shown below).
The controller should be placed on the frame top-side up, oriented so that the arrow points towards the front of the vehicle (on all aircraft frames - airplane, multirotor, VTOL, ground vehicles etc.).

## 水平校准
![FC Heading Mark](../../assets/qgc/setup/sensor/fc_heading_mark_1.png)

![FC Orientation](../../assets/qgc/setup/sensor/fc_orientation_1.png)

:::note
If the controller cannot be mounted in the recommended/default orientation due to physical constraints, you will need to configure the autopilot software with the orientation that you actually used: [Flight Controller Orientation](../config/flight_controller_orientation.md).
:::

## Position

The flight controller should be placed on the frame as close as possible to the centre-of-gravity.

If you can't mount the controller in this position, then you should [configure](../advanced_config/parameters.md) the following parameters to set offset relative to the CoG: [EKF2_IMU_POS_X](../advanced_config/parameter_reference.md#EKF2_IMU_POS_X), [EKF2_IMU_POS_Y](../advanced_config/parameter_reference.md#EKF2_IMU_POS_Y), [EKF2_IMU_POS_Z](../advanced_config/parameter_reference.md#EKF2_IMU_POS_Z) (for the default EKF2 estimator).

Note that if you don't set these offsets then EKF2 position/velocity estimates will be at the IMU location rather that at the CoG.
This may result in undesirable oscillations, depending on how far away the IMU is from the CoG.

::: details Explanation
To understand the impact of not setting these offsets, consider the case when the flight controller (IMU) is in front of the CoG, you're flying in position mode, and there is a forward pitching motion around the CoG.
The altitude estimate will go down, because the IMU has in fact moved down.
As a reaction, the altitude controller will give more thrust to compensate.
The amplitude depends on how far the IMU is located from the CoG.
It might be negligible, but it is still some unneeded control effort that is constantly applied.
If the offsets are specified, a pure pitch motion would not create any change in the altitude estimate so there will be less parasitic corrections.
:::

## Vibration Isolation

Flight Control boards with in-built accelerometers or gyros are sensitive to vibrations.
Some boards include in-built vibration-isolation, while others come with _mounting foam_ that you can use to isolate the controller from the vehicle.

![Pixhawk Mounting foam](../../assets/hardware/mounting/3dr_anti_vibration_mounting_foam.png)
_Vibration damping foam_

You should use the mounting strategy recommended in your flight controller documentation.

:::tip
[Log Analysis using Flight Review > Vibration](../log/flight_review.md#vibration) explains how to test whether vibration levels are acceptable, and [Vibration Isolation](../assembly/vibration_isolation.md) suggests a number of possible solutions if there is a problem.
:::
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# GPS安装

Compass and GNSS/Compass modules should be mounted on the frame as far away from motor/ESC power lines and other sources of electromagnetic interference as possible, and [oriented](#compass-orientation) upright with the direction marker pointing towards the front of the vehicle.
You should also configure PX4 to [set the position](#position) of the receiver relative to the centre-of-gravity (CoG).

On multicopters it is common to mount the compass on a pedestal, while for fixed-wing and VTOL vehicles the compass is usually mounted on a wing.

## Compass Orientation

The compass should ideally be oriented so that it is upright and the direction marker is pointing towards the front of the vehicle (the default orientation), but if needed can be oriented at multiples of 45° from this attitude (in any axis) as defined in the [standard MAVLink orientations](https://mavlink.io/en/messages/common.html#MAV_SENSOR_ORIENTATION) (these follow the same frame convention as when [orienting the flight controller](../config/flight_controller_orientation.md#calculating-orientation)).

The diagram below shows the heading marker on the Pixhawk 4 flight controller and compass.

![Connect compass/GPS to Pixhawk 4](../../assets/flight_controller/pixhawk4/pixhawk4_compass_gps.jpg)

PX4 will automatically detect the orientation for any of these standard orientations during [compass calibration](../config/compass.md) ([by default](../advanced_config/parameter_reference.md#SENS_MAG_AUTOROT)).

The compass can also be mounted at any other "custom euler angles", but in this case you will need to manually configure the orientations.
For more information see [Setting the Compass Orientation](../config/flight_controller_orientation.md#setting-the-compass-orientation) in _Flight Controller/Sensor Orientation_.

## Position

In order to compensate for the relative motion between the receiver and the CoG, you should [configure](../advanced_config/parameters.md) the following parameters to set the offsets: [EKF2_GPS_POS_X](../advanced_config/parameter_reference.md#EKF2_GPS_POS_X), [EKF2_GPS_POS_Y](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Y) and [EKF2_GPS_POS_Z](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Z).

This is important because the body frame estimated by the EKF will converge on the location of the GNSS module and assume it to be at the CoG. If the GNSS module is significantly offset from the CoG, then rotation around the COG will be interpreted as an altitude change, which in some flight modes (such as position mode) will result in unnecessary corrections.

It is particularly important if using [RTK GNSS](../advanced/rtk_gps.md) which has centimeter-level accuracy, because if the offsets are not set then GNSS measurements will often be rejected as inconsistent with the current EFK estimate.

::: details Explanation
For example, if the GNSS module is 10cm above the CoG, and the IMU is located at the GoG, a pitch motion of 1 rad/s will create a GNSS velocity measurement of 10cm/s _even though the CoG isn't moving_.
If the speed accuracy of the GNSS receiver is 1cm/s, the EKF might stop trusting the measurements because they appear inconsistent (wrong by 10x the accuracy).
If the offsets are defined, the EKF will correct the measurements using the gyro data.
:::
2 changes: 2 additions & 0 deletions docs/sdk/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# SDK

welcome soon ....
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ site_dir: build/gh-pages
use_directory_urls: false
dev_addr: "127.0.0.1:8000"

copyright: Copyright &copy; 2015-2024 <a href="https://www.nextpilot.com">Nextpilot Develop Team</a>, Maintained by <a href="/about/release-notes/#maintenance-team">LaterComer</a>.
copyright: Copyright &copy; 2015-2024 <a href="https://docs.nextpilot.cn">Nextpilot Develop Team</a>, Maintained by <a href="/about/release-notes/#maintenance-team">LaterComer</a>.

# nav:
# - 主页: index.md
Expand Down

0 comments on commit 4fa755e

Please sign in to comment.