I am unable to access timeline missions in v5.8. Dji Mini Pro 3

Completed

Comments

3 comments

  • DJI Developer Support
    The timeline mission is actually similar to waypoint mission. DJI Mini 3 Pro does not support waypoint mission.
    0
    Comment actions Permalink
  • Usman

    Alright, can you tell me which drone will support timeline mission? I am asking specifically about timeline mission not waypoint mission. I am using v.5.8.0.

    • Which drone should I buy?
    • How will I be able to use timeline mission from the SDK v.5.8.0?

    My goal is something like this (Just a sample taken from DJI Flutter implementation):

    Future<void> _startTimelineMission() async {
    try {
    var droneHomeLocation = FlightLocation(
    latitude: 32.2181125, longitude: 34.8674920, altitude: 0);

    if (droneHomeLocation == null) {
    developer.log(
    'No drone home location exist - unable to start the flight',
    name: kLogKindDjiFlutterPlugin);
    return;
    }

    Flight flight = Flight.fromJson({
    'timeline': [
    {
    'type': 'takeOff',
    },
    // {
    // 'type': 'startRecordVideo',
    // },
    // {
    // 'type': 'waypointMission',
    // // For example purposes, we set our Point of Interest a few meters to the north (in relation to the Drone's Home Location).
    // // Note: Setting the precision to 8 decimals (~1.1mm accuracy, which is the GPS limit).
    // 'pointOfInterest': {
    // 'latitude': ((droneHomeLocation.latitude + (20 * 0.00000899322)) *
    // 100000000)
    // .round() /
    // 100000000,
    // 'longitude':
    // ((droneHomeLocation.longitude + (0 * 0.00000899322)) *
    // 100000000)
    // .round() /
    // 100000000,
    // 'altitude': droneHomeLocation.altitude,
    // },
    // 'maxFlightSpeed':
    // 15.0, /// Max Flight Speed is 15.0. If you enter a higher value - the waypoint mission won't start due to DJI limits.
    // 'autoFlightSpeed': 10.0,
    // 'finishedAction': 'noAction',
    // 'headingMode': 'towardPointOfInterest',
    // 'flightPathMode': 'curved',
    // 'rotateGimbalPitch': true,
    // 'exitMissionOnRCSignalLost': true,
    // 'waypoints': [
    // // {
    // // 'location': {
    // // 'latitude': 32.2181125,
    // // 'longitude': 34.8674920,
    // // 'altitude': 20.0,
    // // },
    // // 'heading': 0,
    // // 'cornerRadiusInMeters': 5,
    // // 'turnMode': 'clockwise',
    // // 'gimbalPitch': 0,
    // // },
    //
    // // This initial waypoint is important, the DJI SDK ignores the cornerRadiusInMeters of the first waypoint (and the turn would not be "round").
    // // Therefore, we add this initial waypoint, just to get the Drone to a specific height, and when it reaches the second waypoint - the cornerRadiusInMeters is treated properly by the DJI SDK.
    // {
    // 'location': {
    // 'latitude': droneHomeLocation.latitude,
    // 'longitude': droneHomeLocation.longitude,
    // 'altitude': 2,
    // },
    // 'cornerRadiusInMeters': 5,
    // 'turnMode': 'counterClockwise',
    // },
    // {
    // 'vector': {
    // 'distanceFromPointOfInterest': 20,
    // 'headingRelativeToPointOfInterest': -45,
    // 'destinationAltitude': 10,
    // },
    // 'cornerRadiusInMeters': 5,
    // 'turnMode': 'counterClockwise',
    // },
    // {
    // 'vector': {
    // 'distanceFromPointOfInterest': 20,
    // 'headingRelativeToPointOfInterest': -135,
    // 'destinationAltitude': 10,
    // },
    // 'cornerRadiusInMeters': 5,
    // 'turnMode': 'counterClockwise',
    // },
    // {
    // 'vector': {
    // 'distanceFromPointOfInterest': 20,
    // 'headingRelativeToPointOfInterest': -225,
    // 'destinationAltitude': 20,
    // },
    // 'cornerRadiusInMeters': 5,
    // 'turnMode': 'counterClockwise',
    // },
    // {
    // 'vector': {
    // 'distanceFromPointOfInterest': 20,
    // 'headingRelativeToPointOfInterest': -315,
    // 'destinationAltitude': 10,
    // },
    // 'cornerRadiusInMeters': 5,
    // 'turnMode': 'counterClockwise',
    // },
    // {
    // 'location': {
    // 'latitude': droneHomeLocation.latitude,
    // 'longitude': droneHomeLocation.longitude,
    // 'altitude': 10,
    // },
    // 'cornerRadiusInMeters': 5,
    // 'turnMode': 'counterClockwise',
    // },
    // ],
    // },
    // {
    // 'type': 'stopRecordVideo',
    // },
    // {
    // 'type': 'singleShootPhoto',
    // },
    {
    'type': 'land',
    },
    ],
    });

    // Converting any vector definitions in waypoint-mission to locations
    for (dynamic element in flight.timeline) {
    if (element.type == FlightElementType.waypointMission) {
    CoordinatesConvertion
    .convertWaypointMissionVectorsToLocationsWithGimbalPitch(
    flightElementWaypointMission: element,
    droneHomeLocation: droneHomeLocation!);
    }
    }

    developer.log(
    'Flight Object: ${jsonEncode(flight)}',
    name: kLogKindDjiFlutterPlugin,
    );
    Map<String, dynamic> flightJson = flight.toJson();
    final result = await platform
    .invokeMethod('test_waypoint', {'flight': jsonEncode(flightJson)});

    developer.log(
    'Start Flight succeeded',
    name: kLogKindDjiFlutterPlugin,
    );
    } on PlatformException catch (e) {
    developer.log(
    'Start Flight PlatformException Error',
    error: e,
    name: kLogKindDjiFlutterPlugin,
    );
    } catch (e) {
    developer.log(
    'Start Flight Error',
    error: e,
    name: kLogKindDjiFlutterPlugin,
    );
    }
    }
    0
    Comment actions Permalink
  • DJI Developer Support
    MSDK V5 does not provide timeline mission function. However, Waypoint Mission can basically achieve all the functions of Timeline Mission. From the code you provided, it seems that you were already using waypoint mission. In MSDK V5, the Mavic 3 Enterprise series, M30 series, M350 RTK, and M300 RTK support Waypoint Mission.
    0
    Comment actions Permalink

Please sign in to leave a comment.