Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faulty calculation of SunPosition #22

Open
stenza opened this issue Oct 31, 2023 · 0 comments
Open

Faulty calculation of SunPosition #22

stenza opened this issue Oct 31, 2023 · 0 comments

Comments

@stenza
Copy link

stenza commented Oct 31, 2023

I don't have any experience in solar calculations

It seems the getSunPosition() function is wrong.
I did the same calculation with this library and a bit more complex sun-position-spa-php and used this website to calculate and visualize the result based on the same data.

Input data

  • Lat: 47
  • Long: 18
  • DateTime: 2023-10-30 09:40:30 (GMT+1)
  • Altitude: 50 ft

Results

DATE: 2023-10-30 09:40:30
LAT : 47
LONG: 18

SunCalc PHP CALC ---
Azimuth: -14.272991314245
Altitude: 28.283460212278

Sun-Position-SPA-php CALC ---
Azimuth: 150.18753268816
Altitude: 24.352291414304

and here is the visualization for these numbers: 3D visualization

2 out of 3 give the same results, based on the visualization and looking out of my window, unfortunately, this library is the wrong one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant