Appendix b. data conversion computer program – Campbell Scientific DCP100 GOES Data Collection Platform User Manual
Page 27
B-1
APPENDIX B. DATA CONVERSION COMPUTER PROGRAM
(WRITTEN IN BASIC)
1
REM THIS PROGRAM CONVERTS 3-BYTE ASCII DATA INTO DECIMAL
5
INPUT "RECEIVE FILE?", RF$
6
OPEN RF$ FOR OUTPUT AS #2
10
INPUT "NAME OF FILE CONTAINING GOES DATA"; NFL$
20
DIM DV$(200)
25
WIDTH "LPT1:", 120
30
OPEN NFL$ FOR INPUT AS #1
40
WHILE NOT EOF(1)
50
LINE INPUT #1, A$
55
A$ = MID$(A$, 38)
56
PRINT A$
100
J = INT(LEN(A$) / 3)
105
PRINT J
110
FOR I = 1 TO J
120
DV$(I) = MID$(A$, 3 * I - 2, 3)
130
NEXT I
140
B$ = RIGHT$(A$, LEN(A$) - 3 * J)
160
A$ = B$ + A$
170
K = INT(LEN(A$) / 3)
180
L = J
190
FOR I = J + 1 TO L
200
DV$(I) = MID$(A$, 3 * (I - J) - 2, 3)
210
NEXT I
270
FOR I = 1 TO L
280
A = ASC(LEFT$(DV$(I), 1)) AND 15
290
B = ASC(MID$(DV$(I), 2, 1)) AND 63
300
C = ASC(RIGHT$(DV$(I), 1)) AND 63
310
IF (A * 64) + B >= 1008 THEN DV = (B - 48) * 64 + C + 9000: GOTO 400
320
IF A AND 8 THEN SF = -1 ELSE SF = 1
330
IF A AND 4 THEN SF = SF * .01
340
IF A AND 2 THEN SF = SF * .1
350
IF A AND 1 THEN DV = 4096
360
DV = (DV + ((B AND 63) * 64) + (C AND 63)) * SF
400
PRINT #2, USING "####.### "; DV;
405
IF I MOD 17 = 0 THEN PRINT #2, CHR$(13)
406
DV = 0
410
NEXT I
1000
WEND
- 014A Met One Wind Speed Sensor (36 pages)
- 020C Wind Direction Sensor (26 pages)
- 024A-L Met One Wind Direction Sensor (30 pages)
- 03001-L R.M. Young Wind Sentry Set (34 pages)
- 03002, 03101, and 03301 R. M. Young Wind Sentry Sensors (40 pages)
- 034A-L WindSet (16 pages)
- 034B-L Met One Windset (34 pages)
- 036, 038 Spark Gapped Junction Box (6 pages)
- 05103, 05103-45, 05106, and 05305 R. M. Young Wind Monitors (30 pages)
- 083E Relative Humidity and Temperature Sensor (22 pages)
- 0871LH1 Freezing Rain Sensor (31 pages)
- 092 Barometric Pressure Sensor (24 pages)
- 10164-L Water Sampler Control Cable for use with Isco and Sigma Autosamplers (18 pages)
- 107-L Temperature Probe (28 pages)
- 108-LC Temperature Probe for MetData1 (12 pages)
- 108-L Temperature Probe (30 pages)
- 109-L Temperature Probe (30 pages)
- 109SS Temperature Probe (32 pages)
- 110PV Surface Temperature Probe (32 pages)
- 21108 RF450 Demo Kit (14 pages)
- 223-L Delmhorst Cylindrical Soil Moisture Block (28 pages)
- 227-L Delmhorst Cylindrical Soil Moisture Block (24 pages)
- 229 Water Matric Potential Sensor and CE4/CE8 (34 pages)
- 237-L Leaf Wetness Sensor (14 pages)
- 247-L Conductivity and Temperature (18 pages)
- 253-L and 257-L (Watermark 200) Soil Matric Potential Sensors (36 pages)
- 25458 DIN-Rail Terminal Kit (10 pages)
- 255-100 Novalynx Analog Output Evaporation Gauge (16 pages)
- 260-953 Alter-Type Wind Screen for Tipping Bucket Rain Gages (14 pages)
- 27106T Gill Propeller Anemometer (18 pages)
- 30066 Battery Terminal Bus (1 page)
- 380, 385, 380M, 385M Met One Rain Gages (22 pages)
- 3WHB10K 3-Wire Half-Bridge Terminal Input Module (14 pages)
- 43347 RTD Temperature Probe and 43502 Aspirated Radiation Shield (40 pages)
- 4386 Battery Terminal Bus (1 page)
- 4WFB120, 4WFB350, 4WFB1K 4-Wire Full Bridge Terminal Input Module (22 pages)
- 4WFBS120, 4WFBS350, 4WFBS1K 4 Wire Full Bridge Terminal Input Modules (46 pages)
- 4WPB100, 4WPB1K PRT Terminal Input Modules (16 pages)
- 52202 Electrically Heated Rain and Snow Gage (16 pages)
- 9522B Iridium Satellite Modem and COM9522B Interface Modem (46 pages)
- A100LK Anemometer (18 pages)
- A150 Desiccated Case (12 pages)
- A21REL-12 Relay Driver (10 pages)
- A6REL-12 Relay Driver (12 pages)
- AL200 ALERT2 Encoder, Modulator, and Sensor Interface (44 pages)