@@ -373,6 +373,7 @@ function parsePCFH(xdata) {
373373}
374374
375375function calculateFLASHBWaterVapour ( S , B , P , T ) {
376+ // This code is incomplete as I don't have reference values
376377 var K1 = 0 ;
377378 var K2 = 0 ;
378379 var U = 0 ;
@@ -420,19 +421,19 @@ function parseFLASHB(xdata, pressure, temperature) {
420421 _output [ 'flashb_photomultiplier_counts' ] = _photomultiplier_counts ;
421422
422423 _photomultiplier_temperature = parseInt ( xdata . substr ( 13 , 4 ) , 16 ) ;
423- _photomultiplier_temperature = ( - 21.103 * Math . log ( ( _photomultiplier_temperature * 0.0183 ) / ( 2.49856 - ( _photomultiplier_temperature * 0.00061 ) ) ) ) + 97.106 ;
424+ _photomultiplier_temperature = ( - 21.103 * Math . log ( ( _photomultiplier_temperature * 0.0183 ) / ( 2.49856 - ( _photomultiplier_temperature * 0.00061 ) ) ) ) + 97.106 ; // Degrees C
424425 _output [ 'flashb_photomultiplier_temperature' ] = Math . round ( _photomultiplier_temperature * 100 ) / 100 ; // 2 DP
425426
426427 _battery_voltage = parseInt ( xdata . substr ( 17 , 4 ) , 16 ) ;
427- _battery_voltage = _battery_voltage * 0.005185 ;
428+ _battery_voltage = _battery_voltage * 0.005185 ; // V
428429 _output [ 'flashb_battery_voltage' ] = Math . round ( _battery_voltage * 100 ) / 100 ; // 2 DP
429430
430431 _yuv_current = parseInt ( xdata . substr ( 21 , 4 ) , 16 ) ;
431- _yuv_current = _yuv_current * 0.0101688 ;
432+ _yuv_current = _yuv_current * 0.0101688 ; // mA
432433 _output [ 'flashb_yuv_current' ] = Math . round ( _yuv_current * 100 ) / 100 ; // 2 DP
433434
434435 _pmt_voltage = parseInt ( xdata . substr ( 25 , 4 ) , 16 ) ;
435- _pmt_voltage = _pmt_voltage * 0.36966 ;
436+ _pmt_voltage = _pmt_voltage * 0.36966 ; // V
436437 _output [ 'flashb_pmt_voltage' ] = Math . round ( _pmt_voltage * 10 ) / 10 ; // 1 DP
437438
438439 _firmware_version = parseInt ( xdata . substr ( 29 , 2 ) , 16 ) ;
0 commit comments