How to use the mavlink_receiver and mavlink_messages for UAVs communication?

I need to broadcast and receive the gps mavlink message to implement a collision avoidance in a multiple drones application. How can I use this informations in a module?