DOI: 10.5281/zenodo.16949190
title: Old habits die hard: homing pigeons maintain their route fidelity but change flight altitude when exposed to a raptor-like robot

description: Dataset and R code used for the analyses presented in manuscript.

##########################

the file  "calculate_relative_directions.R" contains the code of custom function used to calculate the relative position and orientation of pigeon  in respect of  RobotFalcon position. The final output is an angle in degrees from 0° to 180° which indicates if the pigeon is located in front of the RobotFalcon (0°) or at the back (180°). The function is called in the main script

the file "DataAnalysis_Paper_Pigeons_RobotFalcon_Landscape.R" contains the code used for the analyses.

##########################

Explanation of variables contained in files (txt or csv) to be used in the .R file:

- "Deployment_information.csv": contains all the information on pigeon releases. the columns represent: group = color band of the pigeon that was used to divide into different groups the birds and facilitate idenitification od treatment individuals at release site (groups N, GrNGr and GNG include only experimental subjects); id = bird id; gps_ID = id of gps used; type = generic classification of releases, not used in the analysis (E = training, C = pre-exposure and post-exposure , F = exposure); type2 = flags each release as E (training), PRE (pre-exposure), F (exposure) and POST (post-exposure); release_site = name of release site; release = name of release; release_date and release_time = date and time of release; no_data = flags if gps collected (1) or not (0) locations. 

-"CleanData_pigeons.txt" is a dataframe of the cleaned GPS data collected for the experimental pigeon during the procedure (pre-exposure, exposure and post-exposure flights). The data was cleaned to remove locations collected during pigeon transportation from the loft to the release site and to retain only the parts of the route when the pigeon was flying (speed > 5 km/h). The data contains only the segment of the route considered for the analyses from 750m up to 1680m from release site. The columns indicate: id = pigeon id; Latitude; Longitude; release = name of release; type2 = flags each release as PRE (pre-exposure), F (exposure) and POST (post-exposure); release_type = flags each release to identify 1st and 2nd pre-exposure (PRE1 and PRE2), 1st, 2nd and 3rd exposure (F1, F2 and F3) and post-exposure (POST1) flights; Datetime_UTC; Altitude(m) = altitude collected by the GPS; Rel.Altitude = corrected altitude collected by the GPS; Speed(km/h) = speed collected by the GPS; dist_from_home = distance in metres of the location from the home loft; dist_from_RS = distance in metres of the location from the release site; idfix = unique identifier of location; no_data = always 1, corresponds at "no_data" column in Deployment_information file.

-"Clean_RobotFalcon.txt" is a dataframe of the cleaned RobotFalcon GPS data. The data was cleaned to remove locations collected during drone transportation loft area-release site and back. Moreover the data was downsampled to have a sample rate of 1Hz (comparable to the sampling rate of pigeons). From the locations it was calculated the speed, turning angle and acceleration. The columns indicate: falco_id = name of the gps used to track RobotFalcon route; falco_long = longitude; falco_lat = latitude; Datetime_UTC = timestamp in UTC; falco_height = altitude collected by the GPS; falco_speed_ms = speed estimated from coordinates and timestamps; falco_turn_angle = estimated turning angles; falco_acc_ms2 = acceleration.

- "Fidelity_Index_df.txt" is the dataframe containing the Fidelity Index values estimated per id and release type (exposure and post-expodure flights). Columns indicate: id = pigeon id; release = name of release; release type = type of release (1st, 2nd, 3rd exposure or post-exposure flight); FI = Fidelity Index for the release type; FI_base = Fidelity Index of the last pre-exposure flight (individually specific).