Indoor flight testing of a bioinspired ornithopter is conducted in this study and the dominant flight state variables such as body pitch angle, forward flight speed, altitude, wings and tail motions of the freely flying ornithopter are simultaneously measured by using a three-dimensional visual tracking system. A control-oriented system model of the ornithopter in trimmed level flight is established based on the recorded inputs and outputs dataset and the system matrices are fitted in a least-squares sense. To reduce the amplitude of the ornithopter body oscillations, the identified linear time-invariant system model is formulated to a disturbance-rejection problem and an optimal controller minimizing the quadratic performance index is designed. The continuous wing motion defined as the known disturbance deteriorates the pitch balance with respect to the center of gravity; however, the designed feedforward and feedback controller periodically activates the ornithopter tail and successfully reduces the magnitudes of the body oscillations.