GCS position in LUA
Some GCS (at least QGC) send their position via MAVLink GLOBAL_POSITION_INT message. The idea is to persist the position of the GCS and make it available in LUA. That would be very handy for many use cases, e.g. quickshots.
You can receive MAVLink in scripting so you could track it "manually".
yeah, that might work. But seems kinda low level.
I have written a lua script witch parses the GLOBAL_POSITION_INT message. It works very good.
However it would be so much nicer if ArduPilot did this. The message is already being parsed so it shouldn't be too much effort to persist the position.
There may be more than one other "vehicle" on the network.
There may be more than one other "vehicle" on the network.
Each vehicle/GCS should have a unique SYSID_THISMAV - each MAVlink message identifies the SYSID that it came from. QGC defaults to sending as SYSID 255, but it can be changed in Application Settings.
Do you mean how to identify the GCS ? I think the only way is to check compid for MAV_COMP_ID_MISSIONPLANNER (190). Because the sysid of the GCS could be any value although it is 255 in most cases.
Do you mean how to identify the GCS ? I think the only way is to check compid for MAV_COMP_ID_MISSIONPLANNER (190). Because the sysid of the GCS could be any value although it is 255 in most cases.
There may be more than one MAV_COMP_ID_MISSIONPLANNER on the network.
A solution might be to filter the sysid by SYSID_MYGCS.