Move GLOBAL_POSITION msg from development to common#2403
Conversation
|
@peterbarker @hamishwillee @auturgy anything against this move? |
| <field type="uint8_t" name="flags" enum="AIRSPEED_SENSOR_FLAGS">Airspeed sensor flags.</field> | ||
| </message> | ||
| <message id="296" name="GLOBAL_POSITION"> | ||
| <description>Global position measurement or estimate.</description> |
There was a problem hiding this comment.
Can we expand on this a little? What rate are you outputting it/expecting it to be output. What are you expecting it to be used for? When would you use this instead of one of the GPS_RAW messages?
Basically I want it to be obvious from the description who it is for and when it should be used and how it might be consumed.
There was a problem hiding this comment.
@MaEtUgR ^^^ Who is it for - is it just telemetry for consumption by a GCS? I know you all know what it is, but I don't
hamishwillee
left a comment
There was a problem hiding this comment.
Thanks @bresch - I know this has been worked on before but I have more questions. Will add to discuss in the MAV call this evening.
|
On Tue, 27 Jan 2026, Hamish Willee wrote:
My understanding is that the message had evolved to be too complicated and far from its original purpose, so @tridge and @bresch decided
to cut it back.
Yes, I'm regretting weighing in now. I do want a replacement for
GLOBAL_POSITION_INT where we can give more information about exactly
what's going on, and to provide a uniform way of presenting information
from multiple estimators on-board.
Is it just me, or is this message currently equivalent to GPS_INPUT,
give-or-take?
See also ArduPilot/ardupilot#31738
|
Given the three messages:
The GLOBAL_POSITION lacks clarity on how it is supposed to be used - I assume it is output from a position system and input to flight stack, so serves the same purpose. However I see It does raise questions about how much information you really need from a position source for use by an estimator. From the GLOBAL_POSITION message, assuming it does indeed do the job, "nowhere near as much as GPS_INPUT". That all said, I am still not opposed to additions to allow this to replace https://mavlink.io/en/messages/common.html#GLOBAL_POSITION_INT if we can get that agreed. |
|
Have talked with Paul, who is currently very interested in this area. He points out that the lense-to-transmission-time is important for any sensible estimator consuming the data. This information is present in the command we are currently using to consume similar information. To that end, could I propose this as a structure? This does away with the message being at all emitted by the autopilot - this would simply be sensor data. I've removed several fields and added a couple. Addition of velocity to be argued over - Paul doesn't have a use for it ATM - we could add it as NaN-default or we could leave it as an extension. |
|
Random thought. ArduPilot's EKF can impose constraints on control for the vehicle depending on its input - so if you're using optical flow then your height and velocity are limited. That may be applicable for some of these external sources that may come in via (e.g. |
|
@peterbarker Looking at your changes
For all of this, I think we need Paul @bresch (and possibly @sfuhrer ) in a discussion. It isn't up to me.
I was thinking that was what GLOBAL_POSITION was for. Its a reasonable question "do we have enough information to do the job from this". |
Perhaps; as an input to the autopilot it is probably less relevant than as a report from the autopilot.
I didn't have any in mind, but thought it prudent to include something.
I can add that back in. Should we allow only a single altitude and a frame for it?
Yes, the timestamp is when the packet left the vehicle, near enough.
This is no longer a replacement for |
| <message id="296" name="GLOBAL_POSITION"> | ||
| <description>Global position measurement or estimate.</description> | ||
| <field type="uint8_t" name="id" instance="true">Sensor ID</field> | ||
| <field type="uint64_t" name="time_usec" units="us">Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.</field> |
There was a problem hiding this comment.
From Paul: add sensor delay
There was a problem hiding this comment.
@bresch We can do that - what about the other comments?
|
For my application the inclusion of a sensor delay field is essential. |
@priseborough I think that makes sense, but can you please add the change as a github suggestion to this PR exactly how you want it? That way I don't bugger it up. |
- target system/component I assume to allow routing - more clear timestamp description - add processing time for simple to support and debug compensation without separate time synchronization - for most clear definition unify to only elipsoidal altitude
Hamish, I've coordinated with the authors and they've included the message I requested in their latest commit. |
|
I just took over all the feedback into a commit while on a call with @priseborough and @haumarco to have a new version to review.
|
| <entry value="0" name="GLOBAL_POSITION_UNKNOWN"> | ||
| <description>Source is unknown or not one of the listed types.</description> | ||
| </entry> | ||
| <entry value="1" name="GLOBAL_POSITION_GNSS"> | ||
| <description>Global Navigation Satellite System (e.g.: GPS, Galileo, Glonass, BeiDou).</description> | ||
| </entry> | ||
| <entry value="2" name="GLOBAL_POSITION_VISION"> | ||
| <description>Vision system (e.g.: map matching).</description> | ||
| </entry> | ||
| <entry value="3" name="GLOBAL_POSITION_PSEUDOLITES"> | ||
| <description>Pseudo-satellite system (performs GNSS-like function, but usually with transceiver beacons).</description> | ||
| </entry> | ||
| <entry value="4" name="GLOBAL_POSITION_TRN"> | ||
| <description>Terrain referenced navigation.</description> | ||
| </entry> | ||
| <entry value="5" name="GLOBAL_POSITION_MAGNETIC"> | ||
| <description>Magnetic positioning.</description> | ||
| </entry> | ||
| <entry value="6" name="GLOBAL_POSITION_ESTIMATOR"> | ||
| <description>Estimated position based on various sensors (eg. a Kalman Filter).</description> | ||
| </entry> | ||
| </enum> | ||
| <enum name="GLOBAL_POSITION_FLAGS" bitmask="true"> | ||
| <description>Status flags for GLOBAL_POSITION</description> | ||
| <entry value="1" name="GLOBAL_POSITION_UNHEALTHY"> | ||
| <description>Unhealthy sensor/estimator.</description> | ||
| </entry> | ||
| <entry value="2" name="GLOBAL_POSITION_PRIMARY"> | ||
| <description>True if the data originates from or is consumed by the primary estimator.</description> | ||
| </entry> |
There was a problem hiding this comment.
All the enums should be named with prefix GLOBAL_POSITION_SRC_ by convention.
| <entry value="0" name="GLOBAL_POSITION_UNKNOWN"> | |
| <description>Source is unknown or not one of the listed types.</description> | |
| </entry> | |
| <entry value="1" name="GLOBAL_POSITION_GNSS"> | |
| <description>Global Navigation Satellite System (e.g.: GPS, Galileo, Glonass, BeiDou).</description> | |
| </entry> | |
| <entry value="2" name="GLOBAL_POSITION_VISION"> | |
| <description>Vision system (e.g.: map matching).</description> | |
| </entry> | |
| <entry value="3" name="GLOBAL_POSITION_PSEUDOLITES"> | |
| <description>Pseudo-satellite system (performs GNSS-like function, but usually with transceiver beacons).</description> | |
| </entry> | |
| <entry value="4" name="GLOBAL_POSITION_TRN"> | |
| <description>Terrain referenced navigation.</description> | |
| </entry> | |
| <entry value="5" name="GLOBAL_POSITION_MAGNETIC"> | |
| <description>Magnetic positioning.</description> | |
| </entry> | |
| <entry value="6" name="GLOBAL_POSITION_ESTIMATOR"> | |
| <description>Estimated position based on various sensors (eg. a Kalman Filter).</description> | |
| </entry> | |
| </enum> | |
| <enum name="GLOBAL_POSITION_FLAGS" bitmask="true"> | |
| <description>Status flags for GLOBAL_POSITION</description> | |
| <entry value="1" name="GLOBAL_POSITION_UNHEALTHY"> | |
| <description>Unhealthy sensor/estimator.</description> | |
| </entry> | |
| <entry value="2" name="GLOBAL_POSITION_PRIMARY"> | |
| <description>True if the data originates from or is consumed by the primary estimator.</description> | |
| </entry> | |
| <entry value="0" name="GLOBAL_POSITION_SRC_UNKNOWN"> | |
| <description>Source is unknown or not one of the listed types.</description> | |
| </entry> | |
| <entry value="1" name="GLOBAL_POSITION_SRC_GNSS"> | |
| <description>Global Navigation Satellite System (e.g.: GPS, Galileo, Glonass, BeiDou).</description> | |
| </entry> | |
| <entry value="2" name="GLOBAL_POSITION_SRC_VISION"> | |
| <description>Vision system (e.g.: map matching).</description> | |
| </entry> | |
| <entry value="3" name="GLOBAL_POSITION_SRC_PSEUDOLITES"> | |
| <description>Pseudo-satellite system (performs GNSS-like function, but usually with transceiver beacons).</description> | |
| </entry> | |
| <entry value="4" name="GLOBAL_POSITION_SRC_TRN"> | |
| <description>Terrain referenced navigation.</description> | |
| </entry> | |
| <entry value="5" name="GLOBAL_POSITION_SRC_MAGNETIC"> | |
| <description>Magnetic positioning.</description> | |
| </entry> | |
| <entry value="6" name="GLOBAL_POSITION_SRC_ESTIMATOR"> | |
| <description>Estimated position based on various sensors (eg. a Kalman Filter).</description> | |
| </entry> | |
| </enum> | |
| <enum name="GLOBAL_POSITION_SRC_FLAGS" bitmask="true"> | |
| <description>Status flags for GLOBAL_POSITION</description> | |
| <entry value="1" name="GLOBAL_POSITION_UNHEALTHY"> | |
| <description>Unhealthy sensor/estimator.</description> | |
| </entry> | |
| <entry value="2" name="GLOBAL_POSITION_SRC_PRIMARY"> | |
| <description>True if the data originates from or is consumed by the primary estimator.</description> | |
| </entry> |
|
@MaEtUgR Thanks very much. @peterbarker @bresch @priseborough Otherwise are we all happy with this? I have moved this back into development because it will need to be retested before being accepted #2419 |
peterbarker
left a comment
There was a problem hiding this comment.
I think this looks fine as a message. Lacking velocity data still - I wonder if that will come back to haunt us.
@priseborough and I will have a look at putting this into ArduPilot.
Not sure moving it from development.xml to common.xml is kosher, even according to the rules at https://docs.px4.io/main/en/mavlink/adding_messages , is it? I don't see an implementation in PX-AutoPilot
|
Moving it from development.xml to common.xml is kosher, even according to the rules at https://docs.px4.io/main/en/mavlink/adding_messages , is it? I don't see an implementation in PX-AutoPilot True. We need verification of implementation. Let's get #2419 in first, tested, and then we can do this move again. |
|
Closing. Superseded by #2422 |
We're happy with the current definition of this message, so unless someone still wants to change something, I think it's time to move it to
common.