This the 3rd DIY sextant project published in this
space. There is also the X-tant
The iPhone has an interesting set of sensors.
Two of them are orientation sensors: a magnetic
compass and gyroscope. They sense acceleration,
gravity vector and Earth's magnetic field.
Navigator for iOS (v2.5+) uses these sensors
to auto-orient the star finder chart. It also allows
capturing sensor readings, so the phone can be used
as a sextant. Sort of. Keep reading.
In Navigator star finder page, click [Config]
The attitude panel shows (see number 2 to the
right). It shows Azimuth, Altitude
and name of pointed star (if any).
Set animation to current sky.
Hold the phone vertically, in portrait orientation.
As you move it, pointing to the sky, the star chart
moves accordingly. Keep the phone forming a right
angle with the line of sight of the star.
A small rectangle shows in the chart to represent
the phone attitude towards the sky (see number 1).
Center the star on that rectangle to read its altitude.
Of course it is difficult to hold the phone steady
in constant right angle with a bare hand...