Skip to content

Commit

Permalink
Merge pull request #1496 from dwcaress/caress-tmp
Browse files Browse the repository at this point in the history
Fixes to mblist and support for the kmall format
  • Loading branch information
dwcaress authored Dec 8, 2024
2 parents 2e00b4c + fbe30ca commit 9daa5d3
Show file tree
Hide file tree
Showing 9 changed files with 294 additions and 116 deletions.
7 changes: 5 additions & 2 deletions ChangeLog.html
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ <h3 id="toc_2">MB-System Version 5.8 Releases and Release Notes:</h3>
<hr>

<ul>
<li>Version 5.8.2beta18 November 26, 2024</li>
<li>Version 5.8.2beta18 December 8, 2024</li>
<li>Version 5.8.2beta17 November 7, 2024</li>
<li>Version 5.8.2beta16 November 6, 2024</li>
<li>Version 5.8.2beta15 October 1, 2024</li>
Expand Down Expand Up @@ -390,7 +390,10 @@ <h3 id="toc_2">MB-System Version 5.8 Releases and Release Notes:</h3>

<hr>

<h4 id="toc_3">5.8.2beta18 (November 26, 2024)</h4>
<h4 id="toc_3">5.8.2beta18 (December 8, 2024)</h4>

<p>MBlist: Fixed a critical bug in which mblist would never output from processed files
specified through a datalist using the $PROCESSED tag.</p>

<p>Format MBF_KEMKALL (261): Augmented the i/o module to read and write an undocumented kmall
data record (#MSC) found in EM124 data collected by NERC. Without documentation the record
Expand Down
7 changes: 5 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ or beta, are equally accessible as tarballs through the Github interface.
---
### MB-System Version 5.8 Releases and Release Notes:
---
- Version 5.8.2beta18 November 26, 2024
- Version 5.8.2beta18 December 8, 2024
- Version 5.8.2beta17 November 7, 2024
- Version 5.8.2beta16 November 6, 2024
- Version 5.8.2beta15 October 1, 2024
Expand Down Expand Up @@ -51,7 +51,10 @@ or beta, are equally accessible as tarballs through the Github interface.

---

#### 5.8.2beta18 (November 26, 2024)
#### 5.8.2beta18 (December 8, 2024)

MBlist: Fixed a critical bug in which mblist would never output from processed files
specified through a datalist using the $PROCESSED tag.

Format MBF_KEMKALL (261): Augmented the i/o module to read and write an undocumented kmall
data record (#MSC) found in EM124 data collected by NERC. Without documentation the record
Expand Down
Binary file modified ChangeLog.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion src/mbio/mb_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

/* Define version and date for this release */
#define MB_VERSION "5.8.2beta18"
#define MB_VERSION_DATE "26 November 2024"
#define MB_VERSION_DATE "8 December 2024"

/* CMake supports current OS's and so there is only one form of RPC and XDR and no mb_config.h file */
#ifdef CMAKE_BUILD_SYSTEM
Expand Down
268 changes: 188 additions & 80 deletions src/mbio/mbsys_kmbes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2197,30 +2197,57 @@ int mbsys_kmbes_extract_nav(int verbose, void *mbio_ptr, void *store_ptr, int *k
*time_d = store->time_d;

/* get navigation */
*navlon = skm->sample[0].KMdefault.longitude_deg;
*navlat = skm->sample[0].KMdefault.latitude_deg;

/* get speed */
*speed = 3.6 * sqrt(skm->sample[0].KMdefault.velNorth
* skm->sample[0].KMdefault.velNorth
+ skm->sample[0].KMdefault.velEast
* skm->sample[0].KMdefault.velEast);
if ((skm->infoPart.sensorDataContents & 0x00000001) && skm->infoPart.numSamplesArray > 0) {
*navlon = skm->sample[0].KMdefault.longitude_deg;
*navlat = skm->sample[0].KMdefault.latitude_deg;
*speed = 3.6 * sqrt(skm->sample[0].KMdefault.velNorth
* skm->sample[0].KMdefault.velNorth
+ skm->sample[0].KMdefault.velEast
* skm->sample[0].KMdefault.velEast);
}
else if (mb_io_ptr->nfix > 0) {
mb_navint_interp(verbose, mbio_ptr, store->time_d, *heading, *speed, navlon, navlat, speed, error);
}
else {
*navlon = xmt->xmtPingInfo.longitude;
*navlat = xmt->xmtPingInfo.latitude;
*speed = 3.6 * xmt->xmtPingInfo.speed;
}

/* get heading */
*heading = skm->sample[0].KMdefault.heading_deg;
if ((skm->infoPart.sensorDataContents & 0x00000004) && skm->infoPart.numSamplesArray > 0) {
*heading = skm->sample[0].KMdefault.heading_deg;
}
else if (mb_io_ptr->nheading > 0) {
mb_hedint_interp(verbose, mbio_ptr, store->time_d, heading, error);
}
else {
*heading = xmt->xmtPingInfo.heading;
}

/* get draft */
if (mb_io_ptr->nsensordepth > 0) {
mb_depint_interp(verbose, mbio_ptr, *time_d, draft, error);
*heave = 0.0;
} else {
*draft = mrz->pingInfo.txTransducerDepth_m;
}
else {
*draft = xmt->xmtPingInfo.sensordepth;
}

/* get attitude */
*roll = skm->sample[0].KMdefault.roll_deg;
*pitch = skm->sample[0].KMdefault.pitch_deg;
*heave = skm->sample[0].KMdefault.heave_m;
if ((skm->infoPart.sensorDataContents & 0x00000002) && skm->infoPart.numSamplesArray > 0) {
*roll = skm->sample[0].KMdefault.roll_deg;
*pitch = skm->sample[0].KMdefault.pitch_deg;
*heave = skm->sample[0].KMdefault.heave_m;
}
else if (mb_io_ptr->nattitude > 0) {
mb_attint_interp(verbose, mbio_ptr, store->time_d, heave, roll, pitch, error);
}
else {
*roll = xmt->xmtPingInfo.roll;
*pitch = xmt->xmtPingInfo.pitch;
*heave = xmt->xmtPingInfo.heave;
}

/* done translating values */
}
Expand All @@ -2233,30 +2260,57 @@ int mbsys_kmbes_extract_nav(int verbose, void *mbio_ptr, void *store_ptr, int *k
*time_d = store->time_d;

/* get navigation */
*navlon = skm->sample[0].KMdefault.longitude_deg;
*navlat = skm->sample[0].KMdefault.latitude_deg;

/* get speed */
*speed = 3.6 * sqrt(skm->sample[0].KMdefault.velNorth
* skm->sample[0].KMdefault.velNorth
+ skm->sample[0].KMdefault.velEast
* skm->sample[0].KMdefault.velEast);
if ((skm->infoPart.sensorDataContents & 0x00000001) && skm->infoPart.numSamplesArray > 0) {
*navlon = skm->sample[0].KMdefault.longitude_deg;
*navlat = skm->sample[0].KMdefault.latitude_deg;
*speed = 3.6 * sqrt(skm->sample[0].KMdefault.velNorth
* skm->sample[0].KMdefault.velNorth
+ skm->sample[0].KMdefault.velEast
* skm->sample[0].KMdefault.velEast);
}
else if (mb_io_ptr->nfix > 0) {
mb_navint_interp(verbose, mbio_ptr, store->time_d, *heading, *speed, navlon, navlat, speed, error);
}
else {
*navlon = xmt->xmtPingInfo.longitude;
*navlat = xmt->xmtPingInfo.latitude;
*speed = 3.6 * xmt->xmtPingInfo.speed;
}

/* get heading */
*heading = skm->sample[0].KMdefault.heading_deg;
if ((skm->infoPart.sensorDataContents & 0x00000004) && skm->infoPart.numSamplesArray > 0) {
*heading = skm->sample[0].KMdefault.heading_deg;
}
else if (mb_io_ptr->nheading > 0) {
mb_hedint_interp(verbose, mbio_ptr, store->time_d, heading, error);
}
else {
*heading = xmt->xmtPingInfo.heading;
}

/* get draft */
if (mb_io_ptr->nsensordepth > 0) {
mb_depint_interp(verbose, mbio_ptr, *time_d, draft, error);
*heave = 0.0;
} else {
*draft = mrz->pingInfo.txTransducerDepth_m;
}
else {
*draft = xmt->xmtPingInfo.sensordepth;
}

/* get attitude */
*roll = skm->sample[0].KMdefault.roll_deg;
*pitch = skm->sample[0].KMdefault.pitch_deg;
*heave = skm->sample[0].KMdefault.heave_m;
if ((skm->infoPart.sensorDataContents & 0x00000002) && skm->infoPart.numSamplesArray > 0) {
*roll = skm->sample[0].KMdefault.roll_deg;
*pitch = skm->sample[0].KMdefault.pitch_deg;
*heave = skm->sample[0].KMdefault.heave_m;
}
else if (mb_io_ptr->nattitude > 0) {
mb_attint_interp(verbose, mbio_ptr, store->time_d, heave, roll, pitch, error);
}
else {
*roll = xmt->xmtPingInfo.roll;
*pitch = xmt->xmtPingInfo.pitch;
*heave = xmt->xmtPingInfo.heave;
}

/* done translating values */
}
Expand Down Expand Up @@ -2471,32 +2525,59 @@ int mbsys_kmbes_extract_nnav(int verbose, void *mbio_ptr, void *store_ptr, int n
/* get time */
time_d[i] = skm->sample[i].KMdefault.time_sec + 0.000000001 * skm->sample[i].KMdefault.time_nanosec;
mb_get_date(verbose, time_d[i], &time_i[7*i]);

/* get navigation */
navlon[i] = skm->sample[i].KMdefault.longitude_deg;
navlat[i] = skm->sample[i].KMdefault.latitude_deg;

/* get speed */
speed[i] = 3.6 * sqrt(skm->sample[i].KMdefault.velNorth
* skm->sample[i].KMdefault.velNorth
+ skm->sample[i].KMdefault.velEast
* skm->sample[i].KMdefault.velEast);

/* get heading */
heading[i] = skm->sample[i].KMdefault.heading_deg;

/* get draft */
if (mb_io_ptr->nsensordepth > 0) {
mb_depint_interp(verbose, mbio_ptr, time_d[i], &draft[i], error);
heave[i] = 0.0;
} else {
draft[i] = mrz->pingInfo.txTransducerDepth_m;
}

/* get attitude */
roll[i] = skm->sample[i].KMdefault.roll_deg;
pitch[i] = skm->sample[i].KMdefault.pitch_deg;
heave[i] = skm->sample[i].KMdefault.heave_m;

/* get heading */
if ((skm->infoPart.sensorDataContents & 0x00000004) && skm->infoPart.numSamplesArray > 0) {
heading[i] = skm->sample[i].KMdefault.heading_deg;
}
else if (mb_io_ptr->nheading > 0) {
mb_hedint_interp(verbose, mbio_ptr, time_d[i], &heading[i], error);
}
else {
heading[i] = xmt->xmtPingInfo.heading;
}

/* get navigation */
if ((skm->infoPart.sensorDataContents & 0x00000001) && skm->infoPart.numSamplesArray > 0) {
navlon[i] = skm->sample[i].KMdefault.longitude_deg;
navlat[i] = skm->sample[i].KMdefault.latitude_deg;
speed[i] = 3.6 * sqrt(skm->sample[i].KMdefault.velNorth
* skm->sample[i].KMdefault.velNorth
+ skm->sample[i].KMdefault.velEast
* skm->sample[i].KMdefault.velEast);
}
else if (mb_io_ptr->nfix > 0) {
mb_navint_interp(verbose, mbio_ptr, time_d[i], heading[i], speed[i], navlon, navlat, speed, error);
}
else {
navlon[i] = xmt->xmtPingInfo.longitude;
navlat[i] = xmt->xmtPingInfo.latitude;
speed[i] = 3.6 * xmt->xmtPingInfo.speed;
}

/* get draft */
if (mb_io_ptr->nsensordepth > 0) {
mb_depint_interp(verbose, mbio_ptr, time_d[i], &draft[i], error);
heave[i] = 0.0;
}
else {
draft[i] = xmt->xmtPingInfo.sensordepth;
}

/* get attitude */
if ((skm->infoPart.sensorDataContents & 0x00000002) && skm->infoPart.numSamplesArray > 0) {
roll[i] = skm->sample[i].KMdefault.roll_deg;
pitch[i] = skm->sample[i].KMdefault.pitch_deg;
heave[i] = skm->sample[i].KMdefault.heave_m;
}
else if (mb_io_ptr->nattitude > 0) {
mb_attint_interp(verbose, mbio_ptr, time_d[i], &heave[i], &roll[i], &pitch[i], error);
}
else {
roll[i] = xmt->xmtPingInfo.roll;
pitch[i] = xmt->xmtPingInfo.pitch;
heave[i] = xmt->xmtPingInfo.heave;
}
}

/* done translating values */
Expand All @@ -2509,32 +2590,59 @@ int mbsys_kmbes_extract_nnav(int verbose, void *mbio_ptr, void *store_ptr, int n
/* get time */
time_d[i] = skm->sample[i].KMdefault.time_sec + 0.000000001 * skm->sample[i].KMdefault.time_nanosec;
mb_get_date(verbose, time_d[i], &time_i[7*i]);

/* get navigation */
navlon[i] = skm->sample[i].KMdefault.longitude_deg;
navlat[i] = skm->sample[i].KMdefault.latitude_deg;

/* get speed */
speed[i] = 3.6 * sqrt(skm->sample[i].KMdefault.velNorth
* skm->sample[i].KMdefault.velNorth
+ skm->sample[i].KMdefault.velEast
* skm->sample[i].KMdefault.velEast);

/* get heading */
heading[i] = skm->sample[i].KMdefault.heading_deg;

/* get draft */
if (mb_io_ptr->nsensordepth > 0) {
mb_depint_interp(verbose, mbio_ptr, time_d[i], &draft[i], error);
heave[i] = 0.0;
} else {
draft[i] = mrz->pingInfo.txTransducerDepth_m;
}

/* get attitude */
roll[i] = skm->sample[i].KMdefault.roll_deg;
pitch[i] = skm->sample[i].KMdefault.pitch_deg;
heave[i] = skm->sample[i].KMdefault.heave_m;

/* get heading */
if ((skm->infoPart.sensorDataContents & 0x00000004) && skm->infoPart.numSamplesArray > 0) {
heading[i] = skm->sample[i].KMdefault.heading_deg;
}
else if (mb_io_ptr->nheading > 0) {
mb_hedint_interp(verbose, mbio_ptr, time_d[i], &heading[i], error);
}
else {
heading[i] = xmt->xmtPingInfo.heading;
}

/* get navigation */
if ((skm->infoPart.sensorDataContents & 0x00000001) && skm->infoPart.numSamplesArray > 0) {
navlon[i] = skm->sample[i].KMdefault.longitude_deg;
navlat[i] = skm->sample[i].KMdefault.latitude_deg;
speed[i] = 3.6 * sqrt(skm->sample[i].KMdefault.velNorth
* skm->sample[i].KMdefault.velNorth
+ skm->sample[i].KMdefault.velEast
* skm->sample[i].KMdefault.velEast);
}
else if (mb_io_ptr->nfix > 0) {
mb_navint_interp(verbose, mbio_ptr, time_d[i], heading[i], speed[i], navlon, navlat, speed, error);
}
else {
navlon[i] = xmt->xmtPingInfo.longitude;
navlat[i] = xmt->xmtPingInfo.latitude;
speed[i] = 3.6 * xmt->xmtPingInfo.speed;
}

/* get draft */
if (mb_io_ptr->nsensordepth > 0) {
mb_depint_interp(verbose, mbio_ptr, time_d[i], &draft[i], error);
heave[i] = 0.0;
}
else {
draft[i] = xmt->xmtPingInfo.sensordepth;
}

/* get attitude */
if ((skm->infoPart.sensorDataContents & 0x00000002) && skm->infoPart.numSamplesArray > 0) {
roll[i] = skm->sample[i].KMdefault.roll_deg;
pitch[i] = skm->sample[i].KMdefault.pitch_deg;
heave[i] = skm->sample[i].KMdefault.heave_m;
}
else if (mb_io_ptr->nattitude > 0) {
mb_attint_interp(verbose, mbio_ptr, time_d[i], &heave[i], &roll[i], &pitch[i], error);
}
else {
roll[i] = xmt->xmtPingInfo.roll;
pitch[i] = xmt->xmtPingInfo.pitch;
heave[i] = xmt->xmtPingInfo.heave;
}
}

/* done translating values */
Expand Down
13 changes: 12 additions & 1 deletion src/mbio/mbsys_kmbes.h
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,18 @@ struct mbsys_kmbes_skm_info {
* 1 = data is available
* The bit pattern is used to determine sensorStatus from status field in
* #KMB samples. Only data available from sensor is check up against
* invalid/reduced performance in status, and summaries in sensorStatus. */
* invalid/reduced performance in status, and summaries in sensorStatus.
*
* bit
* ---
* 0 Horizontal position and velocity
* 1 Roll and pitch
* 2 Heading
* 3 Heave
* 4 Acceleration
* 5 Delayed heave
* 6 Delayed heave
*/
};


Expand Down
Loading

0 comments on commit 9daa5d3

Please sign in to comment.