startTakeoffWithCompletion not returning an error

Completed

Comments

9 comments

  • DJI Developer Support
    So you are calling startTakeoffWithCompletion while the motor is in the starting state, and the aircraft is not taking off? Can startTakeoffWithCompletion make the aircraft take off properly when the motor is stopped?
    0
    Comment actions Permalink
  • Kostia Grebelsky

    I think you are missing a point. The drone is ON. I am was testing how startTakeoffWithCompletion would work and what error would be returned if drone does not take off. I call startTakeoffWithCompletion to attempt to fly obviously I know it will not fly because propellers are off. I can hear motors start when startTakeoffWithCompletion is called and right away completion block is called, but error is NIL.

    [GTDroneController.shared.myFC startTakeoffWithCompletion:^(NSError * _Nullable error) {

                if (error) { //expect an error nil is returned

    0
    Comment actions Permalink
  • DJI Developer Support
    Actually, the aircraft cannot detect whether the propeller blades are installed. In fact, startTakeoffWithCompletion controls the rotation of the motor. As for whether the aircraft will ascend to a certain height, startTakeoffWithCompletion cannot determine that. It can only obtain the result of whether the command was successfully sent and whether the motor is currently operational.
    0
    Comment actions Permalink
  • Kostia Grebelsky

    this is not what documentation says:
    "Starts aircraft takeoff. Takeoff is considered complete when the aircraft is hovering 1.2 meters (4 feet) above the ground. Completion block is called when aircraft crosses 0.5 meters (1.6 feet). If the motors are already on, this command cannot be executed."

    0
    Comment actions Permalink
  • DJI Developer Support
    The document describes the effects that will be achieved when the aircraft enters the takeoff state. In reality, I removed the propellers from the aircraft and when I called the takeoff interface, the motor did start and the FlightMode changed to takeoff mode. However, at this point, the aircraft immediately stops the takeoff action and the FlightMode changes to GPS or other normal modes. Do you need to obtain the state of the aircraft without the propellers installed?
    0
    Comment actions Permalink
  • Kostia Grebelsky

    No, in reality I need to know when it actually took off/flying. I am guessing I can only rely on state change I am guessing the only other accurate way is to wait for call back on setCurrentState? The problem is that at times for whatever reason it may not take off and now I need to rely on some kind of timing check to determine that after calling takeOff it did not actually take of after X seconds for whatever reason. 

    0
    Comment actions Permalink
  • DJI Developer Support
    If you need to know the current status of the aircraft, flightState.FlightMode is the best way. Even if the aircraft does not have propellers for takeoff, in reality, FlightMode has entered the takeoff state, but the aircraft immediately stops the takeoff action due to the protection mechanism.
    0
    Comment actions Permalink
  • Kostia Grebelsky

    Ok thanks, thats what I was doing before and switched back to doing. IMHO documentation needs to be updated since it seems to be inaccurate. "Completion block is called when aircraft crosses 0.5 meters (1.6 feet). If the motors are already on, this command cannot be executed." This is simply not so.

    0
    Comment actions Permalink
  • DJI Developer Support
    Thank you for your feedback. We have forwarded your suggestions to our documentation engineer for adjustments.
    0
    Comment actions Permalink

Please sign in to leave a comment.