fernando_s971
lvl.2
Brazil
Offline
|
Context
I'm building a mission planner that will get waypoints from a user click on the map. After completing an area, he'll load and start the mission.
Expected/current behavior
When I start the mission, it goes through all the waypoints, and after arrives at the last one, it comes back to the home point and lands.
The problem is: it doesn't return home, instead it lands on the last waypoint.
Details
The code below is just a part of a POJO class
public WaypointMission toDjiMission() {
final WaypointMission.Builder waypointMissionBuilder = new WaypointMission.Builder();
final int waypointsSize = waypoints.size();
for (int i = 0; i < waypointsSize; i++) {
waypointMissionBuilder.addWaypoint(Waypoint.toDjiWaypoint(waypoints.get(i)));
}
return waypointMissionBuilder
.setMissionID(id)
.maxFlightSpeed(maxSpeedInMetersPerSecond.floatValue()) // 15
.autoFlightSpeed(autoFlightSpeedInMetersPerSecond.floatValue()) // 8.5
.flightPathMode(flightPathTurnMode.toDjiEnum()) // curved
.headingMode(uavHeadingMode.toDjiEnum()) // auto
.finishedAction(missionFinishedAction.toDjiEnum()) // Go home
.build();
}
Environment
- Android 9
- MSDK 4.13.1
- Phantom 4 Pro
|
|