Skip to content

Commit 160de96

Browse files
authored
feat: xdata dfm
1 parent c085db4 commit 160de96

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

js/xdata.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -622,12 +622,13 @@ 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');
631632
} else if (_instrument === '05'){
632633
// OIF411
633634
_xdata_temp = parseOIF411(_current_xdata, pressure);

0 commit comments

Comments
 (0)