+
+# official minimuf version of display
+sub dsx
+{
+ my $h = shift;
+ my $rsens = shift;
+ my $dB2 = shift;
+ my $daynight = shift;
+
+ my $c1;
+ my $c2;
+
+ return " " unless $h;
+
+ if (($daynight->[$h] & 3) == 3) {
+ $c1 = 'x';
+ } elsif ($daynight->[$h] & 1) {
+ $c1 = 'j';
+ } elsif ($daynight->[$h] & 2) {
+ $c1 = 'n';
+ }
+ if ($daynight->[$h] & 4) {
+ $c2 = 's';
+ } elsif ($daynight->[$h] & 16) {
+ $c2 = 'm';
+ } else {
+ $c2 = ' ';
+ }
+ return sprintf("%4.0f%s%1d%s", $dB2->[$h] - $rsens, $c1, $h, $c2)
+}
+
+# my version
+sub ds
+{
+ my $h = shift;
+ my $rsens = shift;
+ my $dB2 = shift;
+ my $daynight = shift;
+
+ my $c2;
+
+ return " " unless $h;
+
+ if ($daynight->[$h] & 4) {
+ $c2 = 's';
+ } elsif ($daynight->[$h] & 16) {
+ $c2 = 'm';
+ } else {
+ $c2 = ' ';
+ }
+ my $l = $dB2->[$h] - $rsens;
+ my $s = int $l / 6;
+ $s = 9 if $s > 9;
+ $s = 0 if $s < 0;
+ my $plus = (($l / 6) >= $s + 0.5) ? '+' : ' ';
+
+ return "$c2". "S$s$plus";
+}