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

Sunposition? #3

Open
stephancb opened this issue Jun 18, 2018 · 3 comments
Open

Sunposition? #3

stephancb opened this issue Jun 18, 2018 · 3 comments

Comments

@stephancb
Copy link

Not really an issue, but I have code in native Julia for the sun position at given geodetic coordinates and time, returning zenith angle and azimuth. We use this to calculate the sun position relative to the satellite. It is quite fast. I never got around to put this into a package, but if you think it might fit, I would try to come up with a pull request for the SatelliteToolbox?

Some more details:

Functions for calculating the Sun's position described in
Roberto Grena (2012), Five new algorithms for the computation of sun position
from 2010 to 2110, Solar Energy, 86(5):1323–1337, doi:10.1016/j.solener.2012.01.024.

URLs:
http://adsabs.harvard.edu/abs/2012SoEn...86.1323G

The Julia code was transcribed from C++ obtained at
http://www.solaritaly.enea.it/StrSunPosition/SunPositionEn.php

by Stephan Buchert, Swedish Institute of Space Physics, [email protected]

Examples for usage:

zenith,azimuth,rightAscension,declination,hourAngle =
sunpos(...

@ronisbr
Copy link
Member

ronisbr commented Jun 18, 2018

Excellent! It will be very nice to have those algorithms. Now, we only have one very simple Sun determination algorithm here, which provides the sun position in ECI. You can add all of those and let the user select. Maybe it best way is to use multiple-dispatch, so the user can use it like:

sun_position_i(Val{:algorithm_1}, ...)
sun_position_i(Val{:algorithm_2}, ...)

Change the _i to _e maybe (ECEF)?

@ronisbr
Copy link
Member

ronisbr commented Mar 29, 2019

Hi @stephancb !

Do you still want to add those algorithms in SatelliteToolbox.jl?

@stephancb
Copy link
Author

Hi Ronan,

yes, sorry for not doing it yet. The code is attached, it has comments. Included is also the original C++ code and documentation, it doesn't have a license..
SunPosition.jl.zip

I don't have any experience with creating pull requests etc., and became
quite busy. If you have the possibility to add the algorithms to the
satellite toolbox, this would be perfect.

Best regards,
Stephan

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

Successfully merging a pull request may close this issue.

2 participants