Solving Sunset equation for latitude.

126 Views Asked by At

I'm making a project, where small battery powered device would solve it's geographical position based on sunrise/sunset data. The device has internal clock, keeping track of time/date and photosensor, able to measure illumination. I'm into electronics/programming side of things and already have accumulated some experimental data, as seen here https://hackaday.io/project/28550-light-level-geolocator but apparently I can't make the math working for me.

From measured sunrise/sunset times I can find solar noon and day length. Solar noon gives me geographical longitude, day length returns me longitude. Equation between day length and latitude, at given solar inclination (easily calculated from day of year), is called sunrise equation, looking like this: $$ sin(O)= \frac{sin(A)-sin(F).sin(D)}{cos(F).cos(D)} $$ where O is hour angle, telling me about day length

A is sun elevation when measuring sunrise/sunset

D is solar inclination

F is latitude

I'm easily able to calculate O from given A, D and F - and I verified this equation to produce correct day length results. Now my device needs to calculate F from known A, D and O. I tried expressing the equation for F, but I can't manage to do it, without getting tangled into expressions much more complicated than original equation. Trying to separate equation members into the ones containing only F and separating it to one side of equation isn't easy for me.

Does anyone know how to calculate the F parameter?