Accelerometers and simple algorithms identify activity budgets and body orientation in African elephants Loxodonta africana

Accelerometers can be used to monitor animal behavior remotely, but validation is required for each species. Previously, we showed that accelerometer data in collars could be used to identify specific behaviors in African elephants Loxodonta africana, using complex analytical methods. Here, we show that simple methods can also be used to identify elephant activity levels and body orientation. Subjects were 6 African elephants: 3 at Disney’s Animal Kingdom®, Florida, USA, and 3 in Samburu-Laikipia, Kenya. Each elephant wore a collar containing a tri-axial ac celerometer positioned on top of the neck. Simultaneous video recordings allowed validation of accelerometer data against observed behavior. The standard deviation of the total acceleration was shown to be a valid measure of dynamic acceleration, differentiating activity levels associated with resting, feeding, bathing, walking, and rapid walking. The mean of the total acceleration was shown to be a valid measure of static acceleration, and indicated upright and recumbent orientations. Simulations showed how accuracy was affected by sample rate, number of axes examined, and analysis window lengths. Based on 34 continuous 24 h acceleration streams, the 6 elephants exhibited an average of 2.5 h of overnight recumbence associated with minimal movement, indicating sleep. Daily activity budgets exhibited periods of minimal activity (e.g. resting, 17%), low activity (e.g. feeding, 68%), medium activity (e.g. walking, 13%), and high activity (e.g. rapid walking, 2%). Kenyan elephants were slightly more active and exhibited less restful recumbence compared to zoo elephants. Accelerometers in elephant collars can detect activity levels that are associated with specific behaviors, and can detect body orientation as a proxy for sleep.

ticular elephant, accelerometers could determine if interventions to increase activity, such as enrichment techniques, are effective (e.g.Soulsby 2012, Rothwell et al. 2011).Accelerometers may also be used to detect atypical behaviors that require immediate attention, such as limping (e.g.Pastell et al. 2009).
Accelerometer research on zoo and safari park elephants is on the increase.For example, Rothwell et al. (2011) showed that accelerometers in anklets can be used to count steps and infer walking distance in African elephants, and Ren & Hutchinson (2008) used accelerometers attached to the legs to investigate gaits of walking Asian and African elephants.In a multi-institutional study, Holdgate et al. (2016) used accelerometers in anklets to measure recumbence in both Asian and African elephants.Finally, Soulsby (2012) used accelerometers and GPS units in collars on Asian elephants Elephas maximus to measure activity budgets, activity levels associated with specific behaviors, and the correlation between activity level and walking distance.Our group previously attached accelerometers in collars to African elephants at Disney's Animal Kingdom ® , showing that common elephant behaviors (resting, feeding, bathing, and walking) can be differentiated from one another using dynamic acceleration and the periodicity of movement (Soltis et al. 2012).We also showed that elephants walk with a different posture dependent on whether they are in a positive or negative emotional state (Wilson et al. 2014).
We could not find published research on acce lerometer use in wild elephants, but data from accelerometers would be very useful for long-term behavioral research in free-ranging populations (e.g.Wall et al. 2014, O'Donoghue & Rutz 2016).For example, accelerometers could be used to determine energy expenditure during different behavioral states, such as female estrous or male musth, or in different ecological contexts, such as dry versus wet seasons.Also, real-time analysis of accelerometer data could detect when elephants are in distress.For example, a limping gait or sudden falling (e.g.Bourke et al. 2007) may indicate instances of injury or attack by humans, and electronic messages could be sent to wildlife veterinarians or anti-poaching units (O' Donoghue & Rutz 2016).
Collars are routinely used to house various sensors in both wild and zoo contexts (see citations above), and here, we extend our previous findings from accelerometers embedded in elephant collars (Soltis et al. 2012).Our scope extends validations of accelerometer data to detect body orientation (upright versus recumbent) in addition to overall activity lev-els (Soltis et al. 2012), in wild African elephants, as well as zoo-housed elephants (Soltis et al. 2012).
In terms of methodology, we expand on our previous work in 3 ways.First, we validate simple methods for analyzing accelerometer data.In our previous work, we used complex methods involving line interpolation, line subtraction, and Fourier transformations.Simpler methods may prove useful, however, in particular when low-cost, real-time analysis is re quired on-board elephant collars, or when users lack access to appropriate software.Therefore, we validated the mean of acceleration to measure body orientation (upright versus recumbent) and the standard deviation of acceleration to measure activity levels associated with a variety of elephant behaviors (resting, feeding, bathing, walking, and rapid walking).Second, we examine the trade-off between data reduction and accuracy.Accelerometer data can be abundant compared to other forms of data (e.g.GPS), and therefore costly to analyze or transfer wirelessly.Nevertheless, the appropriate data must be recorded such that targeted behavior is reliably detected.We used simulations to investigate how accuracy is affected by the number of axes examined, sample rate, and analysis window length, so that researchers may use this information to design data collection and analyses protocols.Third, we collected 24 h periods of continuous acce lerometer streams for both wild and zoo elephants.We developed fully automated routines that computed activity levels and body orientation from the acceleration streams, showing how these factors could be analyzed in real-time.In so doing, we provide preliminary data on wild African elephant activity budgets and recumbence and compare the re sults to zoo-housed Disney elephants.These results, combined with those of Soltis et al. (2012), provide a robust foundation for the study of African elephant behavior using tri-axial accelerometers.

Study subjects and data collection
We collected accelerometry data from 6 adult female African elephants Loxodonta africana.Three of the subjects were housed at Disney's Animal Kingdom ® , Florida, USA, in a 1.6 ha outdoor exhibit during the day, and various indoor or outdoor enclosures overnight (for details, see Soltis et al. 2012, Leighty et al. 2009).Data were collected from June to December 2011, and April to September 2013.The outdoor ex -hibit contained a large pool in which multiple elephants could submerge simultaneously, multiple scratching surfaces, a mud wallow, and large rock rings that allowed animals to move out of contact and visual range of other animals and guests.Elephants at Disney's Animal Kingdom® have been trained in operant conditioning to voluntarily wear collars around their necks to which various data collecting sensors have been attached, including audio-recorders and GPS units (e.g.Leighty et al. 2008).In the present study, tri-axial accelerometer loggers (X9-2mini, Gulf Coast Data Concepts,) were attached to the collars.These collars are described in detail by Leighty et al. (2009), and the specific accelerometer attachment is described by Soltis et al. (2012).Note that Horback et al. (2012) showed that collars did not affect elephant behavior in another zoo context.Accelerometers were programmed to internally log data at a 10 Hz sample rate on 3 axes.After recordings, collars were removed from elephants by keeper staff, and raw accelerometer data were downloaded from the loggers.
The additional 3 elephants were from the Samburu-Laikipia region of northern Kenya, each of which was part of an ongoing, long-term GPS tracking study of individually identified elephants (Wittemyer et al. 2013).Data were collected in February 2012 and from January to February 2013.In addition to GPS units, the elephants' collars were outfitted with triaxial accelerometers (Savannah Tracking), and programmed to internally log accelerometer data at a 10 Hz sample rate on 3 axes.A custom-made communication unit (Savannah Tracking) was used to wirelessly program the accelerometer and download the raw data.In both Disney and Samburu elephants, accelerometers were placed in collars on top of the elephant's neck, with the axis orientations as depicted in Fig. 1.
To validate patterns of accelerometer data against actual behavior, elephants were videotaped in both locations to capture a representative suite of behaviors: resting, feeding, bathing, walking, and rapid walking; elephants were also videotaped while recumbent in both locations.At Disney, elephants were videotaped in their outdoor exhibit to record the suite of behaviors, and overnight in their night holding areas to record recumbence.In Samburu-Laikipia, elephants were located using a real-time GPS server (Wall et al. 2014), and videotaped during daylight hours.Samburu-Laikipia elephants could not safely be followed at night, but recumbence was videotaped in 1 elephant while anesthetized for a collaring procedure.The entire suite of behaviors was observed and videotaped in both Disney and Samburu-Laikipia elephants -except for rapid walking, which was not observed in Disney elephants but was observed on 2 occasions in Samburu-Laikipia elephants.

Validation of simple algorithms to measure dynamic and static acceleration
The total acceleration data stream (Fig. 2) is traditionally divided into 2 components: dynamic and static acceleration (Shepard et al. 2008).Dynamic acceleration refers to g-forces due to movement of the device, represented by the fluctuation of g-force values.Static acceleration refers to g-force values due to the orientation of the device with respect the gravitational field, represented by the central tendency of g-force values (Fig. 2).
The sample standard deviation (SD) of the total acceleration may be a simple algorithm for quantifying dynamic acceleration.To validate the use of the SD to measure dynamic acceleration in African elephants, we compared the results of this method to our previously used method, line interpolation and subtraction (Soltis et al. 2012; see also Wilson et al. 2006).In this method, the total acceleration data series is smoothed by taking the running mean over a 2 s window, giving the static acceleration component of the total acceleration.Dynamic acceleration is then obtained by subtracting static acceleration values from total acceleration values, which results in values fluctuating around zero.Taking the mean of the absolute deviations from zero quantifies dynamic acceleration (Soltis et al. 2012).To validate the sample SD method, we obtained three 20 s bouts of 4 distinct behavioral states (resting, feeding, bathing, and walking) from the 3 elephants at Disney's Animal Kingdom ® , for a total of 9 bouts for each behavioral state (from Soltis et al. 2012).The 2 methods (line interpolation and SD) were computed for each axis of these data se quen ces.For each sequence, dynamic acceleration values were summed across the 3 axes, yielding overall dynamic body acceleration (ODBA; Wilson et al. 2006, Qasem et al. 2012).In this way, we were able to directly compare the 2 methods used to compute ODBA.
Additionally, we examined how ODBA values related to common behaviors in African elephants.In this analysis, we examined paired accelerometer and behavioral data from all 6 females.For each female, we obtained two 20 s bouts of resting, feeding, bathing, and walking, for a total of 12 bouts for each behavior.In addition, we recorded 1 instance of rapid walking in 2 of the Samburu-Laikipia females.By computing the ODBA across representative instances of each behavior, we are able to demarcate the range of ODBA values associated with resting, feeding, bathing, walking, and rapid walking.
The second component of total acceleration is static acceleration.Examination of Figs. 1 & 2 shows how static acceleration can be used to detect body orientation.When an elephant is in an upright position, the mean value of the sway axis should be around 0 (i.e.parallel to the gravitational field), and the mean value of the heave axis should be around −1 (perpendicular to the gravitational field).As the elephant orients to the recumbent position, the heave axis will move away from −1 and towards 0, and the sway axis will move away from 0 towards −1 or +1, depending on which side the elephant lies down.
The mean of the total acceleration is a simple algorithm for quantifying static acceleration.Based on preliminary observation of videotaped elephant recumbence and visual inspection of simultaneous accelerometer streams, we used the following rule to define a threshold for recumbence: If the absolute value of the mean of the x-axis (sway) was > 0.5 g, or the value of the mean of the z-axis (heave) was >−0.75 g, then the elephant was considered recumbent.In short: To validate this formula, we examined 10 bouts of video-recorded overnight recumbence from 2 Disney elephants.Additionally, we obtained 1 videorecorded bout of elephant recumbence from a single wild elephant under anesthesia during a collaring procedure.We analyzed the relevant total accelerometer streams surrounding each known bout of recumbence by dividing the stream into 60 s intervals and taking the mean.Every 5 min, the grand mean of the 60 s intervals was taken.By comparing automated detection of recumbence to visual observation, we were able to validate the automated routine for recumbence.

Data reduction simulations
We conducted simulations to determine how accuracy is affected by sample rate, number of axes examined, and analysis window lengths.To examine the effect of sample rate on dynamic acceleration, we obtained twenty 5 min accelerometer data sequences from 1 Disney and 1 Samburu-Laikipia elephant, for a total of forty 5 min sequences.We analyzed the x-axis (sway) and the z-axis (heave), as these 2 axes can be used to measure both dynamic acceleration and static axes.Static acceleration: while recumbent, the accelerometer is tilted on its side and the mean of the z-axis tends towards 0 while the mean of the x-axis tends towards −1 (reflecting the force of gravity).While upright, the means of the x-and z-axes reverse direction (see Fig. 1).Dynamic acceleration: while the elephant is still (and recumbent), there is little fluctuation around the mean in any axis.While the elephant is active (and upright), there is greater fluctuation around the mean on every axis acceleration related to lateral recumbence.For each of the 40 sequences of total acceleration data, we calculated the SD of the original file (10 Hz), and then down-sampled the file to 5, 2.5, 1, 0.5, 0.2, 0.1, 0.05, and 0.025 Hz.To down-sample from 10 to 5 Hz, every other line was selected, and so on for each sample rate.Dynamic acceleration was again calculated for each of these decimated files.In this way, the relationship between sample rate and deviations from actual dynamic acceleration could be observed.
To measure the effect of analysis window length on dynamic acceleration, we obtained thirty-four 5 min acceleration streams and obtained the overall body dynamic acceleration using 2 different analysis window lengths.In the first analysis, the window length was 10 s, such that the SD was calculated across 10 s sequences for the 5 min data stream.Then the grand mean was calculated for each axis, and the means for each axis summed for ODBA.In the second analysis, the window length was 5 min (the length of each acceleration stream), so that the SD was calculated for the 5 min stream as a whole, and the axes summed for ODBA.In this way, ODBA could be compared using a relatively short (10 s) and relatively long (5 min) analysis window length.
Rules for determining elephant recumbence are threshold-based, such that an elephant is either upright or recumbent.Therefore, 2 types of error are possible.False negatives occur when a bout of recumbence is missed.This error is dependent solely on the length of the analysis window (5 min for data in this paper), such that bouts of recumbence shorter than the analysis window may be missed, but bouts of recumbence longer than the window will be captured.Here, we focus on false positives, which occur when an upright posture is mistaken for recumbence.
False positives are most likely to occur when high acceleration values are combined with low sample rates.To understand why, consider the following example.If an elephant is upright, the central tendency of the z-axis (heave) will be −1, reflecting the force of gravity.In high activity behaviors, however, the fluctuations around the mean of −1 could be quite large.Sampling error could result in selection of extreme values that satisfy the recumbence rule for the z-axis (z > −0.75), resulting in an instance of false recumbence.To examine this phenomenon, we obtained two 5 min bouts of high activity behavior (2 bouts of rapid walking) from 2 Samburu-Laikipia elephants, and calculated the mean for the x-(sway) and z-(heave) axes.Then, we down-sampled each file to a new sample rate (1, 0.5, 0.1, 0.05, 0.025, and 0.016 Hz).Data streams were down-sampled from a 10 to a 1 Hz sample rate by selecting every 10 th value, and so on for each sample rate.For each sample rate, the mean of the 5 min file was calculated 10 times by randomly choosing starting points in the sequence.In this way, we determined what sample rates yield false recumbence due to sampling error.

Automated routines for 24 h sequences of accelerometer data
In addition to simultaneous collection of behavioral and accelerometer data used for validation, we also recorded full 24 h sequences of accelerometer data (without simultaneous video collection) from all 6 elephants.We recorded 34 full days from the 6 females (Disney: 7, 6, and 6 d; Samburu-Laikipia: 8, 4, and 3 d).To automate analysis of the 24 h accelerometer streams, we developed simple computer programs (QBASIC; available upon request) that separated dynamic and static acceleration from total acceleration, and computed 5 min summaries across the 24 h time period.
To compute dynamic acceleration, the sample SD of the total acceleration was obtained in sequential 10 s windows for each axis.The 10 s window was chosen based on preliminary observations of paired accelerometer data and behavior, which showed that the 10 s window matched results from the line interpolation and subtraction method.Every 5 min, the mean of the 10 s SD was calculated, and the 3 axes were summed to determine ODBA for that 5 min period.
To compute static acceleration (body orientation), the mean of the total acceleration was obtained in sequential 60 s windows for the x-(sway) and z-(heave) axes.A 60 s window was chosen (rather than a 10 s window as for dynamic acceleration) because short bouts of recumbence were considered unlikely.Every 5 min, the grand mean of the 60 s means was calculated.Elephants were considered recumbent if the grand mean for the 5 min period satisfied the previously validated rule (IF |x | > 0.5 OR z > −0.75, THEN recumbent).

Activity level (dynamic acceleration)
The sample SD of the total acceleration is a simple and accurate method for computing dynamic acceler-ation.Fig. 3 shows that the simple SD method yields results nearly identical to those of the more complex line interpolation and subtraction method (see 'Materials and methods'), both in terms of overall correlation and absolute values.However, for most behaviors the SD method yielded slightly higher values than the interpolation and subtraction method.Fig. 4 shows the range of ODBA values for 4 behavioral states (resting, feeding, bathing, walking).Based on these data, ODBA values can be divided into the following categories: minimal activity (e.g.resting): 0 to 0.05 g; low activity (e.g.feeding): 0.05 to 0.15 g; and medium activity (e.g.bathing, walking): 0.15 to 0.3 g.
More energetic behaviors were rare.However, we were able to validate 2 bouts of rapid walking in Samburu-Laikipia elephants.The first resulted in ODBA values of 1.1 g, about 4 times the value of normal walking most commonly observed (Fig. 4); the second bout resulted in ODBA values of 2.8 g, over 10 times the value of typical walking.Thus, we added a final category: high activity (e.g.rapid walking): > 0.3 g.

Recumbence (static acceleration)
The mean of the total acceleration can be used to obtain static acceleration.Fig. 5 shows 11 bouts of recumbence documented with video and measured using both recumbence rules (the x-axis rule and the z-axis rule; see 'Materials and methods').Both recumbence rules yielded nearly identical re sults to the visual observation.The average difference between the x-axis rule and visual observation was 4.2% (range: 0 to 9.5%), and the average difference between the z-axis rule and visual observation was 4.1% (range: 0 to 9.5%).

Activity level (dynamic acceleration)
Low sample rates increase error in dynamic acceleration measurement.Fig. 6 shows that the spread of dynamic acceleration values increases with decreasing sample rate due to sampling error.For low activity levels, middle range sample rates (e.g. 1 to 0.5 Hz) produce dynamic acceleration values similar to the original 10 Hz sample rate values.For medium activity levels, the same is true for the z-axis, but the x-axis starts to deviate from the 10 Hz sample rate at 1 Hz.In the extremes (<0.1 Hz), however, spreads deviate greatly from the original values for both axes at both acceleration levels, indicating the potential for erroneous measurement of dynamic acceleration at very low sample rates.Analysis window lengths of 10 s and 5 min yielded similar ODBA values (Fig. 7), indicating that window lengths up to 5 min can be accurate.However, deviations were more common as ODBA increased.

Recumbence (static acceleration)
False recumbence can occur when high acceleration values are combined with low sample rates (see 'Materials and methods').For common behaviors (resting, feeding, bathing, walking), acceleration values are almost always too low to reach the thresholds for recumbence (|x| > 0.5 g, and z > −0.75 g).For the highest acceleration behavior, walking (n = 9 bouts; Fig. 3), absolute maximums of the total acceleration streams on the x-axis (sway) never exceeded 0.5 g, and maxi mums of the total acceleration streams on the zaxis only ex ceeded −0.75 g in 0.2% of cases.Therefore, only very high-acceleration behaviors are likely to result in false positives.
Fig. 8 shows that very low sample rates result in false detection of re cumbence for very high acceleration behaviors (rapid walking).For the x-axis, false recumbence does not oc cur until very low sample rates (0.016 Hz) for the first instance of rapid walking, but for the second, more intense instance, false recumbence began at sample rates of 0.1 Hz.For the z-axis, false recumbence was more common, with false positives be ginning at 0.1 Hz for the first instance of rapid walking, and at 1 Hz for the se cond instance.

Activity level and recumbence of elephants over 24 h time periods
We used an automated routine to analyze 24 h sequences of behavior in terms of dynamic and static acceleration.Fig. 9 shows the daily activity level for 1 Disney and 1 Samburu-Laikipia elephant; Table 1 shows summary data for 34 d of data across all 6 elephants.To use recumbence as a proxy for sleep, only values associated with minimal to no activity (ODBA < 0.05 g), were considered 'restful recumbence' in Table 1.There were only a few instances of very high dynamic acceleration values associated with re cumbence (1

Methods for measuring dynamic and static acceleration
Our results show that for adult female African elephants, the sample SD of the total acceleration can be used as a measure of dynamic acceleration (ac tivity level), and that the mean of the total acceleration can be used as a measure of static acceleration (body orientation).The results apply when accel ero meters are placed in collars on top of the elephant's neck, an attachment technique that has proved successful in both wild and zoo African elephants (see 'Introduction').While these methods may also be valid in male African elephants, nonadult African elephants, and Asian elephants, these findings may not extend to other large terrestrial mammals, and so independent validations should be made for nonelephant species.The value of these simple methods is twofold.First, results can be directly comparable across research groups whether or not they use the SD method or the line interpolation and subtraction method.Second, the simple algorithms are computationally inexpensive, and thus will be more useful than complex methods for many applications, such as real-time, on-board analysis of data from elephant collars.

Data reduction: dynamic acceleration
In many applications, battery life is a constraining factor when data is wirelessly transferred from collars over the long term (Wall et al. 2014).Therefore, it may be necessary to limit the amount of accelerometer data that is analyzed and/or transmitted from elephant collars.However, there is a trade-off between data reduction and accuracy.For dynamic acceleration, our simulations showed that large de viations from actual values only oc curred at very low sample rates (usually < 0.5 Hz; Fig. 6).Our simulation also showed that analysis window lengths of 10 s and 5 min yielded similar results (Fig. 7), but that error was more likely with higher ODBA values when using the 5 min window.These results suggest that a sample rate of 1 Hz or higher and an analysis window length of no longer than 5 min should be sufficient to measure dynamic acceleration in adult female African elephants.
The most common measure of dynamic acceleration is ODBA, which includes accelerations from all 3 axes in its computation (Qasem et al. 2012).However, one could reduce the number of axes measured as a proxy for ODBA (see Gleiss et al. 2010).For example, the x-axis (sway) contri buted 38.46% to ODBA, on average, based on the summary data from the 6 African elephants studied in this report (Table 1).Thus, ODBA could be estimated by multiplying the x-axis dynamic acceleration value by the appropriate factor (2.60).However, to calculate ODBA for the most accurate comparison to other studies, data would need to be collected from all 3 axes.

Data reduction: static acceleration
When measuring recumbence, false negatives (missing recumbence) are a function of the analysis window length, such that bouts of recumbence substantially shorter than the analysis window will be  missed.In our data, we used a 60 s analysis window, and then averaged the 60 s windows every 5 min, for an effective analysis window of 5 min.The data show that bouts of restful recumbence at night (presumed sleeping) were never shorter than 10 min (Table 1).Therefore, analysis windows of 5 to 10 min should be sufficient to avoid false negatives for bouts of restful recumbence, but may miss short bouts of non-restful recumbence such as mud-wallowing.When measuring recumbence, false positives (mistaken recumbence) occur when low sample rates are combined with high dynamic acceleration values (see 'Materials and methods').Most behaviors (resting, feeding, bathing, walking) did not exhibit high enough dynamic acceleration values to produce false recumbence.Even in very high acceleration behaviors (rapid walking), false positives did not occur in the x-axis (sway) until sample rates were < 0.5 Hz.Our simulations showed that the z-axis (heave) was more susceptible to false recumbence.These considerations suggest that a 1 Hz sample rate (or higher) on the x-axis axis would be sufficient for measuring recumbence in African elephants.
Most accelerometer-based studies on elephants have used comparatively high sample rates, so these interpretations cannot be corroborated by most other research.However, Holdgate (2016) used a 60 s interval (0.016 Hz sample rate) to measure recumbence in African and Asian elephants.In that study, the accelerometers were placed in anklets and re cumbence was analyzed using the heave axis.Even with the low sample rate, the method was successfully validated by comparing the accelerometer-based algorithm to visual observation of recumbence.However, our simulations showed that the same sample rate can result in false positives during rapid walking (Fig. 7).These instances of rapid walking resulted in very high dynamic acceleration values.The second instance of rapid walking, for example, exhibited absolute values as high as ± 4.0 g in the total acceleration data stream.These high-acceleration behaviors were also exceedingly rare (observed only twice, in Samburu-Laikipia elephants).Thus, the 0.016 Hz sample rate used in Holdgate ( 2016) is probably sufficient for a wide range of elephant behaviors, but could result in rare instances of false recumbence when elephants are engaged in behaviors that produce very high g-force accelerations.

Measuring specific behavioral states
The simple algorithms used in these analyses are sufficient for measuring dynamic and static acceler-ation, but they will not by themselves differentiate a wide variety of specific behaviors.For example, in our previous study (Soltis et al. 2012) we were able to differentiate feeding, bathing, walking, and swaying behaviors from each other with an average accuracy of 88%.To accomplish that level of accuracy, however, we used measures of periodicity in addition to traditional measures of dynamic acceleration.Fourier transformations were used to measure periodicity of the total acceleration data streams and helped separate behaviors with regular, periodic movement (walking and swaying) from behaviors that lacked such periodicity (bathing and feeding).Dynamic ac celeration helped separate lower from higher acceleration behaviors.So far, we are not aware of a simple proxy for measuring periodicity that does not involve Fourier transformations.In addition, we differentiated behaviors that are relatively long-lasting: Resting, feeding, bathing, and walking are behaviors that occur in long bouts that can be described as behavioral 'states.'Other behaviors that are short-lived, such as charging, headup stances, and head-shaking, would have to be analyzed for signature acceleration patterns on much shorter time scales.Further research along these lines may prove fruitful for remotely monitoring very specific behaviors of elephants with accelerometers.

Elephant activity budgets and sleep
The activity budgets and restful recumbence bouts for wild and zoo elephants presented in Table 1 may be used to generate hypotheses for future testing.For example, both wild and zoo elephants spent the majority of their time (75 and 65%, respectively) engaged in low acceleration behaviors (such as those generated by feeding from the ground).It is known that wild elephants avoid energetically expensive behaviors, such as costly mountaineering (Wall et al. 2006).Furthermore, energetically expensive behavior such as long-distance walking is often associated with scarce and widely scattered resources such as water (reviewed in Leighty et al. 2009).Nevertheless, Samburu elephants experienced higher average acceleration (0.12 g) compared to zoo elephants (0.09 g; Table 1), perhaps due to differences in distance travelled to acquire resources.Accelerometers in collars could be used in the future for studying elephant energetics that could expand on our results, which were limited to 6 adult female African elephants.
Table 1 also provides descriptive statistics on elephant restful recumbence, which may be used as a proxy for sleep.Our data show that lying down was associated with minimal movement (Fig. 9), suggesting that this proxy may be valid, but further work would be required to definitively illustrate how restful recumbence equates to physiological sleep.Our data also show that Samburu-Laikipia elephants spent an average of about 2 h night −1 in restful recumbence, and that zoo elephants spent about 3 h night −1 , perhaps because zoo elephants require less vigilance due to the lack of interspecific conflict, for example with humans or lions.The amount of recumbence observed in this study (2.5 h on average), conforms to other studies.For example, Holdgate et al. ( 2016) investigated 72 adult female African elephants across 40 North American zoos, and found an average of 2.1 h of recumbence per night.For wild African elephants, Wyatt & Eltringham (1974) showed that adult female elephants (n = 4) were recumbent for 1 to 2 h night −1 .Accelerometers may be used to further study variation in African elephant sleeping behavior (e.g.seasonality, zoo vs. wild).Additionally, unusually long recumbence bouts could be triggers for electronic alarms that warn authorities of possible mortality.

Fig. 1 .
Fig. 1.Accelerometer orientation on African elephants Loxodonta africana.Left panel: adult female elephant in Samburu National Reserve, Kenya, wearing a collar with the accelerometer housing positioned on top of the neck (black arrow); right panel: orientation of the 3 axes in the accelerometer

4
Fig. 2. Total acceleration data for an African elephant Loxodonta africana at Samburu-Laikipia during anesthesia and recovery, showing the x-(sway), y-(surge), and z-(heave)axes.Static acceleration: while recumbent, the accelerometer is tilted on its side and the mean of the z-axis tends towards 0 while the mean of the x-axis tends towards −1 (reflecting the force of gravity).While upright, the means of the x-and z-axes reverse direction (see Fig.1).Dynamic acceleration: while the elephant is still (and recumbent), there is little fluctuation around the mean in any axis.While the elephant is active (and upright), there is greater fluctuation around the mean on every axis

Fig. 3 .Fig. 4 .
Fig. 3. Overall dynamic body acceleration (ODBA) of African elephants Loxo donta africana measured by line interpolation and subtraction (line) method and by the standard deviation (SD) method.Data were obtained from nine 20 s bouts for each behavior.Solid lines: expected relationship if the 2 methods yield identical results; dashed lines: observed relationship (linear regression) between the 2 methods (SPSS v.18, www.spss.com.hk/ statistics/)

Fig. 5 .Fig. 6 .
Fig. 5. Length of recumbence bouts measured by visual observation of African elephants Loxodonta africana from video and from an automated recumbence rule for the x-(sway) and z-(heave) axes (see 'Materials and methods').The first (shortest) bout is from an anesthetized wild Samburu-Laikipia elephant; the remaining bouts are from zoohoused Disney elephants

Fig. 7 .Fig. 8 .
Fig. 7. Effect of analysis window length on the measurement of dynamic acceleration in African elephants Loxodonta africana.For thirty-four 5 min acceleration streams, overall dynamic body acceleration (ODBA) was calculated using a 10 s and a 5 min analysis window.Solid line: expected relationship if the 2 methods yield identical results; dashed line: observed relationship (linear regression) between the 2 methods (SPSS v.18)

Fig. 9 .
Fig. 9. Overall dynamic body acceleration (ODBA) and bouts of recumbence in an African elephant Loxodonta africana from (a) Samburu-Laikipia and (b) Disney across a 24 h period, as calculated by an automated routine (see 'Materials and methods').Dashed lines: activity levels as defined in Fig. 4

Table 1 .
Descriptive statistics (mean ± SD) for restful recumbence and activity levels in adult female African elephants Loxodonta africana across 24 h periods.ODBA: overall dynamic body acceleration; Disney: elephants from Disney's Animal Kingdom, Florida, USA; Samburu: elephants from the Samburu-Laikipia region, Kenya