Skip to content

Commit 84b61d4

Browse files
authored
Merge pull request #1542 from dwcaress/caress-tmp
Changes for 5.8.3beta08
2 parents 7f0285d + 4c0e1be commit 84b61d4

20 files changed

Lines changed: 792 additions & 543 deletions

ChangeLog.html

Lines changed: 458 additions & 441 deletions
Large diffs are not rendered by default.

ChangeLog.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ or beta, are equally accessible as tarballs through the Github interface.
2222
---
2323
### MB-System Version 5.8 Releases and Release Notes:
2424
---
25-
- Version 5.8.3beta07 October 22, 2025
25+
- Version 5.8.3beta08 November 16, 2025
26+
- Version 5.8.3beta07 October 22, 2025
2627
- Version 5.8.3beta06 October 1, 2025
2728
- Version 5.8.3beta05 September 30, 2025
2829
- Version 5.8.3beta04 September 18, 2025
@@ -65,6 +66,19 @@ or beta, are equally accessible as tarballs through the Github interface.
6566

6667
---
6768

69+
#### 5.8.3beta08 (November 16, 2025)
70+
71+
Programs mbedit and mbeditviz: Now display dual swath Kongsberg multibeam data in the
72+
kmall format (id 261) with two separate acrosstrack profiles. As before the two profiles
73+
are associated with a single ping cycle and set of datagrams.
74+
75+
Format MBF_3DWISSL2 (id 234): Updates to handle the evolving representation for the
76+
3D at Depth 2nd generation Wide Swath Subsea Lidar (WiSSL2)
77+
78+
Programs mbphotomosaic, mbgetphotocorrection, and mbphotogrammetry: Augmented to handle
79+
seafloor photographs that have already been rectified (corrected for distortion). This
80+
capability has not been fully tested at this point.
81+
6882
#### 5.8.3beta07 (October 22, 2025)
6983

7084
Program mbeditviz: Fixed display of swath width when navigation is selected in the survey

ChangeLog.pdf

2.42 KB
Binary file not shown.

build-utils/FindGMT.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ if(UNIX AND NOT GMT_FOUND)
3838
/opt/local # MacPorts
3939
/opt/local/lib/gmt6
4040
/opt/local/lib/gmt5
41+
/opt/homebrew # Homebrew
4142
/opt/csw # Blastwave
4243
/opt
4344
/usr/local)
@@ -90,6 +91,7 @@ find_path(
9091
/opt/local # MacPorts
9192
/opt/local/lib/gmt6
9293
/opt/local/lib/gmt5
94+
/opt/homebrew # Homebrew
9395
/opt/csw # Blastwave
9496
/opt
9597
/usr/local)
@@ -105,6 +107,7 @@ if (NOT GMT_LIBRARY)
105107
/opt/local # MacPorts
106108
/opt/local/lib/gmt6
107109
/opt/local/lib/gmt5
110+
/opt/homebrew # Homebrew
108111
/opt/csw # Blastwave
109112
/opt
110113
/usr/local)
@@ -120,6 +123,7 @@ find_library(
120123
/opt/local # MacPorts
121124
/opt/local/lib/gmt6
122125
/opt/local/lib/gmt5
126+
/opt/homebrew # Homebrew
123127
/opt/csw # Blastwave
124128
/opt
125129
/usr/local)

build-utils/FindLibPROJ.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ find_path(LibPROJ_INCLUDE_DIR
77
/opt/local
88
/opt/local/lib/proj9
99
/opt/local/lib/proj8
10+
/opt/homebrew
1011
/opt/csw
1112
/opt
1213
/usr/local)
@@ -21,6 +22,7 @@ find_library(LibPROJ_LIBRARY_RELEASE
2122
/opt/local
2223
/opt/local/lib/proj9
2324
/opt/local/lib/proj8
25+
/opt/homebrew
2426
/opt/csw
2527
/opt
2628
/usr/local)
@@ -36,6 +38,7 @@ find_library(LibPROJ_LIBRARY_DEBUG
3638
/opt/local/lib/proj9
3739
/opt/local/lib/proj8
3840
/opt/csw # Blastwave
41+
/opt/homebrew
3942
/opt
4043
/usr/local)
4144
mark_as_advanced(LibPROJ_LIBRARY_DEBUG)

src/mbedit/mbedit_prog.c

Lines changed: 89 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ struct mbedit_ping_struct {
120120
int time_i[7];
121121
double time_d;
122122
int multiplicity;
123+
bool dualprofile;
124+
int dualprofilebeam;
123125
double time_interval;
124126
double navlon;
125127
double navlat;
@@ -131,8 +133,6 @@ struct mbedit_ping_struct {
131133
double pitch;
132134
double heave;
133135
double distance;
134-
bool dualprofile;
135-
int dualprofilebeam;
136136
int beams_bath;
137137
char *beamflag;
138138
char *beamflagorg;
@@ -3940,11 +3940,15 @@ int mbedit_load_data(int buffer_size, int *nloaded, int *nbuffer, int *ngood, in
39403940
&ping[nbuff].sensordepth, &ping[nbuff].beams_bath, &namp, &nss, beamflag, bath, amp, bathacrosstrack,
39413941
bathalongtrack, ss, ssacrosstrack, ssalongtrack, comment, &error);
39423942
if (error <= MB_ERROR_NO_ERROR && kind == MB_DATA_DATA) {
3943+
3944+
/* get navigation */
39433945
if (nbuff > 0)
39443946
ping[nbuff].time_interval = ping[nbuff].time_d - ping[nbuff - 1].time_d;
39453947
status = mb_extract_nav(verbose, imbio_ptr, store_ptr, &kind, ping[nbuff].time_i, &ping[nbuff].time_d,
39463948
&ping[nbuff].navlon, &ping[nbuff].navlat, &speed_nav, &ping[nbuff].heading, &draft,
39473949
&ping[nbuff].roll, &ping[nbuff].pitch, &ping[nbuff].heave, &error);
3950+
3951+
/* check for ping multiplicity */
39483952
const int sensorhead_status = mb_sensorhead(verbose, imbio_ptr, store_ptr, &sensorhead, &sensorhead_error);
39493953
if (sensorhead_status == MB_SUCCESS) {
39503954
ping[nbuff].multiplicity = sensorhead;
@@ -3960,6 +3964,8 @@ int mbedit_load_data(int buffer_size, int *nloaded, int *nbuffer, int *ngood, in
39603964
else
39613965
ping[nbuff].distance = ping[nbuff - 1].distance + ping[nbuff].speed * ping[nbuff].time_interval / 3.6;
39623966
nbeams = ping[nbuff].beams_bath;
3967+
3968+
/* get detect status */
39633969
detect_status = mb_detects(verbose, imbio_ptr, store_ptr, &kind, &nbeams, detect, &detect_error);
39643970
if (detect_status != MB_SUCCESS) {
39653971
status = MB_SUCCESS;
@@ -4043,6 +4049,62 @@ int mbedit_load_data(int buffer_size, int *nloaded, int *nbuffer, int *ngood, in
40434049
ping[nbuff].bath_x[i] = 0;
40444050
ping[nbuff].bath_y[i] = 0;
40454051
}
4052+
4053+
/* check if this is a dual profile (e.g. Kongsberg dual swath) */
4054+
double xtrack_min = 0.0;
4055+
double xtrack_max = 0.0;
4056+
double xtrack_absmax = 0.0;
4057+
bool first = true;
4058+
for (int i = 0; i < ping[nbuff].beams_bath; i++) {
4059+
if (mb_beam_ok(ping[nbuff].beamflag[i])) {
4060+
if (first) {
4061+
xtrack_min = ping[nbuff].bathacrosstrack[i];
4062+
xtrack_max = ping[nbuff].bathacrosstrack[i];
4063+
first = false;
4064+
}
4065+
else {
4066+
xtrack_min = MIN(xtrack_min, ping[nbuff].bathacrosstrack[i]);
4067+
xtrack_max = MAX(xtrack_max, ping[nbuff].bathacrosstrack[i]);
4068+
}
4069+
}
4070+
}
4071+
if (first) {
4072+
for (int i = 0; i < ping[nbuff].beams_bath; i++) {
4073+
if (!mb_beam_ok(ping[nbuff].beamflag[i])
4074+
&& !mb_beam_check_flag_unusable2(ping[nbuff].beamflag[i])) {
4075+
if (first) {
4076+
xtrack_min = ping[nbuff].bathacrosstrack[i];
4077+
xtrack_max = ping[nbuff].bathacrosstrack[i];
4078+
first = false;
4079+
}
4080+
else {
4081+
xtrack_min = MIN(xtrack_min, ping[nbuff].bathacrosstrack[i]);
4082+
xtrack_max = MAX(xtrack_max, ping[nbuff].bathacrosstrack[i]);
4083+
}
4084+
}
4085+
}
4086+
}
4087+
xtrack_absmax = MAX(fabs(xtrack_min), fabs(xtrack_max));
4088+
ping[nbuff].dualprofile = false;
4089+
ping[nbuff].dualprofilebeam = 0;
4090+
first = true;
4091+
double xtrack_old = 0.0;
4092+
for (int i = 0; i < ping[nbuff].beams_bath; i++) {
4093+
if (!mb_beam_check_flag_unusable2(ping[nbuff].beamflag[i])) {
4094+
if (first) {
4095+
xtrack_old = ping[nbuff].bathacrosstrack[i];
4096+
first = false;
4097+
}
4098+
else {
4099+
double xtrack_diff = ping[nbuff].bathacrosstrack[i] - xtrack_old;
4100+
if (xtrack_diff < 0.0 && fabs(xtrack_diff) > 0.5 * xtrack_absmax) {
4101+
ping[nbuff].dualprofile = true;
4102+
ping[nbuff].dualprofilebeam = i;
4103+
}
4104+
xtrack_old = ping[nbuff].bathacrosstrack[i];
4105+
}
4106+
}
4107+
}
40464108
}
40474109
if (status == MB_SUCCESS) {
40484110
nbuff++;
@@ -4207,7 +4269,7 @@ int mbedit_plot_all(int plwd, int exgr, int xntrvl, int yntrvl, int plt_size,
42074269
show_time = sh_time,
42084270

42094271
/* figure out which pings to plot */
4210-
plot_size = plt_size;
4272+
plot_size = plt_size;
42114273
if (current_id + plot_size > nbuff)
42124274
nplot = nbuff - current_id;
42134275
else
@@ -4265,30 +4327,6 @@ int mbedit_plot_all(int plwd, int exgr, int xntrvl, int yntrvl, int plt_size,
42654327
bathmedian = bathlist[nbathlist / 2];
42664328
}
42674329

4268-
/* check for dual profile condition */
4269-
for (int i = current_id; i < current_id + nplot; i++) {
4270-
ping[i].dualprofile = false;
4271-
ping[i].dualprofilebeam = 0;
4272-
bool first = true;
4273-
double xtrack_old = 0.0;
4274-
for (int j = 0; j < ping[i].beams_bath; j++) {
4275-
if (!mb_beam_check_flag_unusable2(ping[i].beamflag[j])) {
4276-
if (first) {
4277-
xtrack_old = ping[i].bathacrosstrack[j];
4278-
first = false;
4279-
}
4280-
else {
4281-
double xtrack_diff = ping[i].bathacrosstrack[j] - xtrack_old;
4282-
if (xtrack_diff < 0.0 && fabs(xtrack_diff) > 0.5 * xtrack_absmax) {
4283-
ping[i].dualprofile = true;
4284-
ping[i].dualprofilebeam = j;
4285-
}
4286-
xtrack_old = ping[i].bathacrosstrack[j];
4287-
}
4288-
}
4289-
}
4290-
}
4291-
42924330
/* reset xtrack_absmax if required */
42934331
if (autoscale && xtrack_absmax < 0.5) {
42944332
xtrack_absmax = 1000.0;
@@ -4380,6 +4418,19 @@ int mbedit_plot_all(int plwd, int exgr, int xntrvl, int yntrvl, int plt_size,
43804418
int sdescent;
43814419
int sxstart;
43824420

4421+
if (ping[current_id].dualprofile) {
4422+
sprintf(string, "Dual Swath per Ping");
4423+
xg_justify(mbedit_xgid, string, &swidth, &sascent, &sdescent);
4424+
xg_drawstring(mbedit_xgid, xcen - swidth / 2, ymin - margin / 2 - sdescent + 5, string, pixel_values[BLACK],
4425+
XG_SOLIDLINE);
4426+
}
4427+
else {
4428+
sprintf(string, "Single Swath per Ping");
4429+
xg_justify(mbedit_xgid, string, &swidth, &sascent, &sdescent);
4430+
xg_drawstring(mbedit_xgid, xcen - swidth / 2, ymin - margin / 2 - sdescent + 5, string, pixel_values[BLACK],
4431+
XG_SOLIDLINE);
4432+
}
4433+
43834434
if (sh_mode == MBEDIT_SHOW_FLAG) {
43844435
sprintf(string, "Sounding Colors by Flagging: Unflagged Manual Filter Sonar");
43854436
xg_justify(mbedit_xgid, string, &swidth, &sascent, &sdescent);
@@ -4609,7 +4660,17 @@ int mbedit_plot_all(int plwd, int exgr, int xntrvl, int yntrvl, int plt_size,
46094660
ping[i].label_y = y;
46104661
for (int j = 0; j < ping[i].beams_bath; j++) {
46114662
if (!mb_beam_check_flag_unusable2(ping[i].beamflag[j])) {
4612-
if (view_mode == MBEDIT_VIEW_WATERFALL) {
4663+
if (view_mode == MBEDIT_VIEW_WATERFALL && ping[i].dualprofile) {
4664+
ping[i].bath_x[j] = (int)(xcen + dxscale * ping[i].bathacrosstrack[j]);
4665+
ping[i].bath_y[j] = (int)(y + dyscale * ((double)ping[i].bath[j] - bathmedian));
4666+
if (j < ping[i].dualprofilebeam) {
4667+
ping[i].bath_y[j] -= (int)(dy/4);
4668+
}
4669+
else {
4670+
ping[i].bath_y[j] += (int)(dy/4);
4671+
}
4672+
}
4673+
else if (view_mode == MBEDIT_VIEW_WATERFALL) {
46134674
ping[i].bath_x[j] = (int)(xcen + dxscale * ping[i].bathacrosstrack[j]);
46144675
ping[i].bath_y[j] = (int)(y + dyscale * ((double)ping[i].bath[j] - bathmedian));
46154676
}

src/mbeditviz/mbeditviz.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ struct mbev_ping_struct {
100100
int time_i[7];
101101
double time_d;
102102
int multiplicity;
103+
bool dualprofile;
104+
int dualprofilebeam;
103105
double navlon;
104106
double navlat;
105107
double navlonx;

src/mbeditviz/mbeditviz_prog.c

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,61 @@ int mbeditviz_load_file(int ifile, bool assertLock) {
929929
&(ping->bathcorr[ibeam]), &(ping->bathlon[ibeam]), &(ping->bathlat[ibeam]));
930930
}
931931
}
932+
933+
/* check for dual profile (e.g. dual swath mode on Kongsberg multibeams) */
934+
ping->dualprofile = false;
935+
ping->dualprofilebeam = 0;
936+
double xtrack_min = 0.0;
937+
double xtrack_max = 0.0;
938+
double xtrack_absmax = 0.0;
939+
bool first = true;
940+
for (int j = 0; j < ping->beams_bath; j++) {
941+
if (mb_beam_ok(ping->beamflag[j])) {
942+
if (first) {
943+
xtrack_min = ping->bathacrosstrack[j];
944+
xtrack_max = ping->bathacrosstrack[j];
945+
first = false;
946+
}
947+
else {
948+
xtrack_min = MIN(xtrack_min, ping->bathacrosstrack[j]);
949+
xtrack_max = MAX(xtrack_max, ping->bathacrosstrack[j]);
950+
}
951+
}
952+
}
953+
if (first) {
954+
for (int j = 0; j < ping->beams_bath; j++) {
955+
if (!mb_beam_check_flag_unusable2(ping->beamflag[j])) {
956+
if (first) {
957+
xtrack_min = ping->bathacrosstrack[j];
958+
xtrack_max = ping->bathacrosstrack[j];
959+
first = false;
960+
}
961+
else {
962+
xtrack_min = MIN(xtrack_min, ping->bathacrosstrack[j]);
963+
xtrack_max = MAX(xtrack_max, ping->bathacrosstrack[j]);
964+
}
965+
}
966+
}
967+
}
968+
first = true;
969+
double xtrack_old = 0.0;
970+
xtrack_absmax = MAX(fabs(xtrack_min), fabs(xtrack_max));
971+
for (int j = 0; j < ping->beams_bath; j++) {
972+
if (!mb_beam_check_flag_unusable2(ping->beamflag[j])) {
973+
if (first) {
974+
xtrack_old = ping->bathacrosstrack[j];
975+
first = false;
976+
}
977+
else {
978+
double xtrack_diff = ping->bathacrosstrack[j] - xtrack_old;
979+
if (xtrack_diff < 0.0 && fabs(xtrack_diff) > 0.5 * xtrack_absmax) {
980+
ping->dualprofile = true;
981+
ping->dualprofilebeam = j;
982+
}
983+
xtrack_old = ping->bathacrosstrack[j];
984+
}
985+
}
986+
}
932987
}
933988

934989
/* extract some more values */
@@ -3372,6 +3427,11 @@ int mbeditviz_selectregion(size_t instance) {
33723427
mbev_selected.soundings[mbev_selected.num_soundings].ifile = ifile;
33733428
mbev_selected.soundings[mbev_selected.num_soundings].iping = iping;
33743429
mbev_selected.soundings[mbev_selected.num_soundings].ibeam = ibeam;
3430+
if (ping->dualprofile && ibeam >= ping->dualprofilebeam) {
3431+
mbev_selected.soundings[mbev_selected.num_soundings].iprofile = 1;
3432+
} else {
3433+
mbev_selected.soundings[mbev_selected.num_soundings].iprofile = 0;
3434+
}
33753435
mbev_selected.soundings[mbev_selected.num_soundings].beamflag = ping->beamflag[ibeam];
33763436
mbev_selected.soundings[mbev_selected.num_soundings].beamflagorg = ping->beamflagorg[ibeam];
33773437
mbev_selected.soundings[mbev_selected.num_soundings].beamcolor = ping->beamcolor[ibeam];
@@ -3544,6 +3604,11 @@ int mbeditviz_selectarea(size_t instance) {
35443604
mbev_selected.soundings[mbev_selected.num_soundings].ifile = ifile;
35453605
mbev_selected.soundings[mbev_selected.num_soundings].iping = iping;
35463606
mbev_selected.soundings[mbev_selected.num_soundings].ibeam = ibeam;
3607+
if (ping->dualprofile && ibeam >= ping->dualprofilebeam) {
3608+
mbev_selected.soundings[mbev_selected.num_soundings].iprofile = 1;
3609+
} else {
3610+
mbev_selected.soundings[mbev_selected.num_soundings].iprofile = 0;
3611+
}
35473612
mbev_selected.soundings[mbev_selected.num_soundings].beamflag = ping->beamflag[ibeam];
35483613
mbev_selected.soundings[mbev_selected.num_soundings].beamflagorg = ping->beamflagorg[ibeam];
35493614
mbev_selected.soundings[mbev_selected.num_soundings].beamcolor = ping->beamcolor[ibeam];
@@ -3704,6 +3769,11 @@ int mbeditviz_selectnav(size_t instance) {
37043769
mbev_selected.soundings[mbev_selected.num_soundings].ifile = ifile;
37053770
mbev_selected.soundings[mbev_selected.num_soundings].iping = iping;
37063771
mbev_selected.soundings[mbev_selected.num_soundings].ibeam = ibeam;
3772+
if (ping->dualprofile && ibeam >= ping->dualprofilebeam) {
3773+
mbev_selected.soundings[mbev_selected.num_soundings].iprofile = 1;
3774+
} else {
3775+
mbev_selected.soundings[mbev_selected.num_soundings].iprofile = 0;
3776+
}
37073777
mbev_selected.soundings[mbev_selected.num_soundings].beamflag = ping->beamflag[ibeam];
37083778
mbev_selected.soundings[mbev_selected.num_soundings].beamflagorg = ping->beamflagorg[ibeam];
37093779
mbev_selected.soundings[mbev_selected.num_soundings].beamcolor = ping->beamcolor[ibeam];

src/mbio/mb_define.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
#include <stdint.h>
3838

3939
/* Define version and date for this release */
40-
#define MB_VERSION "5.8.3beta07"
41-
#define MB_VERSION_DATE "22 October 2025"
40+
#define MB_VERSION "5.8.3beta08"
41+
#define MB_VERSION_DATE "16 November 2025"
4242

4343
/* CMake supports current OS's and so there is only one form of RPC and XDR and no mb_config.h file */
4444
#ifdef CMAKE_BUILD_SYSTEM
@@ -365,7 +365,7 @@ int mb_datalist_readorg(int verbose, void *datalist_ptr, char *path, int *format
365365
int mb_datalist_recursion(int verbose, void *datalist_ptr, bool print, int *recursion, int *error);
366366
int mb_datalist_close(int verbose, void **datalist_ptr, int *error);
367367
int mb_imagelist_open(int verbose, void **imagelist_ptr, char *path, int *error);
368-
int mb_imagelist_read(int verbose, void *imagelist_ptr, int *imagestatus,
368+
int mb_imagelist_read(int verbose, void *imagelist_ptr, int *imagestatus, bool *rectified,
369369
char *path0, char *path1, char *dpath,
370370
double *time_d0, double *time_d1,
371371
double *gain0, double *gain1,

0 commit comments

Comments
 (0)