Trajectory Generation and Optimization for Experimental Investigation of Flapping Flight