Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions docs/development/msp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ When the MSP JSON specification changes, bump `msp_messages.json` version:
[13 - MSP_SET_NAV_POSHOLD](#msp_set_nav_poshold)
[14 - MSP_CALIBRATION_DATA](#msp_calibration_data)
[15 - MSP_SET_CALIBRATION_DATA](#msp_set_calibration_data)
[16 - MSP_POSITION_ESTIMATION_CONFIG](#msp_position_estimation_config)
[17 - MSP_SET_POSITION_ESTIMATION_CONFIG](#msp_set_position_estimation_config)
[18 - MSP_WP_MISSION_LOAD](#msp_wp_mission_load)
[19 - MSP_WP_MISSION_SAVE](#msp_wp_mission_save)
[20 - MSP_WP_GETINFO](#msp_wp_getinfo)
Expand Down Expand Up @@ -681,40 +679,6 @@ When the MSP JSON specification changes, bump `msp_messages.json` version:

**Notes:** Minimum payload 18 bytes. Adds +6 bytes for magnetometer zeros, +2 for optical flow scale, and +6 for magnetometer gains when those features (`USE_MAG`, `USE_OPFLOW`) are compiled in.

## <a id="msp_position_estimation_config"></a>`MSP_POSITION_ESTIMATION_CONFIG (16 / 0x10)`
**Description:** Retrieves parameters related to the INAV position estimation fusion weights and GPS minimum satellite count.

**Request Payload:** **None**

**Reply Payload:**
|Field|C Type|Size (Bytes)|Units|Description|
|---|---|---|---|---|
| `weightZBaroP` | `uint16_t` | 2 | Weight * 100 | Barometer Z position fusion weight (`positionEstimationConfig()->w_z_baro_p * 100`) |
| `weightZGPSP` | `uint16_t` | 2 | Weight * 100 | GPS Z position fusion weight (`positionEstimationConfig()->w_z_gps_p * 100`) |
| `weightZGPSV` | `uint16_t` | 2 | Weight * 100 | GPS Z velocity fusion weight (`positionEstimationConfig()->w_z_gps_v * 100`) |
| `weightXYGPSP` | `uint16_t` | 2 | Weight * 100 | GPS XY position fusion weight (`positionEstimationConfig()->w_xy_gps_p * 100`) |
| `weightXYGPSV` | `uint16_t` | 2 | Weight * 100 | GPS XY velocity fusion weight (`positionEstimationConfig()->w_xy_gps_v * 100`) |
| `minSats` | `uint8_t` | 1 | Count | Minimum satellites required for GPS use (`gpsConfigMutable()->gpsMinSats`) |
| `useGPSVelNED` | `uint8_t` | 1 | Boolean | Legacy flag, always 1 (GPS velocity is always used if available) |

## <a id="msp_set_position_estimation_config"></a>`MSP_SET_POSITION_ESTIMATION_CONFIG (17 / 0x11)`
**Description:** Sets parameters related to the INAV position estimation fusion weights and GPS minimum satellite count.

**Request Payload:**
|Field|C Type|Size (Bytes)|Units|Description|
|---|---|---|---|---|
| `weightZBaroP` | `uint16_t` | 2 | Weight * 100 | Sets `positionEstimationConfigMutable()->w_z_baro_p = value / 100.0f` (constrained 0.0-10.0) |
| `weightZGPSP` | `uint16_t` | 2 | Weight * 100 | Sets `positionEstimationConfigMutable()->w_z_gps_p = value / 100.0f` (constrained 0.0-10.0) |
| `weightZGPSV` | `uint16_t` | 2 | Weight * 100 | Sets `positionEstimationConfigMutable()->w_z_gps_v = value / 100.0f` (constrained 0.0-10.0) |
| `weightXYGPSP` | `uint16_t` | 2 | Weight * 100 | Sets `positionEstimationConfigMutable()->w_xy_gps_p = value / 100.0f` (constrained 0.0-10.0) |
| `weightXYGPSV` | `uint16_t` | 2 | Weight * 100 | Sets `positionEstimationConfigMutable()->w_xy_gps_v = value / 100.0f` (constrained 0.0-10.0) |
| `minSats` | `uint8_t` | 1 | Count | Sets `gpsConfigMutable()->gpsMinSats` (constrained 5-10) |
| `useGPSVelNED` | `uint8_t` | 1 | Boolean | Legacy flag, ignored |

**Reply Payload:** **None**

**Notes:** Expects 12 bytes.

## <a id="msp_wp_mission_load"></a>`MSP_WP_MISSION_LOAD (18 / 0x12)`
**Description:** Commands the FC to load the waypoint mission stored in non-volatile memory (e.g., EEPROM or FlashFS) into the active mission buffer.

Expand Down
113 changes: 2 additions & 111 deletions docs/development/msp/msp_messages.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": {
"major": 2,
"minor": 1,
"major": 3,
"minor": 0,
"patch": 0
},
"messages": {
Expand Down Expand Up @@ -676,115 +676,6 @@
"notes": "Minimum payload 18 bytes. Adds +6 bytes for magnetometer zeros, +2 for optical flow scale, and +6 for magnetometer gains when those features (`USE_MAG`, `USE_OPFLOW`) are compiled in.",
"description": "Sets sensor calibration data."
},
"MSP_POSITION_ESTIMATION_CONFIG": {
"code": 16,
"mspv": 1,
"replaced_by": ["MSP2_COMMON_SETTING"],
"request": null,
"reply": {
"payload": [
{
"name": "weightZBaroP",
"ctype": "uint16_t",
"desc": "Barometer Z position fusion weight (`positionEstimationConfig()->w_z_baro_p * 100`)",
"units": "Weight * 100"
},
{
"name": "weightZGPSP",
"ctype": "uint16_t",
"desc": "GPS Z position fusion weight (`positionEstimationConfig()->w_z_gps_p * 100`)",
"units": "Weight * 100"
},
{
"name": "weightZGPSV",
"ctype": "uint16_t",
"desc": "GPS Z velocity fusion weight (`positionEstimationConfig()->w_z_gps_v * 100`)",
"units": "Weight * 100"
},
{
"name": "weightXYGPSP",
"ctype": "uint16_t",
"desc": "GPS XY position fusion weight (`positionEstimationConfig()->w_xy_gps_p * 100`)",
"units": "Weight * 100"
},
{
"name": "weightXYGPSV",
"ctype": "uint16_t",
"desc": "GPS XY velocity fusion weight (`positionEstimationConfig()->w_xy_gps_v * 100`)",
"units": "Weight * 100"
},
{
"name": "minSats",
"ctype": "uint8_t",
"desc": "Minimum satellites required for GPS use (`gpsConfigMutable()->gpsMinSats`)",
"units": "Count"
},
{
"name": "useGPSVelNED",
"ctype": "uint8_t",
"desc": "Legacy flag, always 1 (GPS velocity is always used if available)",
"units": "Boolean",
"value": 1
}
]
},
"notes": "",
"description": "Retrieves parameters related to the INAV position estimation fusion weights and GPS minimum satellite count."
},
"MSP_SET_POSITION_ESTIMATION_CONFIG": {
"code": 17,
"mspv": 1,
"replaced_by": ["MSP2_COMMON_SET_SETTING"],
"request": {
"payload": [
{
"name": "weightZBaroP",
"ctype": "uint16_t",
"desc": "Sets `positionEstimationConfigMutable()->w_z_baro_p = value / 100.0f` (constrained 0.0-10.0)",
"units": "Weight * 100"
},
{
"name": "weightZGPSP",
"ctype": "uint16_t",
"desc": "Sets `positionEstimationConfigMutable()->w_z_gps_p = value / 100.0f` (constrained 0.0-10.0)",
"units": "Weight * 100"
},
{
"name": "weightZGPSV",
"ctype": "uint16_t",
"desc": "Sets `positionEstimationConfigMutable()->w_z_gps_v = value / 100.0f` (constrained 0.0-10.0)",
"units": "Weight * 100"
},
{
"name": "weightXYGPSP",
"ctype": "uint16_t",
"desc": "Sets `positionEstimationConfigMutable()->w_xy_gps_p = value / 100.0f` (constrained 0.0-10.0)",
"units": "Weight * 100"
},
{
"name": "weightXYGPSV",
"ctype": "uint16_t",
"desc": "Sets `positionEstimationConfigMutable()->w_xy_gps_v = value / 100.0f` (constrained 0.0-10.0)",
"units": "Weight * 100"
},
{
"name": "minSats",
"ctype": "uint8_t",
"desc": "Sets `gpsConfigMutable()->gpsMinSats` (constrained 5-10)",
"units": "Count"
},
{
"name": "useGPSVelNED",
"ctype": "uint8_t",
"desc": "Legacy flag, ignored",
"units": "Boolean"
}
]
},
"reply": null,
"notes": "Expects 12 bytes.",
"description": "Sets parameters related to the INAV position estimation fusion weights and GPS minimum satellite count."
},
"MSP_WP_MISSION_LOAD": {
"code": 18,
"mspv": 1,
Expand Down
25 changes: 0 additions & 25 deletions src/main/fc/fc_msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1575,18 +1575,6 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF

break;

case MSP_POSITION_ESTIMATION_CONFIG:

sbufWriteU16(dst, positionEstimationConfig()->w_z_baro_p * 100); // inav_w_z_baro_p float as value * 100
sbufWriteU16(dst, positionEstimationConfig()->w_z_gps_p * 100); // 2 inav_w_z_gps_p float as value * 100
sbufWriteU16(dst, positionEstimationConfig()->w_z_gps_v * 100); // 2 inav_w_z_gps_v float as value * 100
sbufWriteU16(dst, positionEstimationConfig()->w_xy_gps_p * 100); // 2 inav_w_xy_gps_p float as value * 100
sbufWriteU16(dst, positionEstimationConfig()->w_xy_gps_v * 100); // 2 inav_w_xy_gps_v float as value * 100
sbufWriteU8(dst, gpsConfigMutable()->gpsMinSats); // 1
sbufWriteU8(dst, 1); // 1 inav_use_gps_velned ON/OFF

break;

case MSP_WP_GETINFO:
sbufWriteU8(dst, 0); // Reserved for waypoint capabilities
sbufWriteU8(dst, NAV_MAX_WAYPOINTS); // Maximum number of waypoints supported
Expand Down Expand Up @@ -3034,19 +3022,6 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
return MSP_RESULT_ERROR;
break;

case MSP_SET_POSITION_ESTIMATION_CONFIG:
if (dataSize == 12) {
positionEstimationConfigMutable()->w_z_baro_p = constrainf(sbufReadU16(src) / 100.0f, 0.0f, 10.0f);
positionEstimationConfigMutable()->w_z_gps_p = constrainf(sbufReadU16(src) / 100.0f, 0.0f, 10.0f);
positionEstimationConfigMutable()->w_z_gps_v = constrainf(sbufReadU16(src) / 100.0f, 0.0f, 10.0f);
positionEstimationConfigMutable()->w_xy_gps_p = constrainf(sbufReadU16(src) / 100.0f, 0.0f, 10.0f);
positionEstimationConfigMutable()->w_xy_gps_v = constrainf(sbufReadU16(src) / 100.0f, 0.0f, 10.0f);
gpsConfigMutable()->gpsMinSats = constrain(sbufReadU8(src), 5, 10);
sbufReadU8(src); // was positionEstimationConfigMutable()->use_gps_velned
} else
return MSP_RESULT_ERROR;
break;

case MSP_RESET_CONF:
if (!ARMING_FLAG(ARMED)) {
suspendRxSignal();
Expand Down
3 changes: 0 additions & 3 deletions src/main/msp/msp_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@
#define MSP_CALIBRATION_DATA 14
#define MSP_SET_CALIBRATION_DATA 15

#define MSP_POSITION_ESTIMATION_CONFIG 16 //DEPRECATED in INAV 9.1 - use settings system instead. Will be removed in INAV 10.0
#define MSP_SET_POSITION_ESTIMATION_CONFIG 17 //DEPRECATED in INAV 9.1 - use settings system instead. Will be removed in INAV 10.0

#define MSP_WP_MISSION_LOAD 18 // Load mission from NVRAM
#define MSP_WP_MISSION_SAVE 19 // Save mission to NVRAM
#define MSP_WP_GETINFO 20
Expand Down
Loading