Text this: Trajectory optimization of a flapping-wing robot in a wind field