This thesis presents a method for designing a flapping wing stroke for a flapping wing vehicle. A flapping wing vehicle is a vehicle such as a bird or an insect that uses its wings for propulsion instead of a conventional propeller or a jet engine. The intent of this research is to design a wing stroke that the wings can follow which will maintain the vehicle at a desired longitudinal flight path angle and velocity. The cost function is primarily a function of the flight path angle error, velocity error and control rate. The objective maneuver is to achieve a flight condition similar to the trim of a conventional fixed wing aircraft. Gliding configurations of the vehicle are analyzed to better understand flight in minimal energy configurations as well as the modes of the vehicle. A control law is also designed using Lyapunov's direct method that achieves stable tracking of the wing stroke. Results are presented that demonstrate the ability of the method to design wing strokes that can maintain the vehicle at various flight path angles and velocities. The results of this research show that an optimal control problem can be posed such that the solution of the problem results in a wing stroke that a flapping wing vehicle can use to achieve a desired maneuver. The vehicle velocity is shown to be stable in controlled gliding flight and flapping flight.