How to set generic GPS device as trackable entity?


I plan to build own GPS tracker that will send coordinates via MQTT. How do I need to create structure (in Arduino C++) of MQTT message so it is recognized by Home Assistant as trackable entity? Or, how do I define trackable sensor in HA, which takes MQTT coordinates as input?

Thanks, Jan