How to paint markers on the map?

What would be the easiest way to paint a custom marker on the map?

I have a companion computer that analyzes images from a camera while the drone is flying and I need it to paint on the map the position of certain elements it finds.
Should I use custom maps that update in real time (like mapbox for example) or is there an easier way to do this (without changing the source code)? All I need to do is point out a location.

Thank you.

you could add POI’s to the map, but would require some code to take it from your source

1 Like

Hi @Michael_Oborne,

I’ve been trying to do this and so far I can make it work, but I’m not sure how to do it right.
I created a new class based on POI, but with custom icons, and I paint them on the map when a specific MAVLink message is received. I’m using MAV_CMD_SPATIAL_USER_1 for now since I don’t want to create a new MAVLink message just yet.

MissionPlanner_qsx19jHoMF

I send the MAVLink messages from a companion computer, and I don’t know how to send them to MP directly. After reading about MAVLink routing in the docs, I tried to send my packages to ArduPilot with ID 0 and they do reach the GCS.

MissionPlanner_ALkiQduJjm

But here is my problem: how do I subscribe to packages from sources other than ArduPilot itself? I’m using the SubscribeToPacketType method, but it only works with messages from main sysid and compid.

devenv_oyL99Wb9Df

If I comment that line, it works, but I fear to break something if I do that… What would be your approach in this case?
Thank you for your time.

Use Host.comPort.OnPacketReceived event instead of SubscribeToPacketType, it will get every incoming packet.

2 Likes