Search...
Menu

Using Ardupilot Firmware

Ardupilot Setup Tutorial

Use CAN communication (recommended)

The module is connected to the CAN1/2 interface of the flight controller, as shown below

The flight controller uses ardupilot4.4.0 and higher firmware, and uses two antennas to implement GPS orientation. Please set the following parameters:

【GPS_TYPE】Set to 9 (GPS1_TYPE=9 for AP4.6 and above firmware)
【CAN_P1_DRIVER】Set to 1
【EK3_SRC1_YAW】Set to 2 (use GPS as heading source) or 3 (use GPS as heading source first, with compass as backup).
 
  Configuring the Antenna Direction
Connect the module to the flight controller and the ground station. In [Initial Settings] → [Optional Hardware] → [DroneCAN/UAVCAN] → click [mavlink-can1] to read the UAVCAN device, find the name org,ardupilot.ZeroOne_MOC, and click menu → parameters.
Note: If org,ardupilot.ZeroOne_MOC is not read, you can switch to the flight data interface, then switch back to the Drone/Uavcan interface and click mavlink-can2
 
GPS1_MB_TYPE】Set to 1, Click to write parameters, click to refresh parameters (the default setting is 1)
 
【gps1_mb_ofs_x】、【gps1_mb_ofs_y】、【gps1_mb_ofs_z】Modify the parameters according to the installation location and direction of the antenna, and click Write Parameters;
 
gps1_mb_ofs_x,gps1_mb_ofs_y,gps1_mb_ofs_z The parameters are defined as follows:

The X axis is usually defined as the front-to-back direction of the vehicle. When the main antenna is located in front of the vehicle, this parameter should be entered with a positive value, indicating that the main antenna is moved forward by a corresponding distance relative to the slave antenna.

The Y axis is usually defined as the left-right direction of the vehicle. When the master antenna is located to the right of the slave antenna, this parameter should be entered with a positive value, indicating that the master antenna is moved to the right by a corresponding distance relative to the slave antenna.

The Z axis is usually defined as the vertical direction of the vehicle. When the master antenna is lower than the slave antenna, this parameter should be entered with a positive value, indicating that the master antenna has moved downwards by a corresponding distance relative to the slave antenna.

Set the main antenna's offset from the center of gravity

If the main antenna of OneRTK cannot be installed at the center of gravity of the unmanned system, you need to set the offset value from the center of gravity: Configure/Debug the ground station → All Parameters → Search for the following parameters:

GPS_POS1_X/Y/Z (for AP firmware versions below 4.6) or GPS1_POS_X/Y/Z (for AP firmware versions 4.6 and above): Set the X, Y, and Z axis offsets of the main antenna relative to the center of gravity (in meters).

Offset distance and direction notes:

The X axis usually refers to the longitudinal axis of the drone, that is, the front-to-back direction of the vehicle. When the main antenna is located in front of the center of gravity of the drone, this parameter should be entered as a positive value, indicating the distance the main antenna is offset forward relative to the center of gravity.

The Y axis usually refers to the lateral axis of the drone, that is, the left and right direction of the vehicle. If the main antenna is located to the right of the center of gravity of the drone, this parameter should be entered as a positive value, indicating the distance the main antenna is offset to the right relative to the center of gravity.

The Z axis usually refers to the vertical axis of the drone, that is, the up and down direction of the vehicle. If the main antenna is below the center of gravity of the drone, this parameter should be entered as a positive value, indicating the distance the main antenna is offset downward relative to the center of gravity.

 

Using UART Communication

The flight controller uses ArduPilot 4.5.0 and higher firmware, and uses two antennas to implement GPS orientation. In Configuration/Debug → All Parameters → Search and set the following parameters:

【GPS_TYPE】 = 26 (GPS1_TYPE=26 for AP4.6 and above firmware)

【GPS_MB1_TYPE】 = 1

【GPS_MB1_OFS_X 】【 GPS_MB1_OFS_Y 】and GPS_MB1_OFS_Z is used to match the offset of the primary antenna and the secondary antenna (in meters). For example, if the antennas are installed on the left and right sides of the vehicle, the distance between the two antennas is 50cm, and the primary antenna is fixed on the right side of the vehicle, then set GPS_MB1_OFS_Y=0.5.

【GPS_POS1_X 】【GPS_POS1_Y 】Set the offset of the main antenna from the center of gravity. For the installation above, GPS_POS1_Y is set to 0.25.

【GPS_AUTO_CONFIG】 =0 (Turn off automatic configuration)

【EK3_SRC1_YAW】 = 2 (Only use the yaw data of GPS as the heading data source)

【SERIAL3_PROTOCOL】=-1(Close the gps1 interface, so that the gps2 interface will be defined as the first gps)

【SERIAL4_PROTOCOL】=5(The default value is 5, just check and no need to modify)

【SERIAL4_BAUD】=115(ie the baud rate is set to 115200)

 

Heading confirmation and calibration

After completing the configuration and calibration of the GPS system, the accuracy of the heading needs to be verified:

  1. Open the MissionPlanner software and switch to the "Flight Data" page.
  2. In the "Status" toolbar, find and observe the "gpsyaw" value. "gpsyaw" represents the heading calculated by GPS. Check whether this value is consistent with the actual heading of the drone.
  3. To confirm the accuracy of the "gpsyaw" value, you can manually rotate the aircraft. During the rotation process, pay attention to whether the "gpsyaw" value can correctly respond to the rotation of the drone.
  4. If the gpsyaw value is always 0, it means that the heading data has not been solved. You can check the following points:
    • Check the parameters (gps1_mb_ofs_x/y/z). When using CAN communication, the parameters are internal parameters of RTK, not parameters of flight control. When using UART communication, the parameters are internal parameters of flight control.
    • The antenna spacing measurement is the distance between the centers of the two antennas, and the setting deviation cannot exceed 2cm.
    • The number of satellites searched is small, and the satellite reception environment may be poor, such as indoors, between buildings with large elevation angles, etc.

 

Previous
Product Overview
Next
Using PX4 Firmware
Last modified: 2025-07-03Powered by