star-cem

Compute the position of the sun
git clone git://git.meso-star.fr/star-cem.git
Log | Files | Refs | README | LICENSE

scem_c.h (1485B)


      1 /* Copyright (C) 2025 |Méso|Star> (contact@meso-star.com)
      2  *
      3  * This program is free software: you can redistribute it and/or modify
      4  * it under the terms of the GNU General Public License as published by
      5  * the Free Software Foundation, either version 3 of the License, or
      6  * (at your option) any later version.
      7  *
      8  * This program is distributed in the hope that it will be useful,
      9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     11  * GNU General Public License for more details.
     12  *
     13  * You should have received a copy of the GNU General Public License
     14  * along with this program. If not, see <http://www.gnu.org/licenses/>. */
     15 
     16 #ifndef SCEM_C_H
     17 #define SCEM_C_H
     18 
     19 #include "scem.h"
     20 #include <rsys/rsys.h>
     21 
     22 struct celestial_coords { /* right-ascension, declination */
     23   double right_ascension; /* [rad] */
     24   double declination; /* [rad] */
     25 };
     26 static const struct celestial_coords CELESTIAL_COORDS_NULL = {0};
     27 
     28 struct ecliptic_coords {
     29   double longitude; /* [rad] */
     30   double obliquity; /* [rad] */
     31 };
     32 static const struct ecliptic_coords ECLIPTIC_COORDS_NULL = {0};
     33 
     34 extern LOCAL_SYM res_T
     35 sun_position_from_earth_psa
     36   (const struct tm* time, /* In UTC */
     37    const struct scem_location* pos,
     38    struct scem_sun_pos* sun);
     39 
     40 extern LOCAL_SYM res_T
     41 sun_position_from_earth_meeus
     42   (const struct tm* time, /* In UTC */
     43    const struct scem_location* pos,
     44    struct scem_sun_pos* sun);
     45 
     46 #endif /* SCEM_C_H */