News for hackers. Stuff that matters.
Re:Ask HN: Is it possible to get a location using a camera l... by AlDante2 on Wednesday July 06, 2022 @01:16AM (#31996975)
If you can measure the angle of the sun over the horizon at noon you can get both latitude and longitude. Longitude is the difference between local noon and Greenwich noon. The observed angle of the sun at noon is called its altitude. The angle of the sun above the equator is called its declination and can be calculated. Latitude is declination + (90 - altitude).

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 no comments on this comment yet.