These are chat archives for dronekit/dronekit-android

3rd
Dec 2016
Bill Bonney
@billbonney
Dec 03 2016 03:08
Yes, people are here, but it’s sporadic
AndiSuryaR
@AndiSuryaR
Dec 03 2016 05:55

hey guys, i have some problem, i make a function to call pitch, roll, and yaw like this
public void my_ned(float pitch, float roll, float yaw){

    msg_set_position_target_local_ned msg = new msg_set_position_target_local_ned();
    msg.time_boot_ms=0;
    msg.target_system= 0;
    msg.target_component=0;
    msg.coordinate_frame= MAV_FRAME.MAV_FRAME_BODY_OFFSET_NED;
    msg.type_mask= 0b0000111111000111;// MAVLINK_SET_POS_TYPE_MASK_ACC_IGNORE | MAVLINK_SET_POS_TYPE_MASK_POS_IGNORE;
    msg.vx=pitch;
    msg.vy=roll;
    msg.vx=yaw;

-------------red----------------------------
}

then i want to send this message in that //red line on java android, thanks for attention guys and i hopefully someone can help me.

wyq200704
@wyq200704
Dec 03 2016 05:55
and like what
@AndiSuryaR
AndiSuryaR
@AndiSuryaR
Dec 03 2016 05:58
@wyq200704 i want to send like vehicle.send_mavlink(msg) [phyton] in java
Bill Bonney
@billbonney
Dec 03 2016 15:22
@AndiSuryaR At the moment I don’t see an API to connect with the TARGET_LOCAL_NED message in the DroneKit-Android API
Currently its only this API in ControlApi.java
/**
     * Instructs the vehicle to go to the specified location.
     *
     * @param point    target location
     * @param force    true to enable guided mode is required.
     * @param listener Register a callback to receive update of the command execution state.
     */
    public void goTo(LatLong point, boolean force, AbstractCommandListener listener) {
        Bundle params = new Bundle();
        params.putBoolean(EXTRA_FORCE_GUIDED_POINT, force);
        params.putParcelable(EXTRA_GUIDED_POINT, point);
        drone.performAsyncActionOnDroneThread(new Action(ACTION_SEND_GUIDED_POINT, params), listener);
    }