Design of a control law on a coex clover 4.2 drone

Hello Community, i’m currently developing a project where im coding the control law, the quadcopter im using is a coex clover 4.2 with a pix card, my doubts are related to the way i can get the position of the drone?, what codes should I check o what can I do to obtain the position, using the different positional sensors with a topic from ROS?, thank you in advance

Duplicate of COEX Clover 4.2 Control Law Design.

Please don’t make this more work than necessary for people like me.

Sorry for that, but I’ve seen people who code their own control law, but they use aruco markers, or motion capture (optitrack cameras) my question is more related to what codes should i modify to design my own controller (also how to upload the control to the drone), I already know how to obtain the orientation of the drone using the gyroscope, but i dont know what files or folders can i edit to obtain the position and orientation topics from ROS, or if there is a repository or tutorial that i can check; thank you for your time, greetings