Need to extract drone's realtime position (lat/long/alt) from mission planner gcs

I want to extract drone’s realtime gps positional data to send it to other microcontroller like ESP/Rpi/Arduino to control servo motors which rotates my antenna towards the drone.

Crossbow / ardupilot antenna tracker I know, but I want to build my own system.

can anyone guide me how to proceed with these?

Sure, use pymavlink on the ESP/Rpi/Arduino to decode MAVLink messages from the drone.

Thank you for your reply.

Does that mean that I have to put my other microcontroller on the drone?
Then it is not possible, I want data at ground, my microcontroller will be fixed on ground to give commands to servo motor.

Can you elaborate more if this is possible?

On the ground use mavrouter to route the MAVLink datastream to both your GCS and your ESP/Rpi/Arduino.

Then use what I said above to create the code for your ESP/Rpi/Arduino.

Thank you.

can you provide more information on hardware required, wiring and coding that I needs to do for your proposal.
I am not familiar to these things so your any help will be greatly appreciated.

Get a cheap Pixhawk board and use ArduPilot AntennaTracker — AntennaTracker documentation