1 /*
2 # This file is part of the Astrometry.net suite.
3 # Licensed under a 3-clause BSD style license - see LICENSE
4 */
5
6 #include <stdio.h>
7
8 #include "bl.h"
9
10 struct orbital_elements {
11 double a, e, I, Omega, pomega, M;
12 double mjd;
13 };
14 typedef struct orbital_elements orbital_elements_t;
15
16
jpl_parse_orbital_elements(const char * str,bl * lst)17 bl* jpl_parse_orbital_elements(const char* str, bl* lst) {
18 double jd;
19 double a, e, I, Omega, pomega, M;
20 double QR, Tp, N, TA, AD, PR;
21 char adstr[5];
22 char datestr[12];
23 char timestr[14];
24 char tzstr[5];
25 sscanf(s, "%lf = %4s %11s %13s %4s EC= %lf QR= %lf IN=%lf"
26 " OM= %lf W = %lf Tp= %lf N = %lf MA= %lf TA= %lf"
27 " A = %lf AD= %lf PR= %lf",
28 &jd, adstr, datestr, timestr, tzstr, &e, &QR, &I,
29 &Omega, &pomega, &Tp, &N, &M, &TA, &a, &AD, &PR);
30 }
31
32