Modeling Flight and Battery Dynamics of a Flapping-Gliding Unmanned Aerial Vehicle