/*  splitparms.h
 *
 *  Most of the definitions required by the splitter
 *
 *  $Id: splitparms.h,v 1.3 2006/11/14 02:19:01 vonkorff Exp $
 *
 */

#ifndef SPLITPARMS_H
#define SPLITPARMS_H

#include <limits.h>

// #define WU_DIR "/disks/sagan/a/users/korpela/wudir/"

#define SPLITTER_VERSION 0x0008
#define N_SIMULT_SPLITTERS 6

/* Work Unit Parameters */
#define NBYTES 262144L
#define NSAMPLES (NBYTES*CHAR_BIT/2)
#define MAX_POSITION_HISTORY 40
#define WU_FILESIZE (360L*1024)

/* FFT Parameters - comment out for pulse search*/
// #define FFT_LEN 2048
// #define IFFT_LEN 8
// #define NSTRIPS (FFT_LEN/IFFT_LEN)

/* Tape format parameters */
#define TAPE_HEADER_SIZE 1024L
#define TAPE_DATA_SIZE 1048576L
#define TAPE_FRAMES_PER_RECORD 8L
#define TAPE_FRAME_SIZE (TAPE_HEADER_SIZE+TAPE_DATA_SIZE)
#define TAPE_RECORD_SIZE (TAPE_FRAMES_PER_RECORD*TAPE_FRAME_SIZE)
#define TAPE_BUFFER_SIZE (((NSTRIPS*NBYTES*7/4)/TAPE_RECORD_SIZE+1)*TAPE_RECORD_SIZE)
#define TAPE_RECORDS_IN_BUFFER (TAPE_BUFFER_SIZE/TAPE_RECORD_SIZE)
#define TAPE_FRAMES_IN_BUFFER (TAPE_RECORDS_IN_BUFFER*8)
#define TAPE_FRAMES_PER_WU (NBYTES*NSTRIPS/TAPE_DATA_SIZE)
#define WU_OVERLAP_RECORDS 2
#define WU_OVERLAP_FRAMES (TAPE_FRAMES_PER_RECORD*WU_OVERLAP_RECORDS)
#define WU_OVERLAP_BYTES (WU_OVERLAP_FRAMES*TAPE_DATA_SIZE)
#define RECORDER_BUFFER_BYTES (1024L*1024L)
#define RECORDER_BUFFER_SAMPLES (RECORDER_BUFFER_BYTES*4)



/* Arecibo Observatory Parameters */
#define ARECIBO_LAT  18.3538056
#define ARECIBO_LON  (-66.7552222)

#endif
/*
 * $Log: splitparms.h,v $
 * Revision 1.3  2006/11/14 02:19:01  vonkorff
 * Fixed a number of bugs in astropulse Makefile.am and configure.ac
 * Fixed bugs in makefiles
 *
 * Revision 1.2  2003/06/23 22:52:28  boincadm
 * *** empty log message ***
 *
 * Revision 1.1  2003/02/26 00:04:07  pauld
 * Initial revision
 *
 * Revision 2.9  2000/12/01 01:13:29  korpela
 * *** empty log message ***
 *
 * Revision 2.8  1999/10/20 19:20:26  korpela
 * *** empty log message ***
 *
 * Revision 2.7  1999/06/07 21:00:52  korpela
 * *** empty log message ***
 *
 * Revision 2.6  1999/03/27  16:19:35  korpela
 * *** empty log message ***
 *
 * Revision 2.5  1999/03/05  01:47:18  korpela
 * Added data_class field.
 *
 * Revision 2.4  1999/02/23  18:57:09  korpela
 * *** empty log message ***
 *
 * Revision 2.3  1999/02/22  22:21:09  korpela
 * Changed version number.
 *
 * Revision 2.2  1999/02/11  16:46:28  korpela
 * Added WU_FILESIZE, RECORDER_BUFFER_BYTES, RECORDER_BUFFER_SAMPLES.`
 *
 * Revision 2.1  1998/11/02  16:38:29  korpela
 * Variable type changes.
 *
 * Revision 2.0  1998/10/30  22:00:04  korpela
 * Conversion to C++ and merger with client source tree.
 *
 * Revision 1.4  1998/10/27  01:10:04  korpela
 * Bug fixes.
 *
 * Revision 1.3  1998/10/19  23:06:40  korpela
 * Added UTC and AST definition.
 * Added ARECIBO_LAT and ARECIBO_LON definitions.
 *
 * Revision 1.2  1998/10/16  19:22:14  korpela
 * Reduced WU file size from 512K to 256K.
 *
 * Revision 1.1  1998/10/15  16:39:51  korpela
 * Initial revision
 *
 */
 
