Changes in / [873002d:713b56e]


Ignore:
Location:
src/python/bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/python/bin/gnuboat-data-generator

    r873002d r713b56e  
    103103        gpsFix = 3
    104104        # update rrd database for the webservice
    105         daemon.rrd_update(rrdfile, '{}:{}:{}:{}:{}:{}:{}:{}:{}'.format(
     105        daemon.rrd_update(rrdfile, '{:s}:{:s}:{:s}:{:s}:{:s}:{:s}:{:s}:{:s}:{:s}'.format(
    106106                       current_time, latitude, longitude, speedThroughWater, speedOverGround, courseOverGround, waterDepth, waterTemperature, gpsFix))
    107107
  • src/python/bin/gnuboat-log-converter

    r873002d r713b56e  
    4343           return int(string)
    4444        except ValueError as error:
    45            print('INFO: Failed to convert value from line {} into numeric: {}\n      Message: {}'.format(current_row, string, error))
     45           print('INFO: Failed to convert value from line %s into numeric: {:s}\n      Message: {:s}'.format(current_row, string, error))
    4646           return 0
    4747
    … …  
    5454    matches = regex_nmea_position.match(nmea_value)
    5555    if matches is None:
    56         print('INFO: Failed to convert position value from line {} into decimal degrees: {}'.format(current_row, nmea_value))
     56        print('INFO: Failed to convert position value from line {:s} into decimal degrees: {:s}'.format(current_row, nmea_value))
    5757        return
    5858    decimalDegrees = toFloat(matches.group(1), current_row)
    … …  
    109109                            'water_depth': None,
    110110                            'water_temperature': None}
    111             elif nmea_sentence.sentence_type == 'DPT' and last_row is not None:
    112                 last_row['water_depth'] = toFloat(nmea_sentence.depth, current_row)
     111            elif nmea_sentence.sentence_type == 'DBT' and last_row is not None:
     112                last_row['water_depth'] = toFloat(nmea_sentence.depth_meters, current_row)
    113113            elif nmea_sentence.sentence_type == 'MTW' and last_row is not None:
    114114                last_row['water_temperature'] = toFloat(nmea_sentence.temperature, current_row)
Note: See TracChangeset for help on using the changeset viewer.