Go to the documentation of this file.
20 int convert_diary(
int npkts, uint8_t dstore[],
double otime[],
double orb[],
double atime[],
double quat[]) {
23 int32_t jd0, ccsds_iy,
idy,
jd;
29 for (
i = 0;
i < npkts;
i++) {
32 for (
j = 0;
j < 6;
j++) orb[
j +
i * 6] = 0;
33 for (
j = 0;
j < 4;
j++) quat[
j +
i * 4] = 0;
38 jd0 = (dstore[0 * 71 + 6] << 8) + dstore[0 * 71 + 7] + 2436205;
41 for (
i = 0;
i < npkts;
i++) {
44 for (m = 0; m < 8; m++) cctime[m] = dstore[
i * 71 + m + 15];
46 iy = (int16_t) ccsds_iy;
48 otime[
i] = secd + (
jd - jd0)*86400.0;
52 for (
j = 0;
j < 6;
j++) {
54 *((uint8_t*) (&tmpa) + 0) = dstore[
i * 71 +
ioff + 3];
55 *((uint8_t*) (&tmpa) + 1) = dstore[
i * 71 +
ioff + 2];
56 *((uint8_t*) (&tmpa) + 2) = dstore[
i * 71 +
ioff + 1];
57 *((uint8_t*) (&tmpa) + 3) = dstore[
i * 71 +
ioff];
64 for (m = 0; m < 8; m++) cctime[m] = dstore[
i * 71 + m + 47];
66 iy = (int16_t) ccsds_iy;
68 atime[
i] = secd + (
jd - jd0)*86400.0;
72 for (
j = 0;
j < 4;
j++) {
74 *((uint8_t*) (&tmpa) + 0) = dstore[
i * 71 +
ioff + 3];
75 *((uint8_t*) (&tmpa) + 1) = dstore[
i * 71 +
ioff + 2];
76 *((uint8_t*) (&tmpa) + 2) = dstore[
i * 71 +
ioff + 1];
77 *((uint8_t*) (&tmpa) + 3) = dstore[
i * 71 +
ioff];
int32_t jday(int16_t i, int16_t j, int16_t k)
int ccsds_to_yds(uint8_t *cctime, int32_t *iyear, int32_t *iday, double *sec)
int convert_diary(int npkts, uint8_t dstore[], double otime[], double orb[], double atime[], double quat[])
integer, parameter double