![]() ![]() |
Klaus Rohe |
![]() |
Hi all, I’m new to celestlab. I have the following question: Are their examples available how to calculate sunrise / sunset and position of the sun and the moon in the local horizontal system using celestlab? Thanks in advance. Kind regards Klaus Dipl.-Phys. Klaus Rohe Adolf-Kolping-Strasse 10a 85625 Glonn E-Mail: [hidden email] Tel.: +49 (0) 8093 5402 Mobil: +49 (0) 170 8133634 _______________________________________________ Celestlab mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/celestlab |
![]() ![]() |
Alain LAMY |
![]() |
Hi,
1)
For the Sun /Moon direction / horizontal plane with CelestLab : yes
-
Compute the body position (CL_eph_sun() for instance)
-
Convert to the local frame (using CL_gm_stationPointing is probably the simplest way. NB: You need to convert the coordinates from the “inertial” frame (ECI) to the terrestrial frame (ECF).
It would be something like this (look at help pages for more details):
cjd0 = CL_dat_cal2cjd(2014, 06, 03); // initial day cjd = cjd0 + (0 : 1/1440 : 1); sun_eci = CL_eph_sun(cjd); // Earth->Sun in cartesian coordinates sun_ecf = CL_fr_convert("ECI", "ECF", cjd, sun_eci); location = [0 * %pi/180; 45 * %pi/180; 0]; // geodetic coordinates [azim,elev,dist] = CL_gm_stationPointing(location, sun_ecf); scf();
plot(cjd-cjd0, elev * 180/%pi);
2)
Sunrise / Sunset : it is not directly computed
But you can rather easily determine the zeros of the Sun elevation.
One (approximate) solution is something like :
I = Find(elev(1:$-2) .* elev(2:$) <= 0) Estimate the zeros by linear interpolation between elev(I) and elev(I+1) [elev has to be computed with a small enough step so that the linear interpolation yields good enough results] Note: atmospheric corrections are not defined in CelestLab.
Alain De : Celestlab [mailto:[hidden email]]
De la part de Klaus Rohe Hi all, I’m new to celestlab. I have the following question: Are their examples available how to calculate sunrise / sunset and position of the sun and the moon in the local horizontal system using celestlab? Thanks in advance. Kind regards Klaus Dipl.-Phys. Klaus Rohe Adolf-Kolping-Strasse 10a 85625 Glonn E-Mail:
[hidden email] Tel.: +49 (0) 8093 5402 Mobil: +49 (0) 170 8133634 _______________________________________________ Celestlab mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/celestlab |
![]() ![]() |
Klaus Rohe |
![]() |
Hi Alain, thank you very much for your help. Works very well. Kind regards Klaus Von: Celestlab [mailto:[hidden email]] Im Auftrag von Lamy Alain Hi, 1) For the Sun /Moon direction / horizontal plane with CelestLab : yes - Compute the body position (CL_eph_sun() for instance) - Convert to the local frame (using CL_gm_stationPointing is probably the simplest way. NB: You need to convert the coordinates from the “inertial” frame (ECI) to the terrestrial frame (ECF). It would be something like this (look at help pages for more details): cjd0 = CL_dat_cal2cjd(2014, 06, 03); // initial day cjd = cjd0 + (0 : 1/1440 : 1); sun_eci = CL_eph_sun(cjd); // Earth->Sun in cartesian coordinates sun_ecf = CL_fr_convert("ECI", "ECF", cjd, sun_eci); location = [0 * %pi/180; 45 * %pi/180; 0]; // geodetic coordinates [azim,elev,dist] = CL_gm_stationPointing(location, sun_ecf); scf(); plot(cjd-cjd0, elev * 180/%pi); 2) Sunrise / Sunset : it is not directly computed But you can rather easily determine the zeros of the Sun elevation. One (approximate) solution is something like : I = Find(elev(1:$-2) .* elev(2:$) <= 0) Estimate the zeros by linear interpolation between elev(I) and elev(I+1) [elev has to be computed with a small enough step so that the linear interpolation yields good enough results] Note: atmospheric corrections are not defined in CelestLab. Alain De : Celestlab [[hidden email]] De la part de Klaus Rohe Hi all, I’m new to celestlab. I have the following question: Are their examples available how to calculate sunrise / sunset and position of the sun and the moon in the local horizontal system using celestlab? Thanks in advance. Kind regards Klaus Dipl.-Phys. Klaus Rohe Adolf-Kolping-Strasse 10a 85625 Glonn E-Mail: [hidden email] Tel.: +49 (0) 8093 5402 Mobil: +49 (0) 170 8133634 _______________________________________________ Celestlab mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/celestlab |
Free forum by Nabble | Edit this page |