ArduPilot / ArduPilot/MissionPlanner

GPS injection broken for multiple components.

Open
#2,190 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2.4k
Forks
2.9k
Avg merge
19h 16m
Merged PRs (30d)
4

Description

If you have an aircraft with multiple MAVLink components (or presumably multiple systems sharing a single comms link), then RTCM GPS injection does not work _if_ the "Inject MSG Type" checkbox is ticked.

This is because, in `ConfigSerialInjectGPS.cs`:

```
private static void sendData(byte[] data, ushort length)
{
foreach (var port in MainV2.Comports)
{
foreach (var MAV in port.MAVlist)
{
port.InjectGpsData(MAV.sysid, MAV.compid, data, length, rtcm_msg);
}
}
}
```

This results in the message containing the injected data being sent once for each 'MAV'. This was the correct behaviour for the `GPS_INJECT_DATA` message, which was targeted; but it's erroneous behaviour for the newer `GPS_RTCM_DATA` version, which is a broadcast message.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in ConfigSerialInjectGPS.cs at sendData(byte[] data, ushort length), and compare the handling of targeted GPS_INJECT_DATA with broadcast GPS_RTCM_DATA. Done means RTCM injection is not duplicated for every MAV component while the existing targeted-message behavior remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.