488 int i,j, n_intervals;
490 double prev_midnight, time_of_day;
499 prev_midnight = floor( s);
500 time_of_day = s - prev_midnight;
501 prev_midnight += 0.5;
526 size_t count = fread( buf, (
size_t)eph->
ncoeff,
sizeof(
double), eph->
ifile);
539 aufac = 1.0 / eph->
au;
542 for( n_intervals = 1; n_intervals <= 8; n_intervals *= 2)
543 for( i = 0; i < 11; i++)
544 if( n_intervals == eph->
ipt[i][2] && (list[i] || i == 10))
546 int flag = ((i == 10) ? 2 : list[i]);
547 double *dest = ((i == 10) ? eph->
pvsun : pv[i]);
549 interp( iinfo, &buf[eph->
ipt[i][0]-1], t, (
int)eph->
ipt[i][1], 3,
550 n_intervals, flag, dest);
552 for( j = 0; j < flag * 3; j++)
557 for( i = 0; i < 9; i++)
558 for( j = 0; j < list[
i] * 3; j++)
559 pv[i][j] -= eph->
pvsun[j];
563 if(list[10] > 0 && eph->
ipt[11][1] > 0)
564 interp( iinfo, &buf[eph->
ipt[11][0]-1], t, (
int)eph->
ipt[11][1], 2,
565 (
int)eph->
ipt[11][2], list[10], nut);
569 if(list[11] > 0 && eph->
ipt[12][1] > 0)
573 interp( iinfo, &buf[eph->
ipt[12][0]-1], t, (
int)eph->
ipt[12][1], 3,
574 (
int)eph->
ipt[12][2], list[11], pefau);
575 for( j = 0; j < 6; ++j) pv[10][j]=pefau[j];
void * iinfo
Definition: jpleph.h:142
int i
Definition: rw_test.cpp:37
int count
Definition: rw_test.cpp:36
double ephem_step
Definition: jpleph.h:131
ElapsedTime et
Definition: agent_cpu_device_test.cpp:51
double pvsun[6]
Definition: jpleph.h:140
double ephem_start
Definition: jpleph.h:131
double ephem_end
Definition: jpleph.h:131
double * cache
Definition: jpleph.h:141
double au
Definition: jpleph.h:133
static void interp(struct interpolation_info *iinfo, const double coef[], const double t[2], const int ncf, const int ncm, const int na, const int ifl, double posvel[])
Definition: jpleph.cpp:274
int32_t curr_cache_loc
Definition: jpleph.h:139
static void swap_double(void *ptr, long count)
Definition: jpleph.cpp:393
#define JPLEPHEM_ERROR_OUTOFRANGE
Definition: cosmos-errno.h:242
#define SEEK_SET
Definition: zconf.h:475
int32_t ncoeff
Definition: jpleph.h:137
#define KM
Definition: jpleph.cpp:70
FILE * ifile
Definition: jpleph.h:143
int32_t ipt[13][3]
Definition: jpleph.h:135
char buf[128]
Definition: rw_test.cpp:40
int32_t recsize
Definition: jpleph.h:137
int32_t swap_bytes
Definition: jpleph.h:138