Conversion of coded binary data values coming from the DOP1000 ultrasonic velocimeter

Extracting velocity values with a velocity offset value different from 0
Related software: 5.23.3

The formula given on the DOP1000 user's manual version 5.23 Rev. 1.0, page 11.6, is only valid if the value of the velocity offset is zero, which means an equivalent scale for the positive and negative velocities. For a non-zero value of the velocity offset, the binary data should be corrected before using the formula. The algorithm below explains how to correct the data.

Val = Val + offset
ICOR = 0
IF Val > 127 then ICOR = -256
IF Val < -128) then ICOR = 256
Val = Val + ICOR
Val = Val - offset

where:

Val is a binary value coming from the DOP1000 binary file (8 bits signed)
offset is the coded velocity offset coming from the DOP1000 binary file. This value could be found at offset 42 in the binary parameter bloc.

The corrected value should have a word format (2 bytes
)