mavlink / MAVSDK-Java

MAVSDK client for Java.
71 stars 41 forks source link

Flying in a circle with a fixed-wing drone. #32

Closed JKnightGURU closed 1 year ago

JKnightGURU commented 4 years ago

Greetings. I would like to implement fixed-wing drone's flight in a circle around a fixed point.

According to what I've found, there are three ways to do that:

  1. Offboard flight mode https://mavsdk.mavlink.io/develop/en/guide/offboard.html#fly-a-circle

Unfortunately, this mode is only allowed for copters and VTOLs.

  1. Orbit guided flight mode https://docs.px4.io/master/en/flight_modes/orbit.html

Unfortunately, this one has similar limitations.

  1. Building up a number of waypoints that fit the required circle and sending them via general waypoint mission.

It is not really a circle, but I'll go there if I'll find nothing else.

To be honest, it feels that I am trying to solve X/Y problem here, in 3rd approach especially.

How do I do such a flight the most common and general way via MavSDK? I doubt that the ability of a drone to fly around a point is too complicated or unused so that there's no code in the repository already. :)

JonasVautherin commented 4 years ago

I think that in PX4, a fixedwing in LOITER mode does exactly that: flying circles around a point (because it cannot stay stationary). I think that if you start a fixedwing simulation, connect QGC, and tell the fixedwing to loiter, that's what will happen. And then if you say "goto location", the fixedwing will go loiter to that new position.

Would that be what you want, or do you want more control over e.g. the radius of the circle, etc?

Note that in MAVSDK-Java, we don't have gotoLocation() yet, but that will come very soon (next release, actually).