/* STEREO IMPACT SEP SEPT ** ** L1 Data Processing, Test ** ** (C) Copyright 2005-2006 Stephan I. Böttcher, CAU Kiel - IEAP ** ** Stephan I. Böttcher ** Reinhold Müller-Mellin ** ** $Id: sept_l1_test.c,v 1.6 2006/12/22 07:16:07 bottcher Exp $ ** $Log: sept_l1_test.c,v $ ** Revision 1.6 2006/12/22 07:16:07 bottcher ** change sept_time_t from unsigned int to double ** ** Revision 1.5 2006/10/26 09:34:53 bottcher ** change interface to use copied l0 data, instead of pointer ** ** Revision 1.4 2006/10/13 06:36:50 bottcher ** turn line ends to Unix ** ** Revision 1.3 2006/10/12 22:42:38 bottcher ** Do not skip 32 byte header ** ** Revision 1.2 2006/03/22 15:46:39 bottcher ** init_called for automatic initialization ** verbosity added ** ** Revision 1.1 2005/12/27 22:35:38 bottcher ** Initial commit, feature complete. ** */ #include #include #include "sept_l1.h" int main() { FILE *f = stdin; unsigned char packet[298]; unsigned char *ccsds = packet+26; unsigned char *l0 = ccsds+11; sept_level1_verbose = 5; sept_level1_init(); while (1==fread(packet, 298, 1, f)) { struct sept_raw_packet raw; struct sept_science_level1 l1; int cks = 0; int i; for (i=0; i<272; i++) cks += ccsds[i]; if (cks & 0xff) { fprintf(stderr, "checksum error\n"); continue; } for (i=0; i