Monitoring drone data using python

Hi i am a newbie, I want to fetch the flight data of the rc controlled drone and use that data to make a auto mission on another drone

If in real time, use the follow me mode. If not, load a log and plan the mission based on the flight path of the loaded log.

1 Like

thankyou.
i need to coustomize the no of waypoints generated to infinitely many for accuracy and also i want to create automatic way points generated in real time during the flight without planning a mission in the GCS . please help me to do this .

Then use pymavlink and guided mode.

1 Like

@amilcarlucas can I get your WhatsApp number. I am from india and i am working on a project for my startup it would be very much pleasing if you would help out .

Ask questions here, so that other users can also see the answers.

My company also does paid support. Do you want that? Send me your requirements and I can send you a quote.

1 Like

using pymavlink i figured out how to establish connection, change motion. But i need to generate waypoints while the drone is flying rather than creating it manually using the missionplanner and transform the data into a mission.
please guide me how to interpret waypoints code

You can and should use guided flight mode instead. It allows you to create waypoints on the fly without needing a mission.

1 Like

my requirement is to convert the obtained “GLOBAL_POSITION_INT” that has lat and long data and convert it into waypoints in real time using code .
so that i will now use the created waypoints and load it into a mission
please help me with a little more explanation i am a newbie

Like I said:

  1. Make sure you FENCE parameters are set correctly and that you have proper GPS signal
  2. Switch to loiter mode
  3. Take off to desired height
  4. Switch to GUIDED flight mode
  5. read the GLOBAL_POSITION_INT
  6. calculate the next desired lat,lon,alt
  7. send that lat,lon,alt as a TARGET using GUIDED flight mode
  8. repeat from point 5 as long as necessary.

No mission files required, no mission upload. Newbies need to learn how to read documentation like everyone else. We point you in the right direction, but you need to move

2 Likes

Thanks it worked the way you told :+1:.

I’m glad I could help.

1 Like


i want to create a automatic waypoints in real time from the another drone to track and follow its part
so i am using create mission and getting the latitude longitude and altitude data from the maindrone and using it for the follower drone
will this work

There is already a fully implemented following mode in ArduPilot.

You are trying to reinvent the wheel :ferris_wheel:.

Update both vehicles to ArduCopter 4.4.1 and configure one as the lead vehicle and the second one as the follower. No need for any python programming

1 Like

i want my following drone to crash in the instructed area and also it should take off after being instructed and follow the path the lead drone took to reach the designation. For this i the following mode wont work i guess ,
am i wrong???

You want the drone to crash?? That is a strange requirement.

yes i want it to crash or disarm there, like kamikaze drone

Then you need good coding skills, a grround station to store the telemetry breadcrums in a buffer.
This buffer will be replayed for the second drone in order to follow the first.

pymavlink with @khancyr PR on top should be enough for this.
@khancyr any plans for merging it?

i am using python to run it using scripts in missionplanner
my python code will provide the realtime data to the follower