# Polarized skylight-based heading measurements: a bio-inspired approach

Julien Dupeyroux, Stéphane Viollet, Julien Serres

<figure><img src="image_1.png" /></figure>

## ► To cite this version:

Julien Dupeyroux, Stéphane Viollet, Julien Serres. Polarized skylight-based heading measurements: a bio-inspired approach. Journal of the Royal Society Interface, 2019, 16 (150), pp.20180878. hal-01990800

HAL Id: hal-01990800

https://amu.hal.science/hal-01990800

Submitted on 23 Jan 2019

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Polarized skylight-based heading measurements: a bio-inspired approach

Julien Dupeyroux · Stéphane Viollet · Julien R. Serres

**Abstract** Many insects such as desert ants, crickets, locusts, dung beetles, bees and monarch butterflies have been found to extract their navigation cues from the regular pattern of the linearly polarized skylight. These species are equipped with ommatidia in the dorsal rim area of their compound eyes, which are sensitive to the angle of polarization of the skylight. In polarization-based robotic vision, most of the sensors used so far comprise high-definition CCD or CMOS cameras topped with linear polarizers. Here we present a 2-pixel polarization-sensitive visual sensor, which was strongly inspired by the dorsal rim area of desert ants' compound eyes, designed to determine the direction of polarization of the skylight. The spectral sensitivity of this minimalistic sensor, which requires no lenses, is in the ultraviolet range. Five different methods of computing the direction of polarization were implemented and tested here. Our own methods, the *Extended* and *AntBot* method, outperformed the other three, giving a mean angular error of only $0.62^\circ \pm 0.40^\circ$ (median: $0.24^\circ$) and $0.69^\circ \pm 0.52^\circ$ (median: $0.39^\circ$), respectively (*mean* $\pm$ *standard deviation*). The results obtained in outdoor field studies show that our celestial compass gives excellent results at a very low computational cost, which makes it highly suitable for autonomous outdoor navigation purposes.

**Keywords** Atmospheric optics · Astronomical instrumentation · Polarization vision · Non-conventional vision · Bio-inspiration

## 1 Introduction

Autonomous long-range navigation is a crucial aspect of developing the world's future vehicles. As many as 5.000 container ships cross the seas every year, more than one billion vehicles are circulating around the world, and it has been estimated that approximately 5.000 aircraft are in the air at any given time. To ensure the safety of all these systems of transportation, precise and reliable methods of localization are urgently required. The latest approaches used to locate the position of any transport vehicle on Earth are based on the use of global navigation satellite systems (GNSS), inertial measurement units (IMUs), visual-based sensors (cameras, optic flow sensors, lidar), and dead reckoning and astronavigation methods. However, the accuracy of these solutions is often sensitive to many disturbances such as electromagnetic interferences, GNSS signal failure, and long-term drift, as well as signal failure due to the presence of neighbouring infrastructures (buildings, trees, etc.). The accuracy of the civilian GPS ranges from 5 m to 30 m during normal operations (SPS Performance Standard metrics, 2017), as reported on the official U.S. website dedicated to the GPS<fnref n="1" /> [1]. Developing a highly precise, robust, and reliable system of localization is currently the key to achieving autonomous systems of navigation by implementing it on fully autonomous cars, aircraft, and container ships. In order to develop more

<footnote>J. Dupeyroux
E-mail: julien.serres@univ-amu.fr</footnote>

<footnote>S. Viollet
E-mail: stephane.viollet@univ-amu.fr</footnote>

<footnote>J. R. Serres
E-mail: julien.serres@univ-amu.fr</footnote>

<footnote n="1">¹ https://www.gps.gov/systems/gps/performance/</footnote>
efficient methods of localization, it was therefore proposed to look at the strategies used by desert ants such as *Cataglyphis fortis* or *Melophorus bagoti*, which perform navigation tasks with great efficiency using visual cues [2,3]. Since they cannot use pheromone trails to find their way back to their nest, these insects rely on other cues. The proprioceptive information delivered by the stride integrator [4,5] contributes to step counting odometry. Visual cues such as the optic flow [6] are also used for odometric purposes, but far less than the step counter which plays a major role in distance estimation [6,4,5]. Lastly, the direction of polarized light [7] provides the insects' with heading information. These navigation cues are then processed by the desert ants' so-called path integrator (PI) [2,8] and used to perform homing tasks.

Directional cues are decisive for navigation, as cumulative errors due to misleading estimates of the heading will inevitably cause localization failures. Why and how do insects [9–12] rely on the skylight’s pattern of polarization? According to the Rayleigh sky model, the scattering interactions between light and atmospheric constituents cause a partially linear polarization of the skylight [13]. The pattern of polarization is symmetric and regular relative to the suns position in the sky [14] (Figure 1). The angle of polarization (AoP) is consistently perpendicular to the solar and anti-solar meridians. During the daytime, the sun moves in the sky at an average speed of 15° per hour (this value fluctuates greatly during the day), and so does the pattern of polarization, which also depends on the viewer’s location on Earth and the date of observation. However, the symmetry persists during the daytime. These properties make the celestial pattern of polarization reliable enough for foraging insects to use as a means of navigation.

The dorsal rim area (DRA) of the insects' compound eye is composed of polarization sensitive ommatidia [18,19]. Each ommatidium consists of two blocks comprising a large number of microvilli set in parallel within the rhabdomeres, so that the photon absorption reaches a maximum when the AoP of the light is oriented in the same direction as the microvilli. The directions of the microvilli in the two blocks are orthogonal [20,9]. The field of view (FoV) of each DRA (left and right) in the compound eye was projected onto the sky dome in the case of *Cataglyphis fortis* desert ants, as shown in Fig. 1 [16]. The spectral sensitivity of the ommatidia in the DRA varies among insects: desert ants (*Cataglyphis*), bees (*Apis*), dung beetles [21] and fruit flies (*Drosophila*), are sensitive to ultraviolet (UV) polarized light [18], whereas crickets maximum spectral sensitivity is in the blue range

(433 nm) [22]. The UV-predominance in desert ants *Cataglyphis* (maximum at 350 nm [20] with a cut-off at 420 nm [9]) may be attributable to the fact that the highest degree of polarization (DoP) is reached under clouds and canopies in this spectral range than in any other range [23], but this point is still a matter of debate. The neural processing involved in this system of navigation has been mostly investigated in locusts [24–27] and crickets [10,11,26], as well as in desert ants [9,28], bees [29], diurnal dung beetles [30–34] and monarch butterflies [35–37,26]. A polarization-based visual pathway running from the DRA to the central complex (CX) has been found to exist in the latter insects' brains [24,38–40]. This pathway can be split into three distinct stages [40–42,27]. The polarized skylight from the sky dome is first tapped by ommatidia in the DRA of the compound eye, where all the possible preferred AoPs can be identified. As observed in crickets [10] and locusts [43,40], the information is then sent to the optic lobe, in particular to the DRA of the lamina and the medulla. In the cricket, the polarization-sensitive neurons (POL-neurons) show

<figure><img src="image_3.png" /><figcaption>**Fig. 1** The linear pattern of polarization of the skylight relative to the sun (S) and an observer (O). The orientation of the black bars gives the angle of polarization (AoP) of the skylight, and their thickness give the degree of linear polarization (DoLP). Typical DoLP values are given in the diagram. The DoLP is minimal around the sun (*DoLP*<sub>MIN</sub> ≈ 0.01) and reaches a maximum along the red curve at 90° from the sun (*DoLP*<sub>MAX</sub> ≈ 0.75 under normal atmospheric conditions) [13,15]. The AoP is perpendicular to the solar (*sm*, blue) and anti-solar (*asm*, red) meridians. Point Z corresponds to the zenith and marks the limit between the solar and anti-solar meridians. The field of view (FoV) of the left and right DRAs of desert ants *Cataglyphis bicolor* projected onto the sky dome, as well as our celestial compass' FoV. Adapted from [16,17]</figcaption></figure>
strong synaptic responses to three specific orientations (10°, 60° and 130°), but no further direct physiological descriptions of these neurons in other insects' optic lobe are available so far [26]. Lastly, the AoP is determined in the CX, where the POL-neurons in the protocerebral bridge show synaptic responses to all the AoPs in the [0°; 180°] angular range [25,41]. Recent investigations on the *Drosophila* CX have suggested that the heading direction is determined by a class of recurrent networks called the ring attractors [44]. Each of the neurons is tuned to a particular angular direction based on visual panoramic cues and as well as motion angular cues. A population of these neurons therefore encodes the insect's heading. Considering the remarkable levels of anatomical conservation of the neurons in the CX between all insects studied so far, the ring attractors found in *Drosophila* presumably exist in most insects.

The robotic applications of bio-inspired celestial navigation are described in Section 2, and the various existing implementations of insect-inspired celestial compasses are reviewed in Section 3. The main aim of this paper is to present two new celestial-based algorithms for determining the heading of a mobile system under outdoor conditions. Studies on the crickets' brain have resulted in the development of a DRA-based model for estimating the AoP, involving the log-ratio between the outputs from the two blocks composing each ommatidium [10]. This model is highly simplified and may in fact not be valid, in view of the latest findings on the ring attractor in *Drosophila* [44], for instance. However, the present approach provides a starting point for the design and use of bio-inspired methods of outdoor navigation. We therefore developed a 2-pixel UV-sensitive polarized light sensor inspired by the ommatidia of the insects' DRA for measuring the AoP of the skylight, as described in Section 4. The AoP computational methods based on these biological models are presented in Section 5. The performances of these methods are compared in Section 6 with those of other methods previously presented in the literature and discussed in Section 7.

## 2 Skylight-based navigation in the field of robotics

The first robotic implementation of the insects' celestial compass was performed on-board the Sahabot robot [45,64], a six-wheeled ant-inspired rover capable of autonomous navigation and inspired by studies on crickets. The celestial compass consisted in that case of three polarization units (POL-units) set at orientations equal to 0°, 60°, and 120°, mimicking the angular selectivity of the POL-neurons in the optic lobe

in crickets [10]. Like the ommatidia in the DRA, each POL-unit was composed of two POL-sensors, the angular sensitivity of which was set orthogonally. The AoP was calculated on the basis of the simultaneous model described by Lambrinos et al., giving a mean error of 0.66° [45].

A decade ago, Chu *et al.* [46] developed a smaller version of Sahabot's celestial compass consisting of 3 POL-units with an angular shift of 60° between them. The results of the tests performed showed that the precision of this compass was subject to a mean error of ±0.2° in a controlled environment [46].

A novel real time celestial compass was then developed, including two replicas of this compass and a 3-axis magnetometer [48]. Lastly, a miniaturized celestial compass made of nano wire grids and composed of 3 POL-units was developed, reducing the mean error after a calibration process to only ±0.1° after a polynomial fitting correction in a controlled environment [52].

Many other implementations [47,65,58] have been presented but those mentioned above were the only ones which were based on the insects' DRA. These advanced technological devices proved to be highly efficient when integrated on-board mobile ground robots [45,64,46,48,52] performing outdoor localization tasks. However, they focused only on the second and third neural stages of the polarization processing in the insects' brain [24].

## 3 Insect-inspired compasses

As a complement to these bio-inspired polarization sensors, some authors have used high-definition CCD and CMOS cameras operating in the visible range (Table 2). Carey and Stürzl [54] used a near-UV CCD camera (wavelength within the [300 nm; 420 nm] range, reaching a maximum at 380 nm) and a convex mirror aligned vertically to reconstruct the pattern of polarization of the skylight. Although these authors approach was inspired by the insects' visual system, the pattern of polarization was analysed using Stokes-Mueller theory [66,67]. Wang et al. [56] used three CCD cameras (1.2 megapixels each) topped with blue filters and linear sheet polarizers (orientations: 0°, 45° and 90°). To be compatible with real-time processing, pictures were cut and down-sampled (with final resolution of 108 pixels). A calibration process resulted in good performances in comparison with GNSS measurements (giving an error to within 0.3°). The same procedure was implemented in [57], apart from one major difference: the latter author used only a single CCD monochrome camera (29 megapixels) but topped with either a 3-part polarizer (orientations: 0°, 60° and
<table><caption>**Table 1** Non-exhaustive classification of celestial compasses. As far as the authors know, the celestial compass introduced in this paper is the first implementation of a minimalistic insect-inspired celestial compass with spectral sensitivity in the UV range.</caption><thead><tr><th>Authors</th><th>Year</th><th>Ref.</th><th>Technological solution</th><th>Insect-inspired</th><th>UV-sensitive</th><th>Minimalistic</th></tr></thead><tbody><tr><td>Lambrinos et al.</td><td>1997</td><td>[45]</td><td></td><td>✓</td><td>✗</td><td>✓</td></tr><tr><td>Chu et al.</td><td>2008</td><td>[46]</td><td></td><td>✓</td><td>✗</td><td>✓</td></tr><tr><td>Chahl and Mizutani</td><td>2012</td><td>[47]</td><td>Photodiodes</td><td>✓</td><td>✗</td><td>✓</td></tr><tr><td>Wang et al.</td><td>2015</td><td>[48]</td><td></td><td>✗</td><td>✓</td><td>✗</td></tr><tr><td>Zhi et al.</td><td>2018</td><td>[49]</td><td></td><td>✗</td><td>✗</td><td>✓</td></tr><tr><td>Dupeyroux et al.</td><td>2017</td><td>[50]</td><td></td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>Sarkar et al.</td><td>2010</td><td>[51]</td><td></td><td>✗</td><td>✗</td><td>✗</td></tr><tr><td>Chu et al.</td><td>2014</td><td>[52]</td><td>Integrated polarization sensor</td><td>✓</td><td>✗</td><td>✓</td></tr><tr><td>Garcia et al.</td><td>2017</td><td>[53]</td><td></td><td>Crustacean</td><td>✗</td><td>✗</td></tr><tr><td>Carey and Strzl</td><td>2011</td><td>[54]</td><td></td><td>✓</td><td>✓</td><td>✗</td></tr><tr><td>Sarkar et al.</td><td>2013</td><td>[55]</td><td></td><td>✓</td><td>✗</td><td>✗</td></tr><tr><td>Wang et al.</td><td>2014</td><td>[56]</td><td></td><td>✓</td><td>✗</td><td>✗</td></tr><tr><td>Zhang et al.</td><td>2015</td><td>[57]</td><td></td><td>✓</td><td>✓</td><td>✗</td></tr><tr><td>Fan et al.</td><td>2016</td><td>[58]</td><td>Camera-based</td><td>✗</td><td>✗</td><td>✗</td></tr><tr><td>Zhang et al.</td><td>2016</td><td>[59]</td><td></td><td>✗</td><td>✓</td><td>✗</td></tr><tr><td>Wang et al.</td><td>2017</td><td>[60]</td><td></td><td>✗</td><td>✗</td><td>✗</td></tr><tr><td>Han et al.</td><td>2017</td><td>[61]</td><td></td><td>✗</td><td>✗</td><td>✗</td></tr><tr><td>Fan et al.</td><td>2018</td><td>[62]</td><td></td><td>✗</td><td>✗</td><td>✗</td></tr><tr><td>Momeni and Titus</td><td>2006</td><td>[63]</td><td>VLSI</td><td>✗</td><td>✗</td><td>✗</td></tr></tbody></table>

120°) or a 4-part polarizer (orientations: 0°, 45°, 90° and 135°). The authors of further studies made use of a radial polarizer [59]. Fan et al. [58,62] recently designed a 4 CCD camera-based celestial compass (where each camera corresponded to 0.8 megapixels) with orientations set at 0°, 45°, 90° and 135°.

On the one hand, the bio-inspired minimalistic approaches reviewed here show what useful performances bio-inspired systems of this kind are capable of, but they still depend too heavily on optimal lighting conditions. On the other hand, the CCD camera-based celestial compasses certainly give good performances but they are based on heavy systems that cannot be embedded on-board small mobile robots and are highly demanding in terms of computational resources. This study focuses on the novel ant-inspired celestial compass we previously designed [68,50] with a view to embedding it on-board an ant-like robot. Preliminary results showed that this sensor was an efficient means of autonomous outdoor navigation. Based on raw data acquisitions performed from February to June 2017, five AoP computational methods were compared here in order to determine the most suitable approach to use on outdoor autonomous robots. The following five methods were therefore tested:

- the *Stokes-Mueller* formalism based on the Rayleigh model for the atmosphere [66] (Section 5.1);

- the *Sahabot* method implemented on-board a six-wheeled rover of the same name for navigation purposes [64], which was used again in a minaturized version [46,52] (Section 5.2);

- the *Matrix* method adapted from the *Sahabot* method (Section 5.3);

- the *Extended* method, which consists of N-dimensional generalizations of the *Sahabot* method (Section 5.4);

- the *AntBot* method, a neural-like approach mimicking the POL-neuron model [10], which has been used for navigation purposes on our hexapod robot *AntBot* (Section 5.5).

Among these five AoP methods, the last three were developed in this study. As we will see, both the *Extended* and the *AntBot* method yielded reliable and robust AoP estimations under a wide range of meteorological conditions.

# 4 Experimental set-up

## 4.1 The experimental context

The data were acquired under various weather conditions from February to June 2017 at any time of day between 9:00am and 5:00pm. The experiments were performed near our laboratory in Marseille, France (43°14′01.16″N, 5°26′39.2″E). The experimental setup is described in Figure 2. The benchmark on which the present study was based consisted in rotating the celestial compass by 10° from 0° to 170°. At each rotating step, a full acquisition of the polarized skylight was performed with our celestial compass. According to the ESA (European Space Agency) and the TEMIS (Tropospheric Emission Monitoring Internet Service) UV program, the UV-index ranged from 1 to 8 (the UV-index is always given under clear sky conditions)<fnref n="2" />.

<footnote n="2">² http://www.temis.nl/uvradiation/UVindex.html</footnote>
To compensate for the sun's course during the experiments, the ephemeris data corresponding to each experimental condition (day, time (UTC+2 time) and location) were used to correct the AoP estimates. Tests were performed under the following three sky conditions: clear (absolutely no clouds in the sky), changeable (clouds occurring randomly in the sky), and covered (sky entirely covered with clouds). The post-processing operations included the comparisons between the five AoP computational methods listed in Section 5.

<figure><img src="image_4.png" /><figcaption>Fig. 2 Experimental context. Photograph showing the environmental context of the experiments performed in this study. The celestial compass was embedded on-board our hexapod robot AntBot, which was placed on a turning table and rotated in 10° steps between 0° and 180°. The host computer was used only for monitoring purposes.</figcaption></figure>

## 4.2 The ant-inspired celestial compass

A novel ant-inspired 2-pixel scanning optical compass (Figure 3) was developed to make a hexapod robot keep its heading while walking [68,50]. This polarization-sensitive sensor acquired its optical signals in the UV-range (from 270 nm to 375 nm). The celestial compass consisted of two UV-light sensors (Sg01D18, SgLux) topped with linear sheet polarizers (HNP'B replacement, Knight Optical). The polarizers were placed on two rotating gears primed by a smaller one connected to a stepper motor (AM0820-A-0.225-7, Faulhaber). The gear ratio was 7:1 and the angular resolution of the celestial compass could be set arbitrarily. For instance, the data used in this study had a mean angular resolution of 0.96° with an acquisition time of approximately 20 seconds. The sensor covers an angular FoV of the sky equal to 120° (e.g. ±60° with respect to the zenith). A comparison with the angular range

of the sky covered by the *Cataglyphis bicolor*'s DRA is made in Fig. 1 [16]. This angular FoV was adopted here in order to reduce the possible impact of visual occlusion by clouds or trees. The prototype was 3D-printed using polylactic acid (PLA). The 3D parts are available online<fnref n="3" />. The celestial compass was controlled by a Raspberry Pi 2 model B micro-computer using C++ software. There was no need for any calibration processes before performing the measurements.

# 5 Heading estimation methods

## 5.1 The Stokes-Mueller formalism

The first method tested here was based on the Stokes-Mueller formalism [66]. Let $E$ be the electric field vector of skylight propagation defined as an electric radiation in the transverse mode:

$$E(\mathbf{u}, t) = \begin{bmatrix} E_{0x} \cos(\omega t - \mathbf{k} \cdot \mathbf{u} + \delta_x) \\ E_{0y} \sin(\omega t - \mathbf{k} \cdot \mathbf{u} + \delta_y) \\ 0 \end{bmatrix} \quad (1)$$

where $E_{0x}$ and $E_{0y}$ are the amplitudes according to the $x$ and $y$ fields, respectively, $\omega$ is the pulsation, $\mathbf{k}$ is the wave vector, $\mathbf{u}$ is the position vector and $\delta_x$ and $\delta_y$ are the phase angles in the fields $x$ and $y$, respectively. The phase retarder $\delta$ is the difference between the phases of fields $x$ and $y$:

$$\delta = \delta_x - \delta_y \quad (2)$$

If the light is not polarized, then $\delta$ will not be constant. Otherwise, the light will be linearly polarized if $\delta = 0$, and elliptically polarized otherwise. The polarization is completely accounted for in the Stokes-Mueller formalism [66]. This framework gives four different parameters $S_0$ through $S_3$ that fully describe the polarization of the skylight. The Stokes parameters are defined based on equation 1 as follows:

$$\begin{bmatrix} S_0 \\ S_1 \\ S_2 \\ S_3 \end{bmatrix} = \begin{bmatrix} E_{0x}^2 + E_{0y}^2 \\ E_{0x}^2 - E_{0y}^2 \\ 2E_{0x}E_{0y} \cos(\delta) \\ 2E_{0x}E_{0y} \sin(\delta) \end{bmatrix} \quad (3)$$

The first Stokes parameter $S_0$ corresponds to the light intensity; $S_1$ quantifies the polarization of the skylight in the horizontal or vertical plane, and $S_2$ does so in the ±45° plane; the last parameter $S_3$ describes the circular polarization of the skylight. The Stokes parameters can be used to define the light intensity $I$ measured with a linear polarizer, the orientation of

<footnote n="3">³ https://github.com/JuSquare/AntBot/tree/master/CelestialCompass</footnote>
<figure><img src="image_5.png" /><figcaption>Fig. 3 The AntBot’s celestial compass. A Exploded computer-aided design (CAD) view of the celestial compass. (a) Fixation. Support used to hold the UV sheet polarizer. (b) UV linear sheet polarizer. (c) Rotating gears. (d) Stepper motor. (e) Ball bearings. (f) Main frame of the celestial compass. (g) UV-sensitive photodiodes. (h) Support for UV light sensors PCB. B Compact CAD view of the celestial compass. C Photograph of the celestial compass. The Hall-effect sensor was used to stop the gear after one full rotation of 360°. D Normalized raw (dashed lines) and filtered (thick lines) POL-units UV₀ (gray lines) and UV₁ (black lines) responses as a function of the angle of rotation of the gears. Data were acquired on April 2017 (clear sky, UV-index 6). E Corresponding raw (dashed line) and filtered (thick line) log-ratio functions used for the AoP computations (Eq. 24). The AoP measured here was equal to 115° mod 180°. See Section 5.5 for further details of the computation process.</figcaption></figure>

which is set at $\theta$ (in what follows, $\theta$ will be denoted $\psi_i$, the corresponding angular shift $\Delta\psi = 45°$), and a phase retarder will be introduced at angle $\varphi$ as described below:

$$I(\theta, \varphi) = \frac{1}{2} \left( S_0 + S_1 \cos(2\theta) + S_2 \sin(2\theta) \cos(\varphi) + S_3 \sin(2\theta) \cos(\varphi) \right) \quad (4)$$

The AoP $\psi$ within [0°; 90°] is then computed based on the values of the Stokes parameters $S_1$ and $S_2$:

$$\psi = \frac{1}{2} \arctan \left( \frac{S_2}{S_1} \right) \mod 90^{\circ} \quad (5)$$

where [66]:

$$\begin{cases} S_1 = I(0^{\circ}, 0^{\circ}) - I(90^{\circ}, 0^{\circ}) \\ S_2 = I(45^{\circ}, 0^{\circ}) - I(135^{\circ}, 0^{\circ}) \end{cases} \quad (6)$$

Given the definition of the arctangent function, the AoP is known to within [0°; 90°]. This mathematical limitation, which cannot be overcome without adding more sensors, would inevitably cause navigation failure. Figure 4A outlines how the inputs $I(\theta, \varphi)$ were obtained with our celestial compass.

## 5.2 The Sahabot method

The celestial compass embedded on-board Sahabot in the study by Lambrinos et al. [45,64] was composed of three POL-units, the orientation selectivity of which was set at 0°, 60° and 120° (Fig. 4B). Each POL-unit $i \in [1..3]$ consisted of two POL-sensors $UV_{0,i}$ and $UV_{1,i}$ defined as follows:

$$\begin{cases} UV_{0,i}(\psi) = \Gamma \cdot I \cdot (1 + d \cdot \cos(2(\psi + \psi_k))) \\ UV_{1,i}(\psi) = \Gamma \cdot I \cdot (1 - d \cdot \cos(2(\psi + \psi_k))) \end{cases} \quad (7)$$
<figure><img src="image_6.png" /><figcaption>Fig. 4 A Orientations of the rotating gears with the Stokes method (Δψ = 45°). B Orientations of the rotating gears with both the Sahabot and the Matrix methods (Δψ = 60°). C Orientations of the rotating gears with both the Extended and the AntBot methods were Δψ = 360°/N, N = 374.</figcaption></figure>

where *I* is the ambient light intensity, Γ is a gain constant, *ψ* is the AoP (*ψ* ∈ [0°; 180°] due to the symmetry of the celestial pattern of polarization), *d* is the DoP, and *k* denotes the POL-sensor, in which the polarizer is oriented along the angle *ψ*<sub>*k*</sub>. The two POL-sensors were shifted by 90° to mimic the orientation of the polarizers in the insect's photoreceptors. Based on the model presented by Labhart [10], three models were proposed in [45]. We consider here the simultaneous model, which brought the best navigation performance with Sahabot 1 [45] and was reused with Sahabot 2 [64]. Consequently, a log-ratio signal *P*<sub>*i*</sub> was added between the two POL-sensors in each POL-unit *i*:

$$ \forall i \in [1..3], \quad P_i = \log_{10} \left( \frac{UV_{0,i}(\psi)}{UV_{1,i}(\psi)} \right) \qquad (8) $$

which results in

$$ \forall i \in [1..3], \quad P_i = \log_{10} \left( \frac{1 + d \cdot \cos(2(\psi + \psi_i))}{1 - d \cdot \cos(2(\psi + \psi_i))} \right) \quad (9) $$

where $\psi_1 = 0°$, $\psi_2 = 60°$ and $\psi_3 = 120°$. To simplify the AoP calculations, we take the following two transforms:

$$ \forall i \in [1..3], \quad \tilde{P}_i = (1 + 10^{P_i})^{-1} \qquad (10) $$

and thus

$$ \forall i \in [1..3], \quad \tilde{P}_i = 1 - 2\tilde{P}_i \qquad (11) $$

We finally obtain:

$$ \forall i \in [1..3], \quad \tilde{P}_i = d \cdot \cos(2(\psi + \psi_i)) \qquad (12) $$

The AoP $\psi$ within [0°; 90°] was then computed based on POL-units 1 and 2 as follows:

$$ \psi = \begin{cases} \frac{1}{2} \arctan \left( \frac{2\tilde{P}_2 + \tilde{P}_1}{\sqrt{3}\tilde{P}_1} \right) & \text{if } \tilde{P}_1 \neq 0 \\ 45^\circ & \text{otherwise} \end{cases} \qquad (13) $$

Unfortunately, the ½ scale factor involved in the arctangent calculation reduces the range of $\psi$ from [0°; 180°] to [0°; 90°]. As far as we know, no further explanations for this mathematical issue as regards the AoP computations were given in the original paper [64].

## 5.3 The matrix method

In the case of the Sahabot 2 method, the AoP was computed based on POL-units 1 and 2. It was proposed to use the three POL-unit measurements to obtain a more accurate estimate of the AoP. The equation 12 can be rewritten with matrices:

$$ \tilde{P} = \begin{pmatrix} \tilde{P}_1 \\ \tilde{P}_2 \\ \tilde{P}_3 \end{pmatrix} = d \cdot C \cdot D \qquad (14) $$

where:

$$ C = \begin{pmatrix} 1 & 0 \\ -1/2 & \sqrt{3}/2 \\ -1/2 & -\sqrt{3}/2 \end{pmatrix}, \quad D = \begin{pmatrix} \cos(2\psi) \\ \sin(2\psi) \end{pmatrix} \qquad (15) $$

As the generalized inverse of matrix *C* exists, the problem can be reversed and we obtain the following new expression for the AoP modulo 90°:

$$ \psi = \begin{cases} \frac{1}{2} \arctan \left( \frac{\sqrt{3}(\tilde{P}_2 - \tilde{P}_3)}{2\tilde{P}_1 - \tilde{P}_2 - \tilde{P}_3} \right) & \text{if } \tilde{P}_1 \neq 0 \\ 45^\circ & \text{otherwise} \end{cases} \qquad (16) $$
## 5.4 The extended method

In this case, it is assumed that the celestial compass is composed of N POL-units with an overall angular resolution equal to $\Delta\psi$ (in Sahabot $\Delta\psi = 60^{\circ}$), so that $\forall i \in [1..N]$, $\Delta\psi = \psi_{i+1} - \psi_i = 360^{\circ}/N$ (Fig. 4C). Using the same equations as those used in the Sahabot's celestial compass, we have:

$$ \forall i \in [1..N], \tilde{P}_i = d \cdot \mu_i \cdot \cos(2\psi) + d \cdot v_i \cdot \sin(2\psi) \quad (17) $$

where $\mu_i = \cos(2\psi_i)$ and $v_i = \sin(2\psi_i)$. The problem can therefore be summarized with matrices as follows:

$$ \tilde{P} = \begin{pmatrix} \tilde{P}_1 \\ \tilde{P}_2 \\ \vdots \\ \tilde{P}_N \end{pmatrix} = d \cdot C \cdot D \quad (18) $$

where:

$$ C = \begin{pmatrix} \mu_1 & v_1 \\ \mu_2 & v_2 \\ \vdots & \vdots \\ \mu_N & v_N \end{pmatrix}, \quad D = \begin{pmatrix} \cos(2\psi) \\ \sin(2\psi) \end{pmatrix} \quad (19) $$

If the rank of matrix C is equal to 2 then the generalized inverse of C exists and the equation 18 can be reversed:

$$ D = (C^T \cdot C)^{-1} \cdot C^T \cdot \tilde{P} \quad (20) $$

We finally compute the value of $\psi$ within $[0^{\circ}; 90^{\circ}]$:

$$ \psi = \begin{cases} \frac{1}{2} \arctan \left( \frac{D[2]}{D[1]} \right) & \text{if } D[1] \neq 0 \\ 45^{\circ} & \text{otherwise} \end{cases} \quad (21) $$

## 5.5 The AntBot method

The last method is the one we implemented for performing navigation tasks with our AntBot robot (Fig. 2). With this AntBot method, the scanning process consists of a full rotation of the linear polarizers. The typical response of each POL-unit is a 180°-periodic sine wave (Figure 3D). Due to the orthogonal layout of the linear sheet polarizers, the two signals are produced with a 180° phase shift. Based on Labhart's suggestion as to how the POL-neurons in the crickets' optic lobe may be used to produce a polarization opponent neuron [10], we computed the log-ratio between the two POL-units' responses after a filtering and a normalization process (Figure 3E). In the CX of the locust's brain, the heading is known be obtained

from the slices of the protocerebral bridge and corresponds to the peak position of a sinusoidal distribution of activity across the population of neurons [25]. Although ring attractors may exist in most studied insects (for example in *Drosophila* [44]), we proposed to simply implement a mechanism similar to a winner-takes-all process to compute the AoP within $[0^{\circ}; 180^{\circ}]$. This biologically-inspired solution is a computationally optimal one.

The absorption signals of the polarized light of our celestial compass embedded on-board AntBot in all the orientations $i \in [1..N]$ of the linear sheet polarizers are given by (Fig. 4C):

$$ \left\{ \begin{aligned} UV_{0,i}(\psi) &= A_{0,i} + B_{0,i} \cos(2(\psi + \psi_i)) + \alpha_{0,i} \\ UV_{1,i}(\psi) &= A_{1,i} + B_{1,i} \cos(2(\psi + \psi_i + 90^{\circ})) + \alpha_{1,i} \end{aligned} \right. \quad (22) $$

where $UV_{0,i}$ is the left POL-sensors response depending on the orientation of the polarizer $\psi_i$, and $UV_{1,i}$ is the right POL-units response to the orientation of the polarizer $\psi_i + 90^{\circ}$. $A_{0,i}$ and $A_{1,i}$ are offset constants depending on both the ambient light intensity and the inner offset of the photodiodes. $B_{0,i}$ and $B_{1,i}$ are gain constants that depend on the DoP, the ambient light intensity and the inner gain of the photodiodes. $\alpha_0$ and $\alpha_1$ are noise distributions which are attributable to either the sensor or the meteorological unpredictability of the sky conditions.

Signals are low-pass filtered (restriction of the signal to its first harmonic, corresponding to a $\pi$-periodic sine wave) and normalized between $\epsilon/(2+\epsilon)$ and 1 before calculating $\psi$ [68,50]. The constant $\epsilon$ is set to prevent the occurrence of any logarithmic calculation failure ($\epsilon \ll 1$). The normalized and corrected signals are defined as follows:

$$ \left\{ \begin{aligned} UV_{0,i}^{nc}(\psi) &= \frac{1}{2+\epsilon} (1 + \cos(2(\psi + \psi_i)) + \epsilon) \\ UV_{1,i}^{nc}(\psi) &= \frac{1}{2+\epsilon} (1 + \cos(2(\psi + \psi_i + 90^{\circ})) + \epsilon) \end{aligned} \right. \quad (23) $$

We compute the log-ratio between the two POL-sensors:

$$ \forall i \in [1..N], P_i = \log_{10} \left( \frac{UV_{0,i}^{nc}(\psi)}{UV_{1,i}^{nc}(\psi)} \right) \quad (24) $$

We thus obtain:

$$ \forall i \in [1..N], P_i = \log_{10} \left( \frac{1 + \cos(2(\psi + \psi_i)) + \epsilon}{1 - \cos(2(\psi + \psi_i)) + \epsilon} \right) \quad (25) $$

Lastly, we compute the AoP within $[0^{\circ}; 180^{\circ}]$ by taking the maximum and minimum log-ratio responses similar to a winner-takes-all process to select the POL-neuron with the highest firing rate:

$$ \psi = \frac{1}{2}(\psi_1 + \psi_2 + \operatorname{sgn}(\psi_1 - \psi_2)) \cdot 90^{\circ} \quad (26) $$
where:

$$ \left\{ \begin{array}{ll} \psi_1 = \Delta\psi \cdot \arg\min_{i \in [1..N]} (P_i) & \mod 180^{\circ} \\ \psi_2 = \Delta\psi \cdot \arg\max_{i \in [1..N]} (P_i) & \mod 180^{\circ} \end{array} \right. \qquad (27) $$

$\Delta\psi$ is defined in Section 5.4 with $N$ equal to 374, resulting in $\Delta\psi \approx 0.96^{\circ}$. Due to the sun's course, the peak-to-peak amplitude of the signals increases in the morning and decreases in the afternoon. An angular interval where the log-ratio is less prominent will therefore always exist, as can be observed in Figure 3E within $[0^{\circ}; 180^{\circ}]$. The winner-takes-all process modelled in Eq. 27 therefore ensures that the most prominent values will be detected and thus reduces the probability of AoP computational errors.

With the *AntBot* method presented here, this celestial compass resembles more closely to Labhart's biological model for the POL-neurons [10]. Mathematically speaking, we observed that none of the other approaches give an AoP to within $[0^{\circ}; 180^{\circ}]$ due to the half arctangent function. As far as the authors know, no indications are available to explain how the ambiguity between $[0^{\circ}; 90^{\circ}]$ and $[90^{\circ}; 180^{\circ}]$ might be solved. However, the classical solution proposed for solving the solar ambiguity, namely to distinguish the AoP between the $[0^{\circ}; 180^{\circ}]$ and $[180^{\circ}; 360^{\circ}]$ angular intervals, consists in detecting the part of the sky where the sun is located. In the Sahabot project, 8 photodiodes were used to detect the sun's position side [64]. In AntBot, we intend to roll the celestial compass to the left and right in order to localize the sun with respect to AntBot's sagittal plane.

## 6 The experimental results

The AoP computed with each method is displayed in Figure 5 as a function of the expected orientation, depending on the meteorological conditions, and the statistical results are given in Table 2. To make fair comparisons between the 5 AoP methods tested, the 4 AoP computational methods in which half arctangent calculations were made (Sections 5.1 to 5.4) were corrected so that the results belonged to $[0^{\circ}; 180^{\circ}]$ instead of $[0^{\circ}; 90^{\circ}]$. Under clear sky conditions, all the methods tested gave good results, as the mean AoP matched the ground truth (Fig. 5A-Ei). The mean AoP error ranged between $0.69^{\circ}$ in the case of the *Extended* method to $3.09^{\circ}$ in that of the *Sahabot* method (Table 2). The *Extended* and *AntBot* methods gave practically the same mean AoP error with a low standard deviation (SD): $0.40^{\circ}$ and $0.52^{\circ}$, respectively. The other methods gave higher standard deviations, which were highest in the

case of the *Sahabot* method (SD: $1.43^{\circ}$). The poor performances of the *Sahabot* method in comparison with the other methods can be explained by the fact that the AoP was computed on the basis of only 2 measurements, while the *Extended* method involved the use of $N = 374$ measurements, and the *AntBot* method included a winner-takes-all process giving more precise AoP estimates.

Under changeable sky conditions, the AoP computations deteriorated greatly in the case of the *Stokes* (Fig. 5Aii), *Sahabot* (Fig. 5Bii) and *Matrix* (Fig. 5Cii) methods as the mean AoP error ranged between $23.50^{\circ}$ and $37.00^{\circ}$ with standard deviations greater than $10^{\circ}$ (Table 2). The AoP error obtained with the *AntBot* method (Fig. 5Eii) decreased to $9.55^{\circ} \pm 4.81^{\circ}$, while that obtained with the *Extended* method (Fig. 5Dii) was also low but the standard deviation was higher: $2.22^{\circ} \pm 1.63^{\circ}$. When the sky was entirely covered with clouds (Fig. 5A-Eiii), the mean error obtained with the *Extended* method was 7 times higher than under changeable sky conditions, while that obtained with the *AntBot* method increased two-fold (Table 2). Figure 6 gives box plots for all the AoP computational methods, depending on the meteorological conditions. This graph shows quite clearly that the performances of the *Extended* and *AntBot* methods were much more satisfactory than those obtained with the other three methods.

None of the results presented in this study obeyed normal distributions (Shapiro-Wilk normality tests, p-values < 0.05). Under clear sky conditions, the *Sahabot* method, as well as the *Matrix* method to a lesser extent, differed significantly from all other AoP computational methods tested (two-tailed Wilcoxon tests, p-values < 0.0125, Figs. 6, 7A). Under all three weather conditions, the angular error distributions between the *Extended* and the *AntBot* did not differ significantly (two-tailed Wilcoxon rank sum tests, p-values > 0.0125, Figs. 5D-E, 6, 7). The median angular errors were also computed: these are presented in Table 2. The statistical analysis showed that both the *Extended* and *AntBot* methods yielded accurate and robust AoP estimates under all three weather conditions. In particular, the median AoP error of the *AntBot* method was below the sensor's resolution (which is equal to $0.96^{\circ}$), as it amounted to $0.39^{\circ}$ under clear sky, $0.02^{\circ}$ under changeable sky, and only $0.59^{\circ}$ in the case of overcast weather. This finding strongly suggests that a filter based on the median rather than the mean values would ensure good heading estimates with the *AntBot* method applied to real-time navigation.
<figure><img src="image_7.png" /><figcaption>**Fig. 5** Graphs showing the complete results obtained with each AoP computation method depending on the weather condition. Clear sky: *n* = 10 and UV index ∈ [5;8]; changeable sky: *n* = 10 and UV index ∈ [5;8]; covered sky: *n* = 6 and UV index = 3. Grey dots give all the AoP values and blue lines give the average AoP values. Red lines correspond to the ground truth. Since all the experiments were conducted at very different times (both in the day and in the year), we set the first AoP arbitrarily at 0° and adapted the following AoPs correspondingly. This means that the smallest AoP error will always occur at 0°. The AoP errors recorded at angles of 10° and 170° differed under changeable and covered sky conditions since clouds occurred randomly, which affected the AoP values.</figcaption></figure>

<table><caption>**Table 2** Performances of the methods of AoP computation tested under clear sky conditions. SD: standard deviation. UV values are dimensionless and expressed as means ± SD. *n* is the number of data, defined as the number of experiments multiplied by 18, corresponding to the number of data collected during each experiment.</caption><thead><tr><th rowspan="3"></th><th colspan="3">Clear sky (n=180)</th><th colspan="3">Changeable sky (n=180)</th><th colspan="3">Covered sky (n=108)</th></tr><tr><th colspan="3">UV-index: 5.6 ± 1.3</th><th colspan="3">UV-index: 5.8 ± 1.2</th><th colspan="3">UV-index: 3.0 ± 0.0</th></tr><tr><th>Median</th><th>Mean</th><th>SD</th><th>Median</th><th>Mean</th><th>SD</th><th>Median</th><th>Mean</th><th>SD</th></tr></thead><tbody><tr><td>Stokes</td><td><strong>0.64°</strong></td><td>0.72°</td><td>0.46°</td><td><strong>0.98°</strong></td><td>23.50°</td><td>11.96°</td><td><strong>9.49°</strong></td><td>29.47°</td><td>18.93°</td></tr><tr><td>Sahabot</td><td><strong>3.51°</strong></td><td>3.09°</td><td>1.43°</td><td><strong>7.18°</strong></td><td>37.00°</td><td>18.34°</td><td><strong>47.48°</strong></td><td>41.01°</td><td>16.43°</td></tr><tr><td>Matrix</td><td><strong>0.33°</strong></td><td>1.08°</td><td>1.07°</td><td><strong>3.52°</strong></td><td>23.59°</td><td>12.01°</td><td><strong>60.37°</strong></td><td>43.81°</td><td>21.06°</td></tr><tr><td>Extended</td><td><strong>0.24°</strong></td><td>0.62°</td><td>0.40°</td><td><strong>0.04°</strong></td><td>2.22°</td><td>1.63°</td><td><strong>2.85°</strong></td><td>15.79°</td><td>11.60°</td></tr><tr><td>AntBot</td><td><strong>0.39°</strong></td><td>0.69°</td><td>0.52°</td><td><strong>0.02°</strong></td><td>9.55°</td><td>4.81°</td><td><strong>0.59°</strong></td><td>17.98°</td><td>9.81°</td></tr></tbody></table>

## 7 Discussion

We put together an extremely minimalistic sensor that is able to scan the polarization of the skylight using only two pixels and compute the AoP with very few computational resources. Five AoP computational methods were therefore compared in this study, two of which, the Stokes [66] and Sahabot [45,64,46] methods, were previously presented in the literature. As regards the meteorological conditions, the Extended (Section 5.4) and especially the AntBot (Section 5.5) methods gave the lowest median errors ranging from approximately 0.24° and 0.39°, respectively, under clear sky to 2.85° and 0.59°, respectively, under covered sky. In particular, the heading estimates obtained with the

AntBot method were always below the angular resolution of the celestial compass (Δψ = 0.96°) under all the weather conditions tested (Table 2). Better robot heading estimates were therefore obtained with a full angular resolution instead of a resolution of Δψ = 45° (Stokes method) or Δψ = 60° (Sahabot and Matrix methods). The experiments involved in this study were conducted at any time during the day and during a long period including two seasons (winter and spring), and therefore with various UV-indexes and non-controlled lighting conditions. The Extended and AntBot methods therefore give accurate and robust AoP estimates in a wide range of meteorological conditions: clear or covered sky corresponding to various UV-indexes, and
<figure><img src="image_8.png" /><figcaption>**Fig. 6** Box plot of the angular error in degrees, depending on both the AoP computational method used and the sky conditions.</figcaption></figure>

strong or light DoP patterns due to the angular aperture of the sensor.

As noted above in Section 5, a two-fold angular ambiguity exists with all the AoP computational methods except for the *AntBot* one. With all the methods tested here, the AoP was expressed as half the arctangent of a numerical value. Based on the definition of the arctangent function, the computed AoP is inevitably computed modulo 90°. The other angular ambiguity is due to the symmetry of the celestial pattern of polarization (the solar / anti-solar 180° ambiguity) (Fig. 1). The *AntBot* method resulted in a very low angular error under almost all the weather conditions tested without giving rise to any mathematical angular ambiguity, at a much lower computational cost than that of the previous methods since the orientation information can be obtained using just two photodiodes, whereas traditional approaches require powerful high-definition cameras. The celestial compass is currently embedded on-board AntBot. This robot includes a roll actuator so that the compass can be rolled left and right with respect to the robot's longitudinal axis. The maximum angular rotation is ±20°. This set-up is used to solve the solar/anti-solar ambiguity, namely that occurring between [0°; 180°[ and [180°; 360°[. We performed this disambiguation by measuring the average UV level on the left and right of the robot, and comparing these values in order to determine in which half of the sky dome the sun was located. During autonomous navigation tasks, this allows the robot to solve the solar ambiguity problem, as described in a

preliminary study [69]. As regards the FoV of the DRA in *Cataglyphis bicolor* presented in Fig. 1, it is worth noting that the ellipsoid shape of the FoV can be said to resolve the solar ambiguity. This performance is not possible with our 2-pixel sensor because of its relatively small an symmetric FoV. However, the rolling process adopted in AntBot to disambiguate the AoP confirmed the need for a more extensive FoV for discriminating the AoP as we had to: (i) scan the polarization pattern at the zenith to compute one AoP in the [0°; 180°[ angular range; (ii) measure the UV level ±20° from the zenith in order to disambiguate the results. Insects DRAs have been found to point to specific parts of the sky 10° – 30° off-center, which is consistent with what was observed with the present method. Recent studies on locusts have shown that the positions of the receptive fields of neurons in the CX match the distribution of the AoPs in the sky [70]. These results suggest that the AoP may be unambiguously obtained directly from the polarization pattern.

Regarding the biological plausibility of both our 2-pixel celestial compass and the *AntBot* method of AoP computation, many comparisons can be made between this robotic implementation and insects, especially crickets. Ants' brains are endowed with 250,000 neurons on average although they weigh only about 0.1mg [71, 19]. These animals therefore have few computational resources for determining their orientation while navigating. The example of crickets' polarization opponent neurons in the optic lobe [10] was therefore simulated in both the *Extended* and the *AntBot* methods. However, the winner-take-all process is distinct from the ring attractor circuits found in the *Drosophila* CX [44], which are likely also implemented in the homologous circuits in other insects. Nevertheless, the computational stages involved in the *AntBot* method require few computational resources, and can even be shortened using fast processing arctangent algorithms such as Volder's algorithm (CORDIC). The computational complexity could also be reduced by reducing the sensor's resolution and then applying an interpolation process to recover the full resolution. This computational advantage is definitely one of the general characteristics a navigation sensor should have to be embedded on mobile, autonomous robots and cars. The DRA of *Cataglyphis* ants is composed of about 100 ommatidia [20]), each of which carries six UV-sensitive photoreceptors [18]. The DRA of each compound eye of desert ants its therefore composed of about 600 polarization-sensitive photoreceptors, which is approximately 1.6 times more than the number of signals (N = 374) processed with this *AntBot* method. Decreasing the resolution of our ce-
<figure><img src="image_9.png" /><figcaption>**Fig. 7** P-values in the case of two-tailed Wilcoxon rank sum tests between the angular errors obtained with each AoP computational method. **A** Clear sky. **B** Changeable sky. **C** Covered sky. The test parameter $\alpha_C$ was set at 0.05/4 (Bonferroni correction). If the null hypothesis is rejected, i.e. the data-sets are statistically different, and the corresponding box is painted in black. Non-black boxes correspond to similar data-sets.</figcaption></figure>

Celestial compass will therefore presumably not affect its performances since the current reduction ratio resulted in a median error of less than the current angular resolution. It is planned to focus on this issue in future studies and to investigate the critical number of signal inputs required to maintain the quality of the AoP estimates obtained with the *AntBot* method. In the end, our celestial compass uses only two pixels (e.g. one POL-unit), but its scanning process mobilizes a much larger number of pairs of pixels with respect to the polarizers’ orientation. The *AntBot* method presented here is a highly simplified model based on the polarization opponent neurons present in crickets’ optic lobe [10], and the final winner-take-all process was adopted because of the fact that each population of neurons in the protocerebral bridge of the CX corresponds to one specific AoP [25]. For the present navigation purposes, it was established here that our desert ant- and cricket-inspired model is highly precise and robust enough to be embedded on-board autonomous vehicles.

Contrary to the DRA of most insects, none of the robotic implementations described in the state of the art had spectral sensitivity in the UV-range. They were tested under optimum experimental conditions, under a clear sky at the beginning and end of the day to avoid saturation of the sensors. According to the Rayleigh sky model, the DoP reaches its highest value at an angle of 90° from the sun. At the time of day at which these experiments were performed, the DoP was probably high, since the sun was approaching the horizon and the sensor was oriented toward the zenith of the sky. Our 2-pixel celestial compass has its spectral sensitivity in the UV-range and performs very well

under various weather conditions and at any time of day. Although the range of the spectral sensitivity of our celestial compass coincides with that of desert ants *Cataglyphis*, it differs in terms of its peak sensitivity, as it occurs at 280 nm in the case of AntBot (corresponding to the limit between UV-B and UV-C) versus 350 nm in that of *Cataglyphis* (UV-A). This gap may result in differences in performance, which will have to be assessed in future studies. The current stage of development of UV-friendly technologies does not allow us to align the peak sensitivity of our sensor more closely with that of desert ants without degrading the polarization and the DoLP. In addition, the fact that other insects have DRAs which are sensitive to blue and green light should be taken into account when making comparisons between the performances of our sensor and those of insects in the UV-range, especially in case of sub-optimal weather. Future work should include investigations on the heading estimation performances with respect to the spectral sensitivity of the sky compass.

The minimalism of our insect-inspired approach makes it possible to obtain strong and accurate heading estimates on any mobile system navigating outdoors, without having to overload it with cumbersome devices. Our celestial compass, combined with the use of the *AntBot* method, can provide a useful alternative to GNSS devices in the case of the signal failures liable to occur in highly urbanized areas or near natural obstacles such as trees and canyons, for instance.

**Data accessibility** The data sets obtained in this study and the corresponding scripts are available online in the form of supplementary electronic material.
https://github.com/JuSquare/AntBot/tree/master/
HeadingPerformance

**Authors' contribution** J.D., S.V. and J.S. designed the celestial compass. J.D. conducted the experiments and developed the AoP computational methods. J.D. analyzed the data sets. J.D., S.V. and J.S. were responsible for the interpretation of the results. J.D. wrote the original draft. J.D., S.V. and J.S. reviewed the manuscript and gave their final approval for its publication.

**Competing interests** The authors have no competing interests to declare.

**Funding** This research was supported by the French Direction Générale de l'Armement (DGA), CNRS, Aix Marseille University, the Provence-Alpes-Côte d'Azur region, and the French National Research Agency for Research (ANR) with the Equipex / Robotex project.

**Acknowledgements** The authors would like to thank Marc Boyron and Julien Diperi for their technical support with designing the celestial compass, and Jessica Blanc for revising the English manuscript.

## References

1. B.A. Renfro, M. Stein, N. Boeker, A. Terry, An analysis of global positioning system (gps) standard positioning service (sps) performance for 2017 (2018)

2. R. Wehner, S. Wehner, Insect navigation: use of maps or aridne's thread?, Ethology Ecology & Evolution **2**(1), 27 (1990)

3. M. Kohler, R. Wehner, Idiosyncratic route-based memories in desert ants, melophorus bagoti: how do they interact with path-integration vectors?, Neurobiology of learning and memory **83**(1), 1 (2005)

4. M. Wittlinger, R. Wehner, H. Wolf, The ant odometer: stepping on stilts and stumps, science **312**(5782), 1965 (2006)

5. M. Wittlinger, R. Wehner, H. Wolf, The desert ant odometer: a stride integrator that accounts for stride length and walking speed, Journal of experimental Biology **210**(2), 198 (2007)

6. B. Ronacher, R. Wehner, Desert ants cataglyphis fortis use self-induced optic flow to measure distances travelled, Journal of Comparative Physiology A **177**(1), 21 (1995)

7. M. Müller, R. Wehner, Wind and sky as compass cues in desert ant navigation, Naturwissenschaften **94**(7), 589 (2007)

8. M. Müller, R. Wehner, Path integration in desert ants, cataglyphis fortis, Proceedings of the National Academy of Sciences **85**(14), 5287 (1988)

9. T. Labhart, Polarization-sensitive interneurons in the optic lobe of the desert ant cataglyphis bicolor, Naturwissenschaften **87**(3), 133 (2000)

10. T. Labhart, Polarization-opponent interneurons in the insect visual system, Nature **331**(6155), 435 (1988)

11. T. Labhart, E.P. Meyer, Neural mechanisms in insect navigation: polarization compass and odometer, Current opinion in neurobiology **12**(6), 707 (2002)

12. S.M. Reppert, H. Zhu, R.H. White, Polarized light helps monarch butterflies navigate, Current Biology **14**(2), 155 (2004)

13. K. Coulson, Characteristics of the radiation emerging from the top of a rayleigh atmosphere: Intensity and polarization, Planetary and Space Science **1**(4), 265 (1959)

14. K.L. Coulson, *Polarization and Intensity of Light in the Atmosphere* (A Deepak Pub, 1988)

15. M.L. Brines, J.L. Gould, Skylight polarization patterns and animal orientation, Journal of Experimental Biology **96**(1), 69 (1982)

16. R. Wehner, F. Räber, Visual spatial memory in desert ants, cataglyphis bicolor (hymenoptera: Formicidae), Experientia **35**(12), 1569 (1979)

17. K. Pfeiffer, M. Negrello, U. Homberg, Conditional perception under stimulus ambiguity: polarization-and azimuth-sensitive neurons in the locust brain are inhibited by low degrees of polarization, Journal of Neurophysiology **105**(1), 28 (2010)

18. T. Labhart, E.P. Meyer, Detectors for polarized skylight in insects: a survey of ommatidial specializations in the dorsal rim area of the compound eye, Microscopy research and technique **47**(6), 368 (1999)

19. R. Wehner, Desert ant navigation: how miniature brains solve complex tasks, Journal of Comparative Physiology A **189**(8), 579 (2003)

20. T. Labhart, The electrophysiology of photoreceptors in different eye regions of the desert ant, cataglyphis bicolor, Journal of Comparative Physiology A: Neuroethology, Sensory, Neural, and Behavioral Physiology **158**(1), 1 (1986)

21. M. Dacke, P. Nordström, C. Scholtz, E. Warrant, A specialized dorsal rim area for polarized light detection in the compound eye of the scarab beetle pachysoma striatum, Journal of Comparative Physiology A **188**(3), 211 (2002)

22. D. Herzmann, T. Labhart, Spectral sensitivity and absolute threshold of polarization vision in crickets: a behavioral study, Journal of Comparative Physiology A **165**(3), 315 (1989)

23. A. Barta, G. Horváth, Why is it advantageous for animals to detect celestial polarization in the ultraviolet? skylight polarization under clouds and canopies is strongest in the uv, Journal of Theoretical Biology **226**(4), 429 (2004)

24. U. Homberg, In search of the sky compass in the insect brain, Naturwissenschaften **91**(5), 199 (2004)

25. S. Heinze, U. Homberg, Maplike representation of celestial e-vector orientations in the brain of an insect, Science **315**(5814), 995 (2007)

26. S. Heinze, in *Polarized light and polarization vision in animal sciences* (Springer, 2014), pp. 61–111

27. U. Pegel, K. Pfeiffer, U. Homberg, Integration of celestial compass cues in the central complex of the locust brain, Journal of Experimental Biology **221**(2), jeb171207 (2018)

28. F. Schmitt, S.M. Stieb, R. Wehner, W. Rössler, Experience-related reorganization of giant synapses in the lateral complex: Potential role in plasticity of the sky-compass pathway in the desert ant cataglyphis fortis, Developmental neurobiology **76**(4), 390 (2016)

29. T. Stone, B. Webb, A. Adden, N.B. Weddig, A. Honkanen, R. Templin, W. Wcislo, L. Scimeca, E. Warrant, S. Heinze, An anatomically constrained model for path integration in the bee brain, Current Biology **27**(20), 3069 (2017)

30. M. Dacke, D.E. Nilsson, C.H. Scholtz, M. Byrne, E.J. Warrant, Animal behaviour: insect orientation to polarized moonlight, Nature **424**(6944), 33 (2003)

31. M. Dacke, M.J. Byrne, C.H. Scholtz, E.J. Warrant, Lunar orientation in a beetle, Proceedings of the Royal Society of London B: Biological Sciences **271**(1537), 361 (2004)

32. M. Dacke, B. el Jundi, J. Smolka, M. Byrne, E. Baird, The role of the sun in the celestial compass of dung beetles, Philosophical Transactions of the Royal Society of London B: Biological Sciences **369**(1636), 20130036 (2014)

33. B. el Jundi, E.J. Warrant, M.J. Byrne, L. Khaldy, E. Baird, J. Smolka, M. Dacke, Neural coding underlying the cue
preference for celestial orientation, Proceedings of the Na-
tional Academy of Sciences **112**(36), 11395 (2015). DOI
10.1073/pnas.1501272112

34. E.V. Immonen, M. Dacke, S. Heinze, B. El Jundi, Anatom-
ical organization of the brain of a diurnal and a nocturnal
dung beetle, Journal of Comparative Neurology **525**(8), 1879
(2017)

35. S.M. Reppert, R.J. Gegear, C. Merlin, Navigational mech-
anisms of migrating monarch butterflies, Trends in neuro-
sciences **33**(9), 399 (2010)

36. S. Heinze, S.M. Reppert, Sun compass integration of sky-
light cues in migratory monarch butterflies, Neuron **69**(2),
345 (2011)

37. S. Heinze, J. Florman, S. Asokaraj, B. El Jundi, S.M. Reppert, Anatomical basis of sun compass navigation ii: the neuronal composition of the central complex of the monarch butterfly, Journal of Comparative Neurology **521**(2), 267 (2013)

38. S. Heinze, U. Homberg, Neuroarchitecture of the central complex of the desert locust: intrinsic and columnar neurons, Journal of Comparative Neurology **511**(4), 454 (2008)

39. S. Heinze, U. Homberg, Linking the input to the output: new sets of neurons complement the polarization vision network in the locust central complex, Journal of Neuroscience **29**(15), 4911 (2009)

40. U. Homberg, S. Heinze, K. Pfeiffer, M. Kinoshita, B. El Jundi, Central neural coding of sky polarization in insects, Philosophical Transactions of the Royal Society B: Biological Sciences **366**(1565), 680 (2011)

41. S. Heinze, A. Narendra, A. Cheung, Principles of insect path integration, Current Biology **28**(17), R1043 (2018). DOI: https://doi.org/10.1016/j.cub.2018.04.058

42. M. Dacke, B. El Jundi, The dung beetle compass, Current Biology **28**(17), R993 (2018). DOI: https://doi.org/10.1016/j.cub.2018.04.052

43. U. Homberg, S. Hofer, K. Pfeiffer, S. Gebhardt, Organization and neural connections of the anterior optic tubercle in the brain of the locust, schistocerca gregaria, Journal of Comparative Neurology **462**(4), 415 (2003)

44. S.S. Kim, H. Rouault, S. Druckmann, V. Jayaraman, Ring attractor dynamics in the drosophila central brain, Science **356**(6340), 849 (2017)

45. D. Lambrinos, H. Kobayashi, R. Pfeifer, M. Maris, T. Lab-
hart, R. Wehner, An autonomous agent navigating with a
polarized light compass, Adaptive behavior **6**(1), 131 (1997)

46. J. Chu, K. Zhao, Q. Zhang, T. Wang, Construction and per-
formance test of a novel polarization sensor for navigation,
Sensors and Actuators A: Physical **148**(1), 75 (2008)

47. J. Chahl, A. Mizutani, Biomimetic attitude and orientation sensors, IEEE Sensors Journal **12**(2), 289 (2012)

48. Y. Wang, J. Chu, R. Zhang, L. Wang, Z. Wang, A novel autonomous real-time position method based on polarized light and geomagnetic field, Scientific reports **5**, 9725 (2015)

49. W. Zhi, J. Chu, J. Li, Y. Wang, A novel attitude determina-
tion system aided by polarization sensor, Sensors **18**(1), 158
(2018)

50. J. Dupeyroux, J. Diperi, M. Boyron, S. Viollet, J. Serres, in *IROS 2017-IEEE/RSJ International Conference on Intelligent Robots and Systems* (2017), pp. 3439–3445

51. M. Sarkar, D.S.S. Bello, C. Van Hoof, A. Theuwissen, in *Sensors Applications Symposium (SAS), 2010 IEEE (IEEE, 2010)*, pp. 194–199

52. J. Chu, Z. Wang, L. Guan, Z. Liu, Y. Wang, R. Zhang, Integrated polarization dependent photodetector and its application for polarization navigation, IEEE Photonics Technol. Lett **26**(5), 469 (2014)

53. M. Garcia, C. Edmiston, R. Marinov, A. Vail, V. Gruev, Bio-inspired color-polarization imager for real-time in situ imaging, Optica **4**(10), 1263 (2017)

54. N. Carey, W. Stürzl, in *Computer Vision Workshops (ICCV Workshops), 2011 IEEE International Conference on* (IEEE, 2011), pp. 312–319

55. M. Sarkar, D.S.S. Bello, C. van Hoof, A.J. Theuwissen, Bi-
logically inspired cmos image sensor for fast motion and po-
larization detection, IEEE Sensors Journal **13**(3), 1065 (2013)

56. D. Wang, H. Liang, H. Zhu, S. Zhang, A bionic camera-based polarization navigation sensor, Sensors **14**(7), 13006 (2014)

57. W. Zhang, Y. Cao, X. Zhang, Z. Liu, Sky light polarization detection with linear polarizer triplet in light field camera inspired by insect vision, Applied optics **54**(30), 8962 (2015)

58. C. Fan, X. Hu, J. Lian, L. Zhang, X. He, Design and calibra-
tion of a novel camera-based bio-inspired polarization nav-
igation sensor, IEEE Sensors Journal **16**(10), 3640 (2016)

59. W. Zhang, X. Zhang, Y. Cao, H. Liu, Z. Liu, Robust sky light polarization detection with an s-wave plate in a light field camera, Applied optics **55**(13), 3518 (2016)

60. Y. Wang, X. Hu, L. Zhang, J. Lian, X. He, Polarized light compass-aided visual-inertial navigation under foliage environment, IEEE Sensors Journal **17**(17), 5646 (2017)

61. G. Han, X. Hu, J. Lian, X. He, L. Zhang, Y. Wang, F. Dong, Design and calibration of a novel bio-inspired pixelated polarized light compass, Sensors **17**(11), 2623 (2017)

62. C. Fan, X. Hu, X. He, L. Zhang, J. Lian, Integrated polar-
ized skylight sensor and mimu with a metric map for urban
ground navigation, IEEE Sensors Journal **18**(4), 1714 (2018)

63. M. Momeni, A.H. Titus, An analog vlsi chip emulating po-
larization vision of octopus retina, IEEE transactions on neu-
ral networks **17**(1), 222 (2006)

64. D. Lambrinos, R. Möller, T. Labhart, R. Pfeifer, R. Wehner, A mobile robot employing insect strategies for navigation, Robotics and Autonomous systems **30**(1-2), 39 (2000)

65. S.B. Karman, S.Z.M. Diah, I.C. Gebeshuber, Bio-inspired po-
larized skylight-based navigation sensors: A review, Sen-
sors **12**(11), 14232 (2012)

66. G.G. Stokes, On the composition and resolution of streams of polarized light from different sources, Transactions of the Cambridge Philosophical Society **9**, 399 (1851)

67. T.M. Aycock, D.B. Chenault, A. Lompado, J.L. Pezzaniti. Sky polarization and sun sensor system and method (2018). US Patent 9,989,625

68. J. Dupeyroux, J. Diperi, M. Boyron, S. Viollet, J. Serres, in *ECMR-European Conference on Mobile Robotics* (2017), pp. 119–124

69. J. Dupeyroux, J. Serres, S. Viollet, in *Conference on Biomimetic and Biohybrid Systems* (Springer, 2018), pp. 145–156

70. M. Bech, U. Homberg, K. Pfeiffer, Receptive fields of locust brain neurons are matched to polarization patterns of the sky, Current Biology **24**(18), 2124 (2014)

71. M.A. Seid, A. Castillo, W.T. Wcislo, The allometry of brain miniaturization in ants, Brain, behavior and evolution **77**(1), 5 (2011)