Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The aircraft is not in the air. #27

Open
saikrishnarao2 opened this issue May 9, 2018 · 0 comments
Open

The aircraft is not in the air. #27

saikrishnarao2 opened this issue May 9, 2018 · 0 comments

Comments

@saikrishnarao2
Copy link

I am trying to dynamically give a GPS coordinate to the FollowMeMission.

When I called startSimpleFollowMe its giving me an error "The aircraft is not in the air.".
Here are the two methods which I used for a
public void updateSimpleFollowMe(){
if(fmmo == null){
fmmo = MissionControl.getInstance().getFollowMeMissionOperator();
}
final FollowMeMissionOperator followMeMissionOperator = fmmo;
if(followMeMissionOperator.getCurrentState().equals(FollowMeMissionState.EXECUTING)) {
followMeMissionOperator.updateFollowingTarget(new LocationCoordinate2D(homeLatitude + 100 * GeneralUtils.ONE_METER_OFFSET, homeLongitude),
new CommonCallbacks.CompletionCallback() {
@OverRide
public void onResult(DJIError error) {
if (error != null) {
setRunningResultToText(followMeMissionOperator.getCurrentState().getName().toString() + " " + error.getDescription());
} else {
setRunningResultToText("Mission Update Successfully");
}
}
});
}
}
public void startSimpleFollowMe(){

    if(fmmo == null){
        fmmo = MissionControl.getInstance().getFollowMeMissionOperator();
    }
    final FollowMeMissionOperator followMeMissionOperator  = fmmo;
    if (followMeMissionOperator.getCurrentState().equals(FollowMeMissionState.READY_TO_EXECUTE)){
        fmm = FollowMeMission.getInstance().initUserData(homeLatitude, homeLongitude,15);
        followMeMissionOperator.startMission(fmm, new CommonCallbacks.CompletionCallback() {
            @Override
            public void onResult(DJIError djiError) {
                if(djiError != null){
                    setRunningResultToText(djiError.getDescription());
                } else {
                    setRunningResultToText("Mission Start: Successfully");
                }
            }
        });
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant