mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-11 03:21:29 +00:00
Ignore missing pressure values when importing from Shearwater
Shearwater seems to report missing AI sensors as a pressure reading 4092 (raw) which is 564 bar. Signed-off-by: Seppo Takalo <seppo.takalo@iki.fi>
This commit is contained in:
parent
e25cecf37c
commit
6509f2ed9f
1 changed files with 4 additions and 3 deletions
|
@ -2759,11 +2759,12 @@ extern int shearwater_ai_profile_sample(void *handle, int columns, char **data,
|
||||||
if (data[6])
|
if (data[6])
|
||||||
cur_sample->stopdepth.mm = metric ? atoi(data[6]) * 1000 : feet_to_mm(atoi(data[6]));
|
cur_sample->stopdepth.mm = metric ? atoi(data[6]) * 1000 : feet_to_mm(atoi(data[6]));
|
||||||
|
|
||||||
/* Weird unit conversion but seems to produce correct results */
|
/* Weird unit conversion but seems to produce correct results.
|
||||||
if (data[7]) {
|
* Also missing values seems to be reported as a 4092 (564 bar) */
|
||||||
|
if (data[7] && atoi(data[7]) != 4092) {
|
||||||
cur_sample->pressure[0].mbar = psi_to_mbar(atoi(data[7])) * 2;
|
cur_sample->pressure[0].mbar = psi_to_mbar(atoi(data[7])) * 2;
|
||||||
}
|
}
|
||||||
if (data[8])
|
if (data[8] && atoi(data[8]) != 4092)
|
||||||
cur_sample->pressure[1].mbar = psi_to_mbar(atoi(data[8])) * 2;
|
cur_sample->pressure[1].mbar = psi_to_mbar(atoi(data[8])) * 2;
|
||||||
sample_end();
|
sample_end();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue