Predicting Drosophila Body Orientation from a Translational Trajectory using an Artificial Neural Network
Body orientation is a key variable in the analysis of insect flight behavior, yet it remains difficult to measure across the full extent of a trajectory in most experimental settings. Although modern tracking systems reliably capture the position and velocity of the center of mass, resolving body yaw orientation typically requires dedicated hardware confined to a small, purpose-built volume, and is impractical for large-scale or long-duration studies. Here, we develop a data-driven estimator that predicts body yaw orientation directly from translational flight trajectory data. We trained a fully connected feedforward artificial neural network (ANN) on a dataset in which both flight trajectory and body orientation were recorded simultaneously in freely flying Drosophila, using a time-delay embedding of ground velocity, air velocity, and inferred thrust vectors as input features. Trained on 2,340 trajectories, the ANN predictor achieved a median absolute angular error of approximately 5{degrees}, with accurate heading recovery across the full [-{pi}, {pi}) range. The estimator provides a practical tool for recovering body orientation information from existing trajectory datasets in which only center-of-mass motion was recorded, extending the behavioral and computational analysis of insect navigation to previously inaccessible data.