Index: setup.py
===================================================================
--- setup.py	(revision 9f28f0adad4a10229556e2755fc2185284768403)
+++ setup.py	(revision ea6eba191d891b6871947995e25086af8cb69118)
@@ -2,5 +2,5 @@
 # -*- coding: utf-8 -*-
 '''
-    Copyright (C) 2017 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+    Copyright (C) 2017 - 2018 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
 
     This program is free software: you can redistribute it and/or modify
@@ -28,5 +28,5 @@
 setup(
   name="gnuboat",
-  version="0.4.2",
+  version="0.4.3",
   maintainer="EngSaS - Langenbach",
   maintainer_email="info@engsas.de",
Index: src/python/bin/gnuboat
===================================================================
--- src/python/bin/gnuboat	(revision 9f28f0adad4a10229556e2755fc2185284768403)
+++ src/python/bin/gnuboat	(revision ea6eba191d891b6871947995e25086af8cb69118)
@@ -2,5 +2,5 @@
 # -*- coding: utf-8 -*-
 '''
-    Copyright (C) 2016 - 2017 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+    Copyright (C) 2016 - 2018 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
 
     This program is free software: you can redistribute it and/or modify
@@ -34,4 +34,5 @@
 
 from gnuboat import daemon
+from gnuboat.datahandler import loghandler, logdataset
 
 WHITE = 1
@@ -50,6 +51,5 @@
 
 shutdownRequested = None
-nmeafile = None
-nmeaFileDate = None
+log_handler = None
 
 
@@ -69,60 +69,4 @@
             os.system("sudo shutdown -h now")
 
-def log(gpsFix, gpsTime, gpsStatus, latitude, latitudeDirection, longitude,
-        longitudeDirection, courseOverGround, speedOverGround, waterDepth, waterTemperature, transducerValid, logVerbose, logSystemTime):
-    global logdir
-    global nmeafile
-    global nmeaFileDate
-
-    # Only log, if we have a gps fix
-    if gpsFix < 2:
-        if not logVerbose:
-            return
-        gpsStatus = 'V'
-        mode = 'N'
-        if gpsTime is None:
-            gpsTime = datetime.datetime.utcnow()
-    
-    nmeaFileDateShould = datetime.datetime.utcnow().strftime("%Y-%m-%d")
-    mode = 'A'
-    if nmeafile == None or nmeaFileDate is None or nmeaFileDate != nmeaFileDateShould:
-        if nmeafile:
-                nmeafile.close()
-        try:
-            nmeaFileDate = nmeaFileDateShould
-            nmeaLogFile = 'nmea0183-{}.log'.format(nmeaFileDate)
-            nmeafile = open('{}/{}'.format(logdir, nmeaLogFile), 'a', 0)
-        except IOError as error:
-            print('Could not open the logfile: {}'.format(error))
-            sys.exit(2)
-
-    latitude = degreesDecimalToNmea(latitude)
-    longitude = degreesDecimalToNmea(longitude)
-
-    logsystemtime = ""
-    if logsystemtime:
-        logsystemtime = '{}: '.format(datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S"))
-        
-    try:
-        nmeafile.write('{}{}\r\n'.format(logsystemtime, str(pynmea2.RMC('GN', 'RMC',
-                                                     (gpsTime.strftime("%H%M%S"), gpsStatus,
-                                                     '{:02d}{:07.4f}'.format(latitude['degrees'], latitude['minutes']),
-                                                     latitudeDirection,
-                                                     '{:03d}{:07.4f}'.format(longitude['degrees'], longitude['minutes']),
-                                                     longitudeDirection,
-                                                     '{:04.1f}'.format(speedOverGround), '{:04.1f}'.format(courseOverGround),
-                                                     gpsTime.strftime("%d%m%y"), '', '', mode)))))
-        if transducerValid:
-            nmeafile.write('{}{}\r\n'.format(logsystemtime, str(pynmea2.DPT('SD', 'DPT', ('{:05.2f}'.format(waterDepth), '00.00')))))
-            nmeafile.write('{}{}\r\n'.format(logsystemtime, str(pynmea2.MTW('YX', 'MTW', ('{:04.1f}'.format(waterTemperature), 'C')))))
-    except:
-        print('Failed writing to logfile {}'.format(nmeaLogFile))
-        print(traceback.format_exc())
-
-def degreesDecimalToNmea(decimalDegrees):
-    degrees = int(math.floor(decimalDegrees))
-    minutes = 60.0 * (decimalDegrees - degrees)
-    return { 'degrees': degrees, 'minutes': minutes}
-
 def main(argv):
     global rrdfile
@@ -133,5 +77,5 @@
     global displayperiod
     global logdir
-    global nmeafile
+    global log_handler
 
     parser = argparse.ArgumentParser(description='Collects the data from canboat and gpsd and writes them to the rrd database and the nmea log file')
@@ -194,4 +138,5 @@
 
     displayHandler = daemon.DisplayHandler(displayperiod)
+    log_handler = loghandler.LogHandler(logdir)
 
     gpsp = daemon.GpsdPoller(logperiod)
@@ -218,7 +163,9 @@
 
             # append to log
-            log(gpsFix, gpsp.timeUtc(), gpsp.status(), latitude, gpsp.latitudeDirection(),
+            dataset = logdataset.LogDataset(None, gpsp.status(), latitude, gpsp.latitudeDirection(),
                 longitude, gpsp.longitudeDirection(), courseOverGround, speedOverGround,
-                waterDepth, waterTemperature, n2kd.waterDepthValid(), logverbose, logsystemtime)
+                waterDepth, waterTemperature)
+            if not log_handler.gnuboat_write(gpsFix, gpsp.timeUtc(), dataset, n2kd.waterDepthValid(), logverbose, logsystemtime):
+                sys.exit(2)
             
             # display data
@@ -230,6 +177,6 @@
 
     except (KeyboardInterrupt, SystemExit):  # when you press ctrl+c
-        if nmeafile:
-            nmeafile.close()
+        if log_handler:
+            log_handler.gnuboat_close()
         if gpsp.ident is not None:
             gpsp.stop()
Index: src/python/bin/gnuboat-log-converter
===================================================================
--- src/python/bin/gnuboat-log-converter	(revision 9f28f0adad4a10229556e2755fc2185284768403)
+++ src/python/bin/gnuboat-log-converter	(revision ea6eba191d891b6871947995e25086af8cb69118)
@@ -24,7 +24,8 @@
 from enum import Enum
 import csv
-import re
 import tempfile
 import subprocess
+
+from gnuboat.datahandler import loghandler, logdataset
 
 class Format(Enum):
@@ -33,51 +34,12 @@
     GPX = 3
 
-regex_nmea_sentence = re.compile(r"^([^\$!]{0,})([\$!]{1}[\w]{2}[\w]{3}[^\*]+\*[\da-zA-Z]+)$")
-regex_nmea_sentence_without_checksum = re.compile(r"^([^\$!]{0,})([\$!]{1}[\w]{2}[\w]{3}[^\*]+)\*[\da-zA-Z]+$")
-regex_nmea_position_latitude = re.compile(r"^([0-9]{2})([0-9]{2}\.[0-9]+)$")
-regex_nmea_position_longitude = re.compile(r"^([0-9]{3})([0-9]{2}\.[0-9]+)$")
+class CsvCallback:
+    def __init__(self, output_file):
+        self._output_file = output_file
 
-def toFloat(string, current_row):
-    try:
-        return float(string)
-    except ValueError as error:
-        try:
-           return int(string)
-        except ValueError as error:
-           print('INFO: Failed to convert value from line {} into numeric: {}\n      Message: {}'.format(current_row, string, error))
-           return 0
-
-def nmeaLatitudeToDecimalDegrees(nmea_value, current_row):
-    global regex_nmea_position_latitude
-
-    if toFloat(nmea_value, current_row) == 0:
-        return 0
-
-    matches = regex_nmea_position_latitude.match(nmea_value)
-    if matches is None:
-        print('INFO: Failed to convert latitude position value from line {} into decimal degrees: {}'.format(current_row, nmea_value))
-        return
-    decimalDegrees = toFloat(matches.group(1), current_row)
-    decimalMinutes = toFloat(matches.group(2), current_row)
-    return decimalDegrees + (decimalMinutes / 60.0)
-
-def nmeaLongitudeToDecimalDegrees(nmea_value, current_row):
-    global regex_nmea_position_longitude
-
-    if toFloat(nmea_value, current_row) == 0:
-        return 0
-
-    matches = regex_nmea_position_longitude.match(nmea_value)
-    if matches is None:
-        print('INFO: Failed to convert longitude position value from line {} into decimal degrees: {}'.format(current_row, nmea_value))
-        return
-    decimalDegrees = toFloat(matches.group(1), current_row)
-    decimalMinutes = toFloat(matches.group(2), current_row)
-    return decimalDegrees + (decimalMinutes / 60.0)
+    def callback(self, dataset):
+        self._output_file.writerow(dataset.to_dict())
 
 def convertToCsv(input_file_path, output_file_path, errors_ignore, checksums_fix, strip_time):
-    global regex_nmea_sentence
-    global regex_nmea_sentence_without_checksum
-
     try:
         output_file = open(output_file_path, 'w', 0)
@@ -94,55 +56,10 @@
     output_file_csv.writeheader()
 
-    # reading input file
-    try:
-        input_file = open(input_file_path, 'r')
-    except IOError as error:
-        print('ERROR: Could not open the input file: {}'.format(error))
-        sys.exit(3)
-    current_row = 1
-    last_row = None
-    for line in input_file:
-        line = line.strip()
-        if checksums_fix:
-            matches = regex_nmea_sentence_without_checksum.match(line)
-            pynmea_parse_check = False
-        else:
-            matches = regex_nmea_sentence.match(line)
-            pynmea_parse_check = True
-        if matches is None:
-            print('INFO: Failed to parse nmea sentence ({}) at line {}\n'.format(line, current_row))
-            if not errors_ignore:
-                input_file.close()
-                output_file.close()
-                sys.exit(4)
-        else:
-            nmea_sentence = pynmea2.parse(matches.group(2), check=pynmea_parse_check)
-            if nmea_sentence.sentence_type == 'RMC':
-                if last_row is not None:
-                    output_file_csv.writerow(last_row)
-                last_row = {'datetime': '{} {}'.format(nmea_sentence.datestamp, nmea_sentence.timestamp),
-                            'gps_status': nmea_sentence.status,
-                            'latitude': nmeaLatitudeToDecimalDegrees(nmea_sentence.lat, current_row),
-                            'latitude_direction': nmea_sentence.lat_dir,
-                            'longitude': nmeaLongitudeToDecimalDegrees(nmea_sentence.lon, current_row),
-                            'longitude_direction': nmea_sentence.lon_dir,
-                            'speed_over_ground': toFloat(nmea_sentence.spd_over_grnd, current_row),
-                            'course_over_ground': toFloat(nmea_sentence.true_course, current_row),
-                            'water_depth': None,
-                            'water_temperature': None}
-            elif nmea_sentence.sentence_type == 'DPT' and last_row is not None:
-                last_row['water_depth'] = toFloat(nmea_sentence.depth, current_row)
-            elif nmea_sentence.sentence_type == 'MTW' and last_row is not None:
-                last_row['water_temperature'] = toFloat(nmea_sentence.temperature, current_row)
-            current_row += 1
-    if last_row is not None:
-        output_file_csv.writerow(last_row)
+    csv_callback = CsvCallback(output_file_csv)
+    log_handler = loghandler.LogHandler()
+    log_handler.gnuboat_read(input_file_path, csv_callback.callback, checksums_fix, errors_ignore)
     output_file.close()
-    input_file.close()
 
 def convertToNmea0183(input_file_path, output_file_path, errors_ignore, checksums_fix, strip_time):
-    global regex_nmea_sentence
-    global regex_nmea_sentence_without_checksum
-
     try:
         output_file = open(output_file_path, 'w', 0)
@@ -157,16 +74,12 @@
         print('ERROR: Could not open the input file: {}'.format(error))
         sys.exit(3)
+        
+    log_handler = loghandler.LogHandler()
     current_row = 1
     last_row = None
     for line in input_file:
-        line = line.strip()
-        if checksums_fix:
-            matches = regex_nmea_sentence_without_checksum.match(line)
-            pynmea_parse_check = False
-        else:
-            matches = regex_nmea_sentence.match(line)
-            pynmea_parse_check = True
-        if matches is None:
-            print('INFO: Failed to parse nmea sentence ({}) at line {}\n'.format(line, current_row))
+        nmea_sentence = log_handler.parse_nmea_sentence(line, checksums_fix)
+        if nmea_sentence is None:
+            print('INFO: Failed to parse nmea sentence ({}) at line {}'.format(line.strip(), current_row))
             if not errors_ignore:
                 input_file.close()
@@ -174,9 +87,9 @@
                 sys.exit(4)
         else:
-            nmea_sentence = pynmea2.parse(matches.group(2), check=pynmea_parse_check)
-            output_string = str(nmea_sentence)
-            if not strip_time and matches.group(1):
-                output_string = '{}{}'.format(matches.group(1), output_string)
+            output_string = str(nmea_sentence['nmea_sentence'])
+            if not strip_time and nmea_sentence['log_timestamp']:
+                output_string = '{}{}'.format(nmea_sentence['log_timestamp'], output_string)
             output_file.write('{}\r\n'.format(str(output_string)))
+        current_row += 1
     output_file.close()
     input_file.close()
@@ -198,5 +111,5 @@
     errors_ignore = False
     strip_time = False
-	
+
     formats = []
     for file_format in Format:
Index: src/python/gnuboat/__init__.py
===================================================================
--- src/python/gnuboat/__init__.py	(revision 9f28f0adad4a10229556e2755fc2185284768403)
+++ src/python/gnuboat/__init__.py	(revision ea6eba191d891b6871947995e25086af8cb69118)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
 '''
-    Copyright (C) 2017 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+    Copyright (C) 2017 - 2018 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
 
     This program is free software: you can redistribute it and/or modify
@@ -21,2 +21,3 @@
 from daemon.rrdhandler import rrd_create_database
 from daemon.rrdhandler import rrd_update
+from datahandler.loghandler import LogHandler
Index: src/python/gnuboat/datahandler/__init__.py
===================================================================
--- src/python/gnuboat/datahandler/__init__.py	(revision ea6eba191d891b6871947995e25086af8cb69118)
+++ src/python/gnuboat/datahandler/__init__.py	(revision ea6eba191d891b6871947995e25086af8cb69118)
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+'''
+    Copyright (C) 2018 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from .loghandler import LogHandler
+
+__all__ = ["loghandler"]
Index: src/python/gnuboat/datahandler/logdataset.py
===================================================================
--- src/python/gnuboat/datahandler/logdataset.py	(revision ea6eba191d891b6871947995e25086af8cb69118)
+++ src/python/gnuboat/datahandler/logdataset.py	(revision ea6eba191d891b6871947995e25086af8cb69118)
@@ -0,0 +1,106 @@
+    # -*- coding: utf-8 -*-
+'''
+    Copyright (C) 2016 - 2018 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+"""@class Dataset of a log entry
+"""
+class LogDataset:
+	def __init__(self, datetime = None, gps_status = None, latitude = None, latitude_direction = None,
+					longitude = None, longitude_direction = None, speed_over_ground = None,
+					course_over_ground = None, water_depth = None, water_temperature = None):
+		self._datetime = datetime
+		self._gps_status = gps_status
+		self._latitude = latitude
+		self._latitude_direction = latitude_direction
+		self._longitude = longitude
+		self._longitude_direction = longitude_direction
+		self._speed_over_ground = speed_over_ground
+		self._course_over_ground = course_over_ground
+		self._water_depth = water_depth
+		self._water_temperature = water_temperature
+	
+	def datetime(self):
+		return self._datetime
+	
+	def datetime_set(self, datetime):
+		self._datetime = datetime
+	
+	def gps_status(self):
+		return self._gps_status
+	
+	def gps_status_set(self, status):
+		self._gps_status = status
+	
+	def latitude(self):
+		return self._latitude
+	
+	def latitude_set(self, latitude):
+		self._latitude = latitude
+		
+	def latitude_direction(self):
+		return self._latitude_direction
+	
+	def latitude_direction_set(self, direction):
+		self._latitude_direction = direction
+		
+	def longitude(self):
+		return self._longitude
+	
+	def longitude_set(self, longitude):
+		self._longitude = longitude
+		
+	def longitude_direction(self):
+		return self._longitude_direction
+	
+	def longitude_direction_set(self, direction):
+		self._longitude_direction = direction
+		
+	def speed_over_ground(self):
+		return self._speed_over_ground
+	
+	def speed_over_ground_set(self, speed):
+		self._speed_over_ground = speed
+		
+	def course_over_ground(self):
+		return self._course_over_ground
+	
+	def course_over_ground_set(self, course):
+		self._course_over_ground = course
+		
+	def water_depth(self):
+		return self._water_depth
+	
+	def water_depth_set(self, depth):
+		self._water_depth = depth
+		
+	def water_temperature(self):
+		return self._water_temperature
+	
+	def water_temperature_set(self, temperature):
+		self._water_temperature = temperature
+		
+	def to_dict(self):
+		return {'datetime': self.datetime(),
+				'gps_status': self.gps_status(),
+				'latitude': self.latitude(),
+				'latitude_direction': self.latitude_direction(),
+				'longitude': self.longitude(),
+				'longitude_direction': self.longitude_direction(),
+				'speed_over_ground': self.speed_over_ground(),
+				'course_over_ground': self.course_over_ground(),
+				'water_depth': self.water_depth(),
+				'water_temperature': self.water_temperature()}
Index: src/python/gnuboat/datahandler/loghandler.py
===================================================================
--- src/python/gnuboat/datahandler/loghandler.py	(revision ea6eba191d891b6871947995e25086af8cb69118)
+++ src/python/gnuboat/datahandler/loghandler.py	(revision ea6eba191d891b6871947995e25086af8cb69118)
@@ -0,0 +1,187 @@
+    # -*- coding: utf-8 -*-
+'''
+    Copyright (C) 2016 - 2018 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import re
+import pynmea2
+import datetime
+from pytz import timezone
+import traceback
+import math
+
+from gnuboat.datahandler import logdataset
+
+"""@class LogHandler
+"""
+class LogHandler:
+	def __init__(self, log_directory = None):
+		self._regex_nmea_sentence = re.compile(r"^([^\$!]{0,})([\$!]{1}[\w]{2}[\w]{3}[^\*]+\*[\da-zA-Z]+)$")
+		self._regex_nmea_sentence_without_checksum = re.compile(r"^([^\$!]{0,})([\$!]{1}[\w]{2}[\w]{3}[^\*]+)\*[\da-zA-Z]+$")
+		self._regex_nmea_position_latitude = re.compile(r"^([0-9]{2})([0-9]{2}\.[0-9]+)$")
+		self._regex_nmea_position_longitude = re.compile(r"^([0-9]{3})([0-9]{2}\.[0-9]+)$")
+		self._log_directory = log_directory
+		self._nmea_file = None
+		self._nmea_file_date = None
+	
+	def gnuboat_write(self, gps_fix, gps_time, dataset, transducer_valid, log_verbose, log_system_time):
+		# Only log, if we have a gps fix
+		if gps_fix < 2:
+			if not log_verbose:
+				return
+			gps_status = 'V'
+			mode = 'N'
+			if gps_time is None:
+				gps_time = datetime.datetime.utcnow()
+		
+		nmea_file_date_should = datetime.datetime.utcnow().strftime("%Y-%m-%d")
+		mode = 'A'
+		if self._nmea_file == None or self._nmea_file_date is None or self._nmea_file_date != nmea_file_date_should:
+			if self._nmea_file:
+					self._nmea_file.close()
+			try:
+				self._nmea_file_date = nmea_file_date_should
+				nmea_log_file = 'nmea0183-{}.log'.format(self._nmea_file_date)
+				self._nmea_file = open('{}/{}'.format(self._log_directory, nmea_log_file), 'a', 0)
+			except IOError as error:
+				print('Could not open the logfile: {}'.format(error))
+				return False
+		else:
+			nmea_log_file = self._nmea_file.name
+
+		latitude = self._degreesDecimalToNmea(dataset.latitude())
+		longitude = self._degreesDecimalToNmea(dataset.longitude())
+
+		logsystemtime = ""
+		if log_system_time:
+			logsystemtime = '{}: '.format(datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S"))
+			
+		try:
+			self._nmea_file.write('{}{}\r\n'.format(logsystemtime, str(pynmea2.RMC('GN', 'RMC',
+														(gps_time.strftime("%H%M%S"), dataset.gps_status(),
+														'{:02d}{:07.4f}'.format(latitude['degrees'], latitude['minutes']),
+														dataset.latitude_direction(),
+														'{:03d}{:07.4f}'.format(longitude['degrees'], longitude['minutes']),
+														dataset.longitude_direction(),
+														'{:04.1f}'.format(dataset.speed_over_ground()), '{:04.1f}'.format(dataset.course_over_ground()),
+														gps_time.strftime("%d%m%y"), '', '', mode)))))
+			if transducer_valid:
+				self._nmea_file.write('{}{}\r\n'.format(logsystemtime, str(pynmea2.DPT('SD', 'DPT', ('{:05.2f}'.format(dataset.water_depth()), '00.00')))))
+				self._nmea_file.write('{}{}\r\n'.format(logsystemtime, str(pynmea2.MTW('YX', 'MTW', ('{:04.1f}'.format(dataset.water_temperature()), 'C')))))
+			return True
+		except:
+			print('Failed writing to logfile {}'.format(nmea_log_file))
+			print(traceback.format_exc())
+			return False
+		return False
+	
+	def gnuboat_close(self):
+		if self._nmea_file:
+			self._nmea_file.close()
+	
+	def parse_nmea_sentence(self, line, checksum_ingore = False):
+		line = line.strip()
+		if checksum_ingore:
+			matches = self._regex_nmea_sentence_without_checksum.match(line)
+		else:
+			matches = self._regex_nmea_sentence.match(line)
+		if matches is None:
+			return None
+		return {'log_timestamp': matches.group(1), 'nmea_sentence': pynmea2.parse(matches.group(2), not checksum_ingore)}
+	
+	"""	Reads the original gnuboat log files and calls a callable function on all complete LogDataset
+		callback must be of a function wich excepts the LogDataset as a parameter.
+	"""
+	def gnuboat_read(self, input_file_path, callback, checksums_fix = False, errors_ignore = False):
+		# reading input file
+		try:
+			input_file = open(input_file_path, 'r')
+		except IOError as error:
+			print('ERROR: Could not open the input file: {}'.format(error))
+			sys.exit(3)
+		current_row = 1
+		last_row = None
+		for line in input_file:
+			nmea_sentence = self.parse_nmea_sentence(line, checksums_fix)
+			if nmea_sentence is None:
+				print('INFO: Failed to parse nmea sentence ({}) at line {}'.format(line.strip(), current_row))
+				if not errors_ignore:
+					input_file.close()
+					sys.exit(4)
+			else:
+				nmea_sentence = nmea_sentence['nmea_sentence']
+				if nmea_sentence.sentence_type == 'RMC':
+					if last_row is not None:
+						callback(last_row)
+					last_row = logdataset.LogDataset()
+					last_row.datetime_set('{} {}'.format(nmea_sentence.datestamp, nmea_sentence.timestamp))
+					last_row.gps_status_set(nmea_sentence.status)
+					last_row.latitude_set(self._nmeaLatitudeToDecimalDegrees(nmea_sentence.lat, current_row))
+					last_row.latitude_direction_set(nmea_sentence.lat_dir)
+					last_row.longitude_set(self._nmeaLongitudeToDecimalDegrees(nmea_sentence.lon, current_row))
+					last_row.longitude_direction_set(nmea_sentence.lon_dir)
+					last_row.speed_over_ground_set(self._to_float(nmea_sentence.spd_over_grnd, current_row))
+					last_row.course_over_ground_set(self._to_float(nmea_sentence.true_course, current_row))
+					last_row.water_depth_set(None)
+					last_row.water_temperature_set(None)
+				elif nmea_sentence.sentence_type == 'DPT' and last_row is not None:
+					last_row.water_depth_set(self._to_float(nmea_sentence.depth, current_row))
+				elif nmea_sentence.sentence_type == 'MTW' and last_row is not None:
+					last_row.water_temperature_set(self._to_float(nmea_sentence.temperature, current_row))
+			current_row += 1
+		if last_row is not None:
+			callback(last_row)
+		input_file.close()
+
+	def _to_float(self, string, current_row):
+		try:
+			return float(string)
+		except ValueError as error:
+			try:
+				return int(string)
+			except ValueError as error:
+				print('INFO: Failed to convert value from line {} into numeric: {}\n      Message: {}'.format(current_row, string, error))
+				return 0
+
+	def _nmeaLatitudeToDecimalDegrees(self, nmea_value, current_row):
+		if self._to_float(nmea_value, current_row) == 0:
+			return 0
+
+		matches = self._regex_nmea_position_latitude.match(nmea_value)
+		if matches is None:
+			print('INFO: Failed to convert latitude position value from line {} into decimal degrees: {}'.format(current_row, nmea_value))
+			return
+		decimalDegrees = self._to_float(matches.group(1), current_row)
+		decimalMinutes = self._to_float(matches.group(2), current_row)
+		return decimalDegrees + (decimalMinutes / 60.0)
+
+	def _nmeaLongitudeToDecimalDegrees(self, nmea_value, current_row):
+		if self._to_float(nmea_value, current_row) == 0:
+			return 0
+
+		matches = self._regex_nmea_position_longitude.match(nmea_value)
+		if matches is None:
+			print('INFO: Failed to convert longitude position value from line {} into decimal degrees: {}'.format(current_row, nmea_value))
+			return
+		decimalDegrees = self._to_float(matches.group(1), current_row)
+		decimalMinutes = self._to_float(matches.group(2), current_row)
+		return decimalDegrees + (decimalMinutes / 60.0)
+
+
+	def _degreesDecimalToNmea(self, decimalDegrees):
+		degrees = int(math.floor(decimalDegrees))
+		minutes = 60.0 * (decimalDegrees - degrees)
+		return { 'degrees': degrees, 'minutes': minutes}
