Due to the lapse in federal government funding, NASA is not updating this website. We sincerely regret this inconvenience.
NASA Logo
Ocean Color Science Software

ocssw V2022
esdist.c
Go to the documentation of this file.
1 #include "libnav.h"
2 #include "nav.h"
19  // something wrong with fsol? Need to check
20  // check jd
21 double esdist_(int *iyr, int *iday, int *msec) {
26  double t = jd(*iyr, 1, *iday) - 2451545.0e0 + (*msec / 1000.e0 - 43200.e0) / 86400.e0;
27  // c Compute mean anomaly
28  double gs = 357.52772e0 + 0.9856002831e0 * t;
29  // Compute solar distance (AU)
30  const static double radeg_to_match_fortran = 57.295780181884766e0;
31  return 1.00014e0 - 0.01671e0 * cos(gs / radeg_to_match_fortran) - 0.00014e0 * cos(2.0e0 * gs / radeg_to_match_fortran);
32 }
data_t t[NROOTS+1]
Definition: decode_rs.h:77
int32 * msec
Definition: l1_czcs_hdf.c:31
double esdist_(int *iyr, int *iday, int *msec)
c This subroutine computes the earth-sun distance in AU. It uses the model c referenced in The Astron...
Definition: esdist.c:21
def jd(i, j, k)
Definition: jd.py:1
int32_t iyr
Definition: atrem_corl1.h:161