How to write codes about navigation

I read the contents of src>>modules>>navigation,but don’t know how to use it.And need a guide about “a key to takeoff(use ‘flysky’ not qgroundcontrol)”.Also want to know whether PX4 project has some example codes relevant to “a key to takeoff”.