-
Notifications
You must be signed in to change notification settings - Fork 3
/
playground5.c
51 lines (36 loc) · 1.27 KB
/
playground5.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SpiceUsr.h"
#include "SpiceZfc.h"
#include "/home/user/BCGIT/ASTRO/bclib.h"
int main( int argc, char **argv ) {
SPICEDOUBLE_CELL(result, 20000);
SPICEDOUBLE_CELL(cnfine, 2);
SpiceInt i, count, fid;
SpiceChar name[255];
SpiceBoolean found;
SpiceDouble beg, end;
furnsh_c("/home/user/BCGIT/ASTRO/standard.tm");
cidfrm_c(542, 255, &fid, name, &found);
printf("507 to %d %s\n",fid,name);
exit(-1);
// these ET limits for jupxxx.bsp should be consistent
spkcov_c ("/home/user/SPICE/KERNELS/jup310.bsp", 502, &cnfine);
// refine slightly to avoid corner case errors
SPICE_CELL_SET_D(SPICE_CELL_ELEM_D(&cnfine,0)+86400, 0, &cnfine);
SPICE_CELL_SET_D(SPICE_CELL_ELEM_D(&cnfine,1)-86400, 1, &cnfine);
// testing only
SPICE_CELL_SET_D(year2et(2010), 0, &cnfine);
SPICE_CELL_SET_D(year2et(2020), 1, &cnfine);
printf("%f\n", SPICE_CELL_ELEM_D(&cnfine,0));
printf("%f\n", SPICE_CELL_ELEM_D(&cnfine,1));
gfoclt_c("FULL", "EUROPA", "ELLIPSOID", "IAU_EUROPA", "SUN", "ELLIPSOID",
"IAU_SUN", "CN", "IO", 360, &cnfine, &result);
count = wncard_c(&result);
for (i=0; i<count; i++) {
wnfetd_c(&result,i,&beg,&end);
printf("min %f %f\n",et2jd(beg),et2jd(end));
}
return 0;
}