title_body: Seeking a cheap, programmable drone, for use in the UK
upvoted_answer: The sort of sensors and equipment you are talking about would fit on a 250mm frame (measured diagonally, between motor centres), which is the 'standard' outdoor FPV size that takes 5&quot; props. Below this size, things don't really get any cheaper but it gets a lot harder to squeeze everything into the frame.
  If you need more space, the F450 'Flame wheel' frame is pretty standard for development drones. It's heavy and fragile compared to an 250 frame though, and everything is more expensive, so I'd stay small if you can.
  'Programmable' is difficult to define as almost no one writes their own code, yet the dividing line between 'toy' and 'hobby' grade is when the flight controller has a USB port and can be flashed with (usually) open-source firmware such as BetaFlight, and the PIDs and flight modes configured.
  Most flight controllers only have a couple of inputs, one of which is used for the RC receiver. The other is for people who want to add a GPS (and some flight controllers have built in barometer and compass). In theory then, you could do everything with a standard flight controller, if you can work out how to modify BetaFlight, and you're careful to leave it enough CPU time to fly the drone.
  Alternately you could handle navigation on the ESP32 and just send the flight controller commands as if it was the RC receiver.
  The next step up are the flight controllers designed for autonomous flight, such as the Pixhawk. They have a lot more inputs and software for setting up waypoint missions. They are more expensive though.
  You probably don't need the button cell, most people use a PDB (power distribution board) to split the battery wires to the motors, and they usually also contain a 12v and 5v regulator, and often the flight controller also provides 3.3v
  Finally, you're unlikely to stay under 250g so you need to register as a drone operator with the CAA. It's only £9 and you can take the multi-choice test as many times as necessary. The rules are pretty simple (don't fly near things you wouldn't want to hit!) but you should read them to make sure you don't accidently break the law. You should also consider buying some insurance, it's pretty cheap from FPVUK or the BMFA.