Quantcast
Channel: ArduPilot Discourse - Latest topics
Viewing all articles
Browse latest Browse all 46739

Flight stop after SET_POSITION_TARGET_GLOBAL_INT

$
0
0

@bull wrote:

Hi All

https://ardupilot.org/dev/docs/copter-commands-in-guided-mode.html#copter-commands-in-guided-mode-set-position-target-global-int

I was flying with the SET_POSITION_TARGET_GLOBAL_INT command.

And I want to stop flying.

So, I used DO_PAUSE_CONTINUE. (All parameters are 0)

However, the flight does not stop.


SET_POSITION_TARGET_GLOBAL_INT Code

        MAVLink.mavlink_set_position_target_global_int_t setPosition = new MAVLink.mavlink_set_position_target_global_int_t();

        setPosition.target_system = (byte)sysid;
        setPosition.target_component = (byte)compid;
        setPosition.time_boot_ms = 0;
        setPosition.lat_int = (int)(x * 10000000L); //lat
        setPosition.lon_int = (int)(y * 10000000L); //lon
        setPosition.alt = z; //high m
        setPosition.vx = 0;
        setPosition.vy = 0;
        setPosition.vz = 0;
        setPosition.afx = 0;
        setPosition.afy = 0;
        setPosition.afz = 0;
        setPosition.yaw = 0;
        setPosition.yaw_rate = 0;

        setPosition.type_mask = 0b0000111111111000;// (ushort)(MAVLink.POSITION_TARGET_TYPEMASK.X_IGNORE| MAVLink.POSITION_TARGET_TYPEMASK.Y_IGNORE| MAVLink.POSITION_TARGET_TYPEMASK.VX_IGNORE | MAVLink.POSITION_TARGET_TYPEMASK.VY_IGNORE);
        setPosition.coordinate_frame = (byte)MAVLink.MAV_FRAME.GLOBAL;

DO_PAUSE_CONTINUE Code

        MAVLink.mavlink_command_long_t req = new MAVLink.mavlink_command_long_t();

        req.target_system = sysid;
        req.target_component = compid;

        req.command = (ushort)MAVLink.MAV_CMD.DO_PAUSE_CONTINUE;
        req.param1 = 0;
        req.param2 = 0;
        req.param3 = 0;
        req.param4 = 0;
        req.param5 = 0;
        req.param6 = 0;
        req.param7 = 0;

I want to stop flying.
Please tell me how.

Thank you all.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 46739

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>