00001 00002 /* 00003 * This file is part of Titan2Reader 00004 * 00005 * Copyright (C) 2006, Sebastien Judenherc <sebastien.judenherc@agecodagis.com> 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00020 * USA 00021 * 00022 */ 00023 00024 // version 00025 #define VERSION 2 00026 #define MAJOR 2 00027 #define MINOR 33 00028 //#define SVER "testSEG2 - "__DATE__ 00029 00030 00031 // titan2 definitions 00032 00034 #define CS5323 0 00035 #define AD7710 1 00036 #define HI7190 2 00037 #define CS5321 3 00038 #define ADS1251 10 00039 00040 #define UNCORRECTED 0 00041 #define UNCORRECTABLE 1 00042 #define CORRECTED 2 00043 00044 #define MAX_OSIRIS_CHANNEL 24 00045 #define POWERSUPPLY_CHANNEL (MAX_OSIRIS_CHANNEL+0) 00046 #define TEMPERATURE_CHANNEL (MAX_OSIRIS_CHANNEL+1) 00047 #define MAX_CHANNEL (MAX_OSIRIS_CHANNEL+16) // pseudo channels 00048 00049 00050 #define MAX_SAMPLE 2000 00051 00052 #define PROGRAMNAME "rtitan2" 00053 00054 #ifdef __DJGPP__ 00055 #define int16_t short 00056 #define u_int16_t unsigned short 00057 #define int32_t long 00058 #define u_int32_t unsigned long 00059 #define int64_t long long 00060 #endif 00061 00063 struct DigitizerType { 00064 int32_t adcFrequency; 00065 int32_t adcDecimation; 00066 int32_t adcDecimationLength; 00067 int32_t secondDecimationLength; 00068 int32_t adcId; 00069 double adcDelay; 00070 int ok; 00071 }; 00072 00074 struct PositionType { 00075 float lat, lon, elev; 00076 }; 00077 00079 struct Titan2TimeType { 00080 int64_t usecond; 00081 int correctness; 00082 }; 00083 00085 struct Titan2SRType { 00086 int npts; 00087 int base; 00088 int div; 00089 }; 00090 00092 struct TimeTuningType { 00093 int clockMode; 00094 int clockState; 00095 int step; 00096 float phase; 00097 float drift; 00098 }; 00099 00101 struct info18_t { 00102 int detections; 00103 int mediaBytes; 00104 float batteryVoltage; 00105 int lostFlushLowBatt; 00106 }; 00108 struct info19_t { 00109 int lostFlushMediumError; 00110 int flashCycles; 00111 int flashBytes; 00112 int flushState; 00113 int triggerInProcess; 00114 int mediumError; 00115 int flushRunning; 00116 }; 00117 00119 struct info20_t { 00120 int channels; 00121 int ADCType; 00122 int auxPresent; 00123 int radioMode; 00124 int continuousGPS; 00125 int samplingSet; 00126 int timeKeeper; 00127 int recordingMode; 00128 int recordingMedium; 00129 int flashSize; 00130 int mediumSize; 00131 int internalInfo1; 00132 int parallelLink; 00133 }; 00134 00136 struct info0_3_t { 00137 int ch; 00138 int lta; 00139 int sta; 00140 int srCode; 00141 int threshold; 00142 int active; 00143 int offset; 00144 }; 00145 00147 struct info4_t { 00148 char factory[12]; 00149 }; 00150 00152 struct info5_t { 00153 int preEvent; 00154 int postEvent; 00155 int gain; 00156 int endDuration; 00157 int cycles; 00158 int endDurationMode; 00159 }; 00160 00162 struct info15_t { 00163 int time; 00164 int pulseLength; 00165 int pulseTest; 00166 int PPM; 00167 int reboot; 00168 }; 00169 00171 struct HWConfigType { 00172 int32_t formatVersion,formatMajor,formatMinor; 00173 struct PositionType avgPos; 00174 struct PositionType instantPos; 00175 int32_t satelliteNumber; 00176 char channelName[MAX_CHANNEL][8]; 00177 char locationName[MAX_CHANNEL][8]; 00178 char networkName[8]; 00179 float LSB; 00180 float impedance; 00181 int32_t absOffset[6]; 00182 int32_t relOffset[6]; 00183 int32_t gain[5]; 00184 int32_t selectedGain[MAX_CHANNEL]; 00185 int32_t HPFilter[MAX_CHANNEL]; 00186 char serialNumber[16]; 00187 char fieldIdent[16]; 00188 char softwareRealease[16]; 00189 int32_t diskFillingRate; 00190 float drift; 00191 int driftTime; 00192 struct DigitizerType digitizer; 00193 struct Titan2SRType srObs[MAX_CHANNEL]; 00194 struct Titan2SRType srExp[MAX_CHANNEL]; 00195 int trigger[MAX_CHANNEL]; 00196 struct Titan2TimeType rebootTime; 00197 struct Titan2TimeType resetTime; 00198 struct TimeTuningType tune; 00199 char infoFrame[32][12]; 00200 struct info0_3_t info03[4]; 00201 struct info5_t info5; 00202 struct info15_t info15; 00203 struct info18_t info18; 00204 struct info19_t info19; 00205 struct info20_t info20; 00206 int32_t data[MAX_CHANNEL][MAX_SAMPLE]; 00207 }; 00208
1.5.6