equal
deleted
inserted
replaced
1 #====================================================================== |
1 #====================================================================== |
2 # F I N D _ S E A B E D . P L |
2 # F I N D _ S E A B E D . P L |
3 # doc: Sun May 23 20:26:11 2010 |
3 # doc: Sun May 23 20:26:11 2010 |
4 # dlm: Thu May 19 10:40:55 2016 |
4 # dlm: Thu Jul 1 09:39:12 2021 |
5 # (c) 2010 A.M. Thurnherr |
5 # (c) 2010 A.M. Thurnherr |
6 # uE-Info: 18 46 NIL 0 0 72 0 2 4 NIL ofnI |
6 # uE-Info: 19 46 NIL 0 0 72 0 2 4 NIL ofnI |
7 #====================================================================== |
7 #====================================================================== |
8 |
8 |
9 # HISTORY: |
9 # HISTORY: |
10 # May 23, 2010: - adapted from [perl-tools/RDI_Utils.pl] |
10 # May 23, 2010: - adapted from [perl-tools/RDI_Utils.pl] |
11 # Dec 25, 2010: - adapted to changes in [LADCP_w] |
11 # Dec 25, 2010: - adapted to changes in [LADCP_w] |
14 # Oct 19, 2011: - added $SS_max_allowed_range |
14 # Oct 19, 2011: - added $SS_max_allowed_range |
15 # - renamed $SS_min_allowed_hab to *_range |
15 # - renamed $SS_min_allowed_hab to *_range |
16 # Jan 26, 2016: - added %PARAMs |
16 # Jan 26, 2016: - added %PARAMs |
17 # May 18, 2016: - removed assumption of 1500m/s soundspeed setting |
17 # May 18, 2016: - removed assumption of 1500m/s soundspeed setting |
18 # May 19, 2016: - updated to ADCP_tools V1.6 |
18 # May 19, 2016: - updated to ADCP_tools V1.6 |
|
19 # Jul 1, 2021: - made %PARAMs more standard |
19 |
20 |
20 # NOTES: |
21 # NOTES: |
21 # 1) BT range is corrected for sound speed at the transducer. This is not |
22 # 1) BT range is corrected for sound speed at the transducer. This is not |
22 # accurate, but unlikely to be very wrong, at least for deep casts, |
23 # accurate, but unlikely to be very wrong, at least for deep casts, |
23 # because the vertical sound speed variability near the seabed tends |
24 # because the vertical sound speed variability near the seabed tends |
36 { |
37 { |
37 my($d,$be,$beamCoords) = @_; |
38 my($d,$be,$beamCoords) = @_; |
38 my($i,$dd,$sd,$nd); |
39 my($i,$dd,$sd,$nd); |
39 my(@guesses); |
40 my(@guesses); |
40 |
41 |
41 &antsAddParams('SS_min_allowed_range',$SS_min_allowed_range, |
42 &antsAddParams('SS_allowed_range.min',$SS_min_allowed_range, |
42 'SS_max_allowed_range',$SS_max_allowed_range, |
43 'SS_allowed_range.max',$SS_max_allowed_range, |
43 'SS_search_window_halfwidth',$SS_search_window_halfwidth, |
44 'SS_search_window_halfwidth',$SS_search_window_halfwidth, |
44 'SS_max_allowed_depth_range',$SS_max_allowed_depth_range); |
45 'SS_allowed_depth_range.max',$SS_max_allowed_depth_range); |
45 |
46 |
46 return undef unless ($be-$SS_search_window_halfwidth >= 0 && |
47 return undef unless ($be-$SS_search_window_halfwidth >= 0 && |
47 $be+$SS_search_window_halfwidth <= $#{$d->{ENSEMBLE}}); |
48 $be+$SS_search_window_halfwidth <= $#{$d->{ENSEMBLE}}); |
48 for ($i=$be-$SS_search_window_halfwidth; $i<=$be+$SS_search_window_halfwidth; $i++) { |
49 for ($i=$be-$SS_search_window_halfwidth; $i<=$be+$SS_search_window_halfwidth; $i++) { |
49 next unless (defined($d->{ENSEMBLE}[$i]->{CTD_DEPTH}) && |
50 next unless (defined($d->{ENSEMBLE}[$i]->{CTD_DEPTH}) && |