Open ajy720 opened 5 years ago
Public comment from Hummels Lei in Zendesk ticket #29206:
Hi, you say "The code used is the one that successfully executed Waypoint Mission in MAVIC 2 ENTERPRISE". Do you mean this code doesn't work well in Mavic air and Mavic 2 ZOOM? Can you provide more information about waypoint parameters?
Yes. That's right. Above code doesn't work in Mavic air and Mavic 2 ZOOM.
Here is my Waypoint Mission parameters. And I tested it both in the simulator at DJI Assistant 2 for Mavic and in the real world.
private void Init_Mission(object sender, RoutedEventArgs e)
{
double nowLat = Convert.ToDouble(DD.Location().Latitude());
double nowLng = Convert.ToDouble(DD.Location().Longitude());
WaypointMission = new WaypointMission()
{
waypointCount = 3,
maxFlightSpeed = 15,
autoFlightSpeed = 10,
finishedAction = WaypointMissionFinishedAction.NO_ACTION,
headingMode = WaypointMissionHeadingMode.AUTO,
flightPathMode = WaypointMissionFlightPathMode.NORMAL,
gotoFirstWaypointMode = WaypointMissionGotoFirstWaypointMode.SAFELY,
exitMissionOnRCSignalLostEnabled = false,
pointOfInterest = new LocationCoordinate2D()
{
latitude = 0,
longitude = 0
},
gimbalPitchRotationEnabled = true,
repeatTimes = 0,
missionID = 0,
waypoints = new List<Waypoint>()
{
InitDumpWaypoint(nowLat+0.001, nowLng+0.0015),
InitDumpWaypoint(nowLat+0.001, nowLng-0.0015)/*,
InitDumpWaypoint(nowLat-0.001, nowLng-0.0015),
InitDumpWaypoint(nowLat-0.001, nowLng+0.0015)*/
}
};
}
private Waypoint InitDumpWaypoint(double latitude, double longitude)
{
Waypoint waypoint = new Waypoint()
{
location = new LocationCoordinate2D() { latitude = latitude, longitude = longitude },
altitude = 20,
turnMode = WaypointTurnMode.CLOCKWISE,
heading = 0,
gimbalPitch = -30,
actionRepeatTimes = 1,
actionTimeoutInSeconds = 60,
cornerRadiusInMeters = 0.2,
speed = 0,
shootPhotoTimeInterval = -1,
shootPhotoDistanceInterval = -1,
waypointActions = new List<WaypointAction>()
{
InitDumpWaypointAction(1000, WaypointActionType.STAY)
}
};
return waypoint;
}
private WaypointAction InitDumpWaypointAction(int Param, WaypointActionType actiontype)
{
WaypointAction action = new WaypointAction()
{
actionType = actiontype,
actionParam = Param
};
return action;
}
Thank you for reply.
Public comment from Hummels Lei in Zendesk ticket #29206:
Hi, Mavic air and Mavic 2 ZOOM can't execute a waypoint mission. I want to know if you can see the FPV image of Mavic air and Mavic 2 ZOOM on windows SDK program.
Yes, I can't see the FPV image of Mavic 2 ZOOM on windows SDK program. What should I do?
Public comment from Hummels Lei in Zendesk ticket #29206:
Hi please check:
1 You are using the latest version of the Windows SDK(0.3.2).
2 The remote control you are using is not Smart Controller(https://www.dji.com/smart-controller?site=brandsite&from=insite_search).
3 You have already installed the driver follow the instructions on https://developer.dji.com/windows-sdk/documentation/connection/Mavic2.html.
And I think this issue(https://github.com/dji-sdk/Windows-SDK/issues/32) may help you.
I want to execute Waypoint Mission.
So I'm running the method and checking the error message in the following order. Init Mission -> SetGroundStationMode -> LoadMission -> GetLoadedMission -> UploadMission -> StartMission
There was no problem until LoadMission, but there was a problem with UploadMission.
The waypoint is uploaded one by one, uploaded to the last mission and returned to the "READY_TO_UPLOAD" state, or the "UPLOADING" state is maintained.
The code used is the one that successfully executed Waypoint Mission in MAVIC 2 ENTERPRISE.
code:
My development environment is like this: OS : Windows 10 IDE : Visual Studio 2019 Development Language: C# Drone: MAVIC 2 ZOOM (Firmware: V01.00.0510(latest firware)) & MAVIC AIR SDK Version: 0.3.1