We tested and found that the maximum value of waypoint action property -waitingTime in 4.16.1 is 25s.
The hovering of waypointV2 mission needs to be realized by this attribute, at this time, if you want to realize the hovering of more than 25s, you can take several START_STOP_FLY actions with the waitingTime attribute after the last START_STOP_FLY action, so as to realize the accumulation of time.
The following is the sample code to achieve a 50s hovering waypoint action.
WaypointTrigger waypointActionTrigger = new WaypointTrigger.Builder()
.setTriggerType(ActionTypes.ActionTriggerType.ASSOCIATE)
.setAssociateParam(new WaypointV2AssociateTriggerParam.Builder()
.setAssociateActionID(associateActionId)
.setAssociateType(ActionTypes.AssociatedTimingType.AFTER_FINISHED)
.setWaitingTime(25)
.build())
.build();
WaypointActuator waypointActionActuator = new WaypointActuator.Builder()
.setActuatorType(ActionTypes.ActionActuatorType.AIRCRAFT_CONTROL)
.setAircraftControlActuatorParam(new WaypointAircraftControlParam.Builder()
.setAircraftControlType(ActionTypes.AircraftControlType.START_STOP_FLY)
.setFlyControlParam(new WaypointAircraftControlStartStopFlyParam.Builder()
.setStartFly(false)
.build())
.build())
.build();
WaypointV2Action waypointAction = new WaypointV2Action.Builder()
.setActionID(++actionId)
.setTrigger(waypointActionTrigger)
.setActuator(waypointActionActuator)
.build();
waypointV2ActionList.add(waypointAction);
WaypointTrigger waypointActionTrigger1 = new WaypointTrigger.Builder()
.setTriggerType(ActionTypes.ActionTriggerType.ASSOCIATE)
.setAssociateParam(new WaypointV2AssociateTriggerParam.Builder()
.setAssociateActionID(associateActionId)
.setAssociateType(ActionTypes.AssociatedTimingType.AFTER_FINISHED)
.setWaitingTime(25)
.build())
.build();
WaypointActuator waypointActionActuator1 = new WaypointActuator.Builder()
.setActuatorType(ActionTypes.ActionActuatorType.AIRCRAFT_CONTROL)
.setAircraftControlActuatorParam(new WaypointAircraftControlParam.Builder()
.setAircraftControlType(ActionTypes.AircraftControlType.START_STOP_FLY)
.setFlyControlParam(new WaypointAircraftControlStartStopFlyParam.Builder()
.setStartFly(false)
.build())
.build())
.build();
WaypointV2Action waypointAction = new WaypointV2Action.Builder()
.setActionID(++actionId)
.setTrigger(waypointActionTrigger1)
.setActuator(waypointActionActuator1)
.build();
waypointV2ActionList.add(waypointAction);
Comments
0 comments
Please sign in to leave a comment.