Please select Into the mobile phone version | Continue to access the computer ver.
Close
You need to log in before you can reply       Login | Register now

[Android] TapFly Mission can not start

Author: Jeanlim96 2017-8-25 11:00
2 48
Hi this is a follow up question from my post here: http://forum.dev.dji.com/thread-33739-1-1.htmlI am unable to execute the tap fly mission even after initialising the target, tap fly mode, is horizontal avoidance enabled and speed. However, the mission state that appears on the info screen is can_not_start. I called the geterror method but the result was 'no errors'. Please assist.

P.s. I am able to set speed/horizontal avoidance mode successfully (no error messages pop up). I am also able to call the set up environment method successfully (if anyone can tell me what it does exactly, I would be really grateful). However, the mission still cannot be executed.

Please assist. Thank you!


Reply
Replies
DJI SDK Support
I think you haven't clicked on some of the target on the screen.  Have you tested them when the drone is in the air or in the simulator?
2017-8-25 14:21
Jeanlim96
DJI SDK Support Posted at 2017-8-25 14:21
I think you haven't clicked on some of the target on the screen.  Have you tested them when the dron ...

I have tested it on the simulator.  I got the target pointF location using the  coordinate transformation methods on the tapfly docuentation.

private PointF getTapFlyPoint(View iv) {
    if (iv == null) return null;
    View parent = (View)iv.getParent();
    float centerX = iv.getLeft() + iv.getX()  + ((float)iv.getWidth()) / 2;
    float centerY = iv.getTop() + iv.getY() + ((float)iv.getHeight()) / 2;
    centerX = centerX < 0 ? 0 : centerX;
    centerX = centerX > parent.getWidth() ? parent.getWidth() : centerX;
    centerY = centerY < 0 ? 0 : centerY;
    centerY = centerY > parent.getHeight() ? parent.getHeight() : centerY;
   
    return new PointF(centerX / parent.getWidth(), centerY / parent.getHeight());
}

The view that i used is the start button where the location is the touch location on the screen. Is this correct?
2017-8-27 17:29
You need to log in before you can reply Login | Register now

Quick Reply Back to top Back to list
Quick Reply Back to top Back to list