Altitude Hold or Stabilize mode.
This is what you would need to do.
Stabilize mode, I need pretty controlled flight. Thanks for the link looks like what I need. I plan to develop a program with a raspberry pi to fly a route indoors, the requirements are very simple but I am a bit behind in my programming and hardware knowledge. Any help appreciated.