Skip to content

Fly Waypoints

TODO: link to code TODO: update once implemented

Note: This tick (and MavUpload) are both special in that they can be used at different contexts in the mission. Both take some parameter that specifies what should happen when the tick is completed, alongside some more specialized parameters to tune the behavior of the tick to be what you want for that specific moment in time.

The Fly Waypoints tick handles flying the waypoint path of initial mission waypoints.

It takes two parameters in the constructor:

  1. The state to go to after the waypoints have been flown.
  2. Whether or not the plane should try and take pictures of the search zone while it is flying.

And it operates under the following logic, run at every tick:

  • If there is an opposing plane detected, take evasive action.
  • If the plane is over the search zone, and the plane should be taking pictures (specified by the parameter), and a picture hasn't been taken in the last two seconds, then take a picture.
  • If the waypoint path has finished, transition to the next state (specified by the parameter).

TODO: link to dynamic avoidance code once it is written TODO: link to camera code that actually takes the picture TODO: link to the mavlink client code that checks the current status of the waypoint mission