Ask HN: Is it possible to get a location using a camera looking at Moon/Sun?
Imagine we have any flagman smartphone but can not access GPS/GloNaS, GSM/CDMA and if we have an Internet connection we can't make any assumptions about IP.
We may turn a camera as needed, also we have compass, accelerometer, gyroscope and maybe an analog zoom.
19 comments
[ 4.8 ms ] story [ 51.6 ms ] threadhttps://youtu.be/vw9zyxm860Q I think describes this event
Given the presence of an internet connection, I think it’s easiest to query a time server at midday (detected by detecting the time when the sun is highest above the horizon/shadows are shortest) to get longitude.
(Latitude is relatively simple; one can, for example, use a sextant to measure the height of the pole star above the horizon)
https://www.amazon.com/Longitude-Genius-Greatest-Scientific-...
https://en.wikipedia.org/wiki/Longitude_(book)
For a teaser on John Harrison's chronometer and celestial navigation:
https://wornandwound.com/history-of-chronometers-pt-1-origin...
Sunset is a prayer time in Islam, so sunset times in most cities in the world is accurately calculated. Sunrise too. The window for a sunrise and sunset is about 5 min, which should give you decent accuracy.
You still need latitude though.
https://www.polarissensor.com/skypass/
The time of local solar noon will give you the longitude.
The altitude or the sun (you could use the gyroscope here, or just use a protractor) will allow you to calculate latitude.
The internet connection will allow you to find out how to calculate it.
This calculation needs to be adjusted for hemisphere and high altitudes - see, e.g. here: https://astronavigationdemystified.com/latitude-from-the-mid...
Here is the calculation for the sun’s declination. I’m sure you can find more accurate formulae. https://sinovoltaics.com/learning-center/basics/declination-...
There are a few projects which marry cheap zoom lenses with smartphones (e.g. https://www.instructables.com/ISextant-Project/) to overcome this.
You may also be interested in this app which compares GPS positioning with sextant altitude allowing you easily detect errors with either: http://reednavigation.com/GPSAntiSpoof/