Skip to content

Commit 56659d8

Browse files
committed
feat: xdata dfm partial
1 parent 0273a1c commit 56659d8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

js/xdata.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -622,12 +622,14 @@ function parseXDATA(data, pressure, temperature){
622622
_instrument = _current_xdata.substr(0,2);
623623

624624
if (_instrument === '01') {
625-
if (_current_xdata.length = 16) {
626-
// Ozonesonde
627-
_xdata_temp = parseOzonesonde(_current_xdata, pressure);
628-
_output = Object.assign(_output,_xdata_temp);
629-
if (!_instruments.includes("Ozonesonde")) _instruments.push('Ozonesonde');
625+
// Ozonesonde
626+
if (_current_xdata.length != 16) {
627+
_current_xdata = _current_xdata.slice(0, 16);
630628
}
629+
_xdata_temp = parseOzonesonde(_current_xdata, pressure);
630+
_output = Object.assign(_output,_xdata_temp);
631+
if (!_instruments.includes("Ozonesonde")) _instruments.push('Ozonesonde');
632+
631633
} else if (_instrument === '05'){
632634
// OIF411
633635
_xdata_temp = parseOIF411(_current_xdata, pressure);

0 commit comments

Comments
 (0)