We consider a type of routing problems common in defence and security, in which we control a fleetof unmanned aerial vehicles (UAVs) that have to reach one or more target locations without beingdetected by an adversary. Detection can be carried out by a variety of sensors (radio receivers, cameras,personnel, etc) placed by the adversary around the target sites. We model the act of detecting a UAVfrom first principles by noting that sensors work by monitoring frequencies in the electromagneticspectrum for signals or noise emitted. By this, we are able to provide a flexible and versatile nonlinearoptimisation framework in which the problem is modeled as a novel trajectory optimisation problemwith paths of the UAVs as continuous arcs in an Euclidean space. The flexibility of our approach isexhibited by the fact that we can easily consider various relevant objectives, among them minimisingthe overall probability of detection and maximising the location error that the adversary experienceswhen trying to locate our UAVs. Our model is also versatile enough to consider the act of jamming, inwhich one or more of our UAVs intentionally send out signals to interfere with the operations of theadversary’s sensors. Numerical results show the flexibility of our framework, and that we can solverealistic instances of this problem type.