Specifications

58
frequencies as the heave spectrum. In the even bins (0, 2, 4, …, 26), the direction is given as a
8-bit integer:
*360 / 256=Dir i (5.7.17)
which results in a 1.4° accuracy. In the odd bins (1, 3, 5, …, 25), the directional step with
respect to the previous direction is given. For these delta-directions ΔDir, a 4 bit two’s-
complement is used as explained in Table 5.7.16.
Table 5.7.16. Two's-complement representation of ΔDir.
i
ΔDir
i
ΔDir
i
ΔDir
i
ΔDir
0000 0 0100 +4*360/256 1000 NaN 1100 4*360/256
0001 +1*360/256 0101 +5*360/256 1001 7*360/256 1101 3*360/256
0010 +2*360/256 0110 +6*360/256 1010 6*360/256 1110 2*360/256
0011 +3*360/256 0111 +7*360/256 1011 5*360/256 1111 1*360/256
The value 1000 is used for labeling a directional step of magnitude greater than 7*360/256
10°. In that case, the direction in bin l can be approximated as the mean of the adjacent
directions:
11
11
11 11
+−
−+
+− +−
=+
−−
ll ll
ll l
ll ll
ff ff
Dir Dir Dir
ff ff
(5.7.18)
In the odd bins, the spread is specified as a 4 bit number Spr
max
= 78.25, i
max
= 14, b= 8, see
"Transformation of real numbers to integers" below. The even spreads must be constructed from
the adjacent spreads:
11
11
11 11
+−
−+
+− +−
=+
−−
ll ll
ll l
ll ll
ff ff
Spr Spr Spr
ff ff
(5.7.19)
In the first and last bin, the spread is not specified, and interpolation is not possible. Here,
extrapolation could be used. However, negative values must be avoided, since these have no
physical meaning.
30 10
013
31 31
−−
=−
−−
ff ff
Spr Spr Spr
ff ff
(5.7.20)
26 23 26 25
26 25 23
25 23 25 23
=−
−−
ff ff
Spr Spr Spr
ff ff
(5.7.21)
5.7.2.8 Transformation of real numbers to integers
An integer i between 0 and i
max
corresponds to a real number r between 0 and r
max
via:
1
1
/
/
max
max
=
bi
bi
e
e
rr
(5.7.22)
the inverse of which is:
+= )1(1lnint
/
max
max
bi
e
r
r
bi
(5.7.23)