Skip to content

dblaufuss/star-compass

Repository files navigation

Abstract

Orientation in navigation is an issue that has challenged humans for thousands of years. The most common tool used to determine orientation is a magnetic compass. However, compasses can have many issues, such as susceptibility to interference from even weak magnetic fields, as well as not pointing towards true North, but instead guiding towards the magnetic North. Additionally, magnetic compasses are not ideal for embedded computing applications, as the magnetic fields generated by electronic components such as motors can cause internal interference in a system. Celestial navigation circumvents these issues by using visual positions and patterns of celestial objects in the sky for orientation. This project seeks to determine if using a consumer level digital camera combined with public star catalogs can be used as a cheap and effective means of determining orientation. Experiments conducted using pictures of the night sky found that orientation of an observer can be measured with a root mean square error of $2.785\degree$. This error was less than the benchmark error of $5\degree$, proving the accuracy of such a system.

Demo

image Diagram showing the general layout of the system. Where $0$ represent the observer's position, $N$, $S$, $E$, and $W$ all represent the four main cardinal directions, $\varphi$ represents the observer's azimuthal orientation, and $Z$ represent the zenith. The ice cream cone shape represents a camera's field of view (simulated to be $122.8\degree$). Also shown are simulated star positions.



image An example skymap showing the position of stars for a specific location and time. This is simulating a $122.8\degree$ field of view (tuned to match the camera) pointed at the zenith of the sky.



image An example de-bayered and gray-scaled camera image with the location of extracted stars overlaid as red circles.



Solved a least squares using the star catalog positions and observed positions to find the best rotational angle.

$ L(\varphi) = \sum_{i=0}^{n} \frac{\min(\sqrt{r^2_1 + r^2_2-2r_1r_2 \cos(\theta_1-\theta_2+\varphi)})^2}{\sigma^2} $

The function $L$ finds and sums the square of the minimum distance between $n$ found stars $(r_1, \theta_1)_i$ to a catalog star $(r_2, \theta_2)_i$ using the polar distance formula to determine the error of alignment for each value of a rotational offset $\varphi$. The value of $\varphi$ where this function is the smallest in the range $[0\degree, 360\degree]$ is determined to be the heading of the observer. The estimated error was assumed to be $\sigma = 2\degree$. This equation was solved in Python using the scipy.optimize library. An example of this function is graphed below.

image A sample graph of the least squares equation on the range $[0\degree, 360\degree]$ that shows an absolute minimum around $\varphi = 90\degree$. This value is what is returned by the least squares minimization code, and is considered the extracted heading.



image An example skymap (same as above) with the found stars (also same as above) rotated by the extracted heading found by the least squares function. The found stars line up with the expected star positions, confirming the orientation to be correct.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors