找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 323|回复: 2

SENS_GPS_PRIME

[复制链接]

130

主题

44

回帖

3万

积分

管理员

积分
39544
发表于 2025-8-7 11:53:14 | 显示全部楼层 |阅读模式
/**
* Multi GPS primary instance
*
* When no blending is active, this defines the preferred GPS receiver instance.
* The GPS selection logic waits until the primary receiver is available to
* send data to the EKF even if a secondary instance is already available.
* The secondary instance is then only used if the primary one times out.
*
* To have an equal priority of all the instances, set this parameter to -1 and
* the best receiver will be used.
*
* This parameter has no effect if blending is active.
*
* @group Sensors
* @min -1
* @max 1
*/
PARAM_DEFINE_INT32(SENS_GPS_PRIME, 0);

参数定义位置:
/PX4-Autopilot/src/modules/sensors/vehicle_gps_position/params.c




130

主题

44

回帖

3万

积分

管理员

积分
39544
 楼主| 发表于 2025-8-7 11:59:19 | 显示全部楼层
1. 参数作用

SENS_GPS_PRIME 用于 指定多 GPS 系统中的主 GPS 接收机,控制 EKF2(状态估计器)优先使用哪个 GPS 数据源。

    默认值 0:表示 GPS1(第 1 个 GPS 接收机)是主设备。

    -1:禁用主从模式,所有 GPS 接收机平等竞争,系统自动选择信号最优的 GPS。

    1:指定 GPS2 为主设备(如果存在)。

# 强制使用 GPS1 作为主设备(默认)param set SENS_GPS_PRIME 0
# 允许自动选择最优 GPS(平等模式)param set SENS_GPS_PRIME -1
# 强制使用 GPS2 作为主设备(需硬件支持)param set SENS_GPS_PRIME 1

130

主题

44

回帖

3万

积分

管理员

积分
39544
 楼主| 发表于 2025-8-7 14:45:00 | 显示全部楼层
SENS_GPS_MASK 的取值含义:

0:禁用混合(默认),仅使用主GPS(SENS_GPS_PRIME指定的实例)。

1:启用混合模式,但仅使用水平位置数据(融合多个GPS的水平坐标)。

3:启用混合模式,融合水平位置+垂直位置(需至少一个GPS提供高度数据)。

5:启用混合模式,融合水平位置+速度。

7:启用混合模式,融合水平位置+垂直位置+速度(最完整的融合模式)。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|flightreview|小黑屋|PX4-Autopilot|PX4论坛

GMT+8, 2026-1-27 05:40 , Processed in 1.303671 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表