Skip to content

Airdrop Approach

TODO: link to code TODO: update when implemented

The Airdrop Approach tick handles the logic of actually approaching the drop zone and dropping a bottle. In general, there are two different ways this tick can run depending on what mode the airdrop payloads are running.

INDIRECT_DROP

Indirect drop, when the OBC lets the airdrop payloads drop on their own accord once they get the go-ahead signal, is simpler.

On creation, this tick decides on a bottle to drop and then generates a path to travel towards the drop point and then uploads it to the plane.

On tick, before the path has been fully uploaded this tick does nothing.

On tick, once the path has been uploaded this tick should swap to autonomous flight and signal to the chosen airdrop payload that it is its turn to drop.

Then, on tick it does the following:

  • If there is an opposing plane, then revoke drop privileges and take evasive action.
  • Once the bottle sends back an ACK that it was dropped, transition to FlyWaypoints with parameters of AirdropApproach and false (so that it returns back to this tick once it is done with the waypoint path, and so that it doesn't take any photos while flying).
  • If the flight path is finished and no ACK was received, try again. If after 3 approaches it never drops, then try a different bottle.

DIRECT_DROP

Direct drop, when the OBC actually picks the location of the drop, is more complicated. In this case, the plane needs to calcuate the exact point at which the payload should be dropped, and then drop it once it is over that point. This should be done by trying to estimate the wind from readings from the flight controller, and taking into account velocity of the plane.

Resources:

TODO: link to airdrop packet documentation