sun sensor #1123
Replies: 2 comments
-
|
Not sure how much help you want. I could give you the exact code BUT I won't for now. The answer lies with Spherical Trigonometry. These are the same principles as a sextant/astrolabe that were used for navigation pre-GPS. Basically you can use Skyfield to calculate a theoretical Right Ascension and Declination of the sun (these values are historically presented to sailors and others in the Astronomical Almanac). This example shows how, just use the sun instead of mars. From there you need to solve the equations presented in the book. Specifically This is slightly non-trivial and I used an equation solver to build the matrix calculation. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @EndlessDex, thanks a lot for your response I really appreciate your guidance here. From what I understand, at a given UTC timestamp, I can use an astronomical model such as Skyfield to obtain the theoretical solar parameters including Right Ascension (RA), Declination (Dec), and GMST, while my onboard sun sensor measures the Sun’s elevation (alt) and azimuth (az). So effectively at time t, my known inputs are the measured altitude and azimuth together with RA(t), Dec(t), and GMST(t), while the unknowns are the observer’s latitude and longitude. However, when I look at the equations such as Eq 2.14: sin(dec) = sin(alt)*sin(lat) + cos(alt)*cos(lat)*cos(az) it appears that latitude and longitude are required in order to evaluate these expressions. So my question is whether these equations are intended to be directly evaluated, or instead solved as a nonlinear system for latitude and longitude given the measured altitude, azimuth, and time-derived solar parameters. Therefore, I’m unsure whether this classical LOP-intersection approach is appropriate for a continuously sampled robotic platform, or whether a nonlinear solver or filtering formulation based on solving Eq 2.14–2.16 over time would be more suitable for achieving sub-kilometer accuracy, and I would really appreciate your advice on whether your approach could realistically achieve 100–500 m accuracy under these conditions. I would greatly appreciate it if you could share your code with me. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have developed an algorithm and a sun sensor model using an array of photoresistors, similar to the one shown in the attached image.
I then simulated the trajectory of the sun in a Unity environment and tested my algorithm and sensor model. The current model is able to calculate the azimuth and elevation of the sun. After comparing the results with the ground truth data, I obtained an output error of around 1 degree in both elevation and azimuth.
Now, I would like to estimate the longitude and latitude using the calculated elevation and azimuth of the sun along with the time. Is it possible to determine the location using these values? I am currently struggling with this step and would appreciate your guidance on how to calculate the latitude and longitude on Earth using the sun’s elevation and azimuth.
can I use astropy of skyfield to estimate the lat and long?
thanks
Beta Was this translation helpful? Give feedback.
All reactions