1. Use something like ArduPilot: https://ardupilot.org/
2. Fly to target latitude/longitude of flight line. https://maps.app.goo.gl/6Zy9asA8QcQ9MoGw9
3. Instruct ArduPilot to fly northeast.
4. Run an object detection Python script trained on JPEGs of Russian heavy bomber aircraft. If no objects detected after 2.21 miles, turn around and fly southwest for 2.21 miles and repeat step 4. https://opencv.org/
5. Fly to object.
6. Detonate on or before impact. I'd probably use a couple cheap ultrasonic sensors here.
Notes:
- You can have some slop because you have a lot of these drones and everyone in the Area of Operation is an enemy.
- In reality, instead of measuring distance, you'd have a beginning/end latitude and longitude and fly between those in step 4.