To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

HS50-A.md 3.43 KB
Newer Older
holukas's avatar
holukas committed
1
2
3
4
5
6
7
# HS50-A

## Variables
- U ... First horizontal wind component (x)
- V ... Second horizontal wind component (y)
- W ... Vertical wind component (z)
- T_SONIC ... Sonic temperature
holukas's avatar
holukas committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
- SA_DIAG_TYPE ... Status type indicator (error, inclinometer, configuration)
  - Called ```StaA``` (Status Address) in manual
  - defines which particular aspect of the anemometer the following data field (SA_DIAG_VAL) refers to 
    - 00 Error codes
    - 01 Anemometer configuration
    - 02 Data output configuration 1
    - 03 Data output configuration 2
    - 04 Error code history
    - 05 Transducer gain levels
    - 06 Anemometer Type
    - 07 Inclinometer X axis MSB
    - 08 Inclinometer X axis LSB
    - 09 Inclinometer Y axis MSB
    - 10 Inclinometer Y axis LSB
- SA_DIAG_VAL ... Status value and information
  - Called ```StaD``` (Status Data) in manual
holukas's avatar
holukas committed
24
25
26
27
28
29
30
31
32
33
  - SA_DIAG_VAL is rather complex and can tak on a lot of meanings.
  - Has to be interpreted in combination with SA_DIAG_TYPE, which gives the type
    of SA_DIAG_VAL.    
  - Saved as an integer value, e.g. ```47```.
  - The integer can be converted to binary, e.g. ```47``` becomes ```0b101111``` , whereby the
    first two characters ```0b``` mean that this is binary format.
  - From the binary, detailed information can be extracted, depending on which bits
    in the binary are set to 1 or 0.  
  - Please refer to the manual for detailed information about what the different bits mean
    when they are 1 or zero.
holukas's avatar
holukas committed
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
- INC_XY ... Inclinometer, alternatively x (odd record numbers) and y (even record numbers)

*2017-07-25: EddyPro can currently not handle StaA and StaD, but it will be implemented soon for ICOS requirements*

## BICO Settings
- 'order' ... Order in the data block variable sequence
- 'bytes' ... Number of bytes in the binary data
- 'format' ... Format to convert from binary to integers, floats, etc.
- 'gain_on_signal' ... Gain that was applied to the raw data signal, to get to units *divide* by this gain
- 'offset_on_signal' ... Offset that was added to the raw data signal, to get to units *subtract* this offset
- 'apply_gain' ... Gain that is applied during conversion, e.g. to convert to different units if needed
- 'add_offset' ... Offset that is added during conversion, e.g. to convert to different units if needed
- 'units' ... Units
- 'datablock' ... Data block ID

*Before BICO, the binary conversion was done in FCT FluxCalcTool:*
- Old ID in FCT: hs-50_extended
- Old data block in FCT: data_block_sonic_hs_50_extended
- FCT Source code: --> https://gitlab.ethz.ch/holukas/fct-flux-calculation-tool

## Details
- Extended data logging to comply w/ ICOS requirements.
- Installed first in CH-DAV in 2017-07.
- from WE's email 2017-07-10:
    - the former 4 data bytes containing the two inclinometer angles are now used differently
    - first byte is the StaA byte from the sonic
    - second byte is the StaD byte from the sonic 
    - third and fourth byte are still a short integer as before, but now
     it contains the inclinometer X angle if the record number is an odd number,
     or the inclinometer Y angle if the record number is an even number

## Binary info
- B...unsigned char, integer, 1 Byte
- h...short integer, 2 Bytes
- ">"...big-endian, MSB most-significant Byte at lowest address
     Big-endian systems store the most significant byte of a word in the smallest address
- --> https://docs.python.org/3/library/struct.html
- --> https://docs.python.org/3.1/library/struct.html#format-characters