Programming is not the correct term. What you are talking about is Mission Planning. In other words, instructing the aircraft to take off from point A (AKA the Home position), climb to a give altitude, fly to point B (AKA a Destination or a Way Point), Loiter at a given altitude for a...