Index: src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183Direction.php
===================================================================
--- src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183Direction.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
+++ src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183Direction.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
@@ -0,0 +1,30 @@
+<?php
+/*
+    Copyright (C) 2017 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/>.
+*/
+
+namespace GnuBoat\Nmea\Nmea0183;
+
+abstract class Nmea0183Direction
+{
+	const North = 'N';
+	const East = 'E';
+	const South = 'S';
+	const West = 'W';
+	const Invalid = false;
+}
+
+?>
Index: src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183Dpt.php
===================================================================
--- src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183Dpt.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
+++ src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183Dpt.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
@@ -0,0 +1,54 @@
+<?php
+/*
+    Copyright (C) 2017 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/>.
+*/
+
+namespace GnuBoat\Nmea\Nmea0183;
+
+class Nmea0183Dpt extends Nmea0183Sentence
+{
+	function __construct($talker, $checksum, $sentence)
+	{
+		parent::__construct("DPT", $talker, $checksum, $sentence);
+		
+		// init default values
+		$this->_depth = 0;
+		$this->_offset = 0;
+		
+		$content = explode(",", $sentence);
+		if(count($content) != 3)
+			return;
+		
+		$this->_depth = $content[1];
+		$tmp = explode("*", $content[2]);
+		$this->_offset = $tmp[0];
+	}
+	
+	public function depth()
+	{
+		return $this->_depth;
+	}
+	
+	public function offset()
+	{
+		return $this->_offset;
+	}
+	
+	private $_depth;
+	private $_offset;
+}
+
+?>
Index: src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183Mtw.php
===================================================================
--- src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183Mtw.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
+++ src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183Mtw.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
@@ -0,0 +1,54 @@
+<?php
+/*
+    Copyright (C) 2017 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/>.
+*/
+
+namespace GnuBoat\Nmea\Nmea0183;
+
+class Nmea0183Mtw extends Nmea0183Sentence
+{
+	function __construct($talker, $checksum, $sentence)
+	{
+		parent::__construct("MTW", $talker, $checksum, $sentence);
+		
+		// init default values
+		$this->_temperature = 0;
+		$this->_unit = "";
+		
+		$content = explode(",", $sentence);
+		if(count($content) != 3)
+			return;
+		
+		$this->_temperature = $content[1];
+		$tmp = explode("*", $content[2]);
+		$this->_unit = $tmp[0];
+	}
+	
+	public function temperature()
+	{
+		return $this->_temperature;
+	}
+	
+	public function unit()
+	{
+		return $this->_unit;
+	}
+	
+	private $_temperature;
+	private $_unit;
+}
+
+?>
Index: src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183Rmc.php
===================================================================
--- src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183Rmc.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
+++ src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183Rmc.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
@@ -0,0 +1,174 @@
+<?php
+/*
+    Copyright (C) 2017 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/>.
+*/
+
+namespace GnuBoat\Nmea\Nmea0183;
+
+class Nmea0183Rmc extends Nmea0183Sentence
+{
+	function __construct($talker, $checksum, $sentence)
+	{
+		parent::__construct("RMC", $talker, $checksum, $sentence);
+		
+		// init default values
+		$this->_dateTimeUtc = null;
+		$this->_status = Nmea0183RmcStatus::V;
+		$this->_latitude = 0;
+		$this->_latitudeDirection = Nmea0183Direction::Invalid;
+		$this->_longitude = 0;
+		$this->_longitudeDirection = Nmea0183Direction::Invalid;
+		$this->_speedOverGround = 0;
+		$this->_courseOverGround = 0;
+		$this->_magneticDeclination = 0;
+		$this->_magneticDeclinationDirection = Nmea0183Direction::Invalid;
+		$this->_signalIntegrity = Nmea0183RmcSignal::DataNotValid;
+		
+		$content = explode(",", $sentence);
+		if(count($content) != 13)
+			return;
+		
+		if(strlen($content[1]) > 6)
+			$this->_dateTimeUtc = \DateTime::createFromFormat('dmy His.u', $content[9] ." ". $content[1], new \DateTimeZone("UTC"));
+		else
+			$this->_dateTimeUtc = \DateTime::createFromFormat('dmy His', $content[9] ." ". $content[1], new \DateTimeZone("UTC"));
+		
+		if($content[2] == 'A')
+			$this->_status = Nmea0183RmcStatus::A;
+			
+		$this->_latitude = $content[3];
+		$this->_latitudeDirection = Nmea0183Rmc::directionToEnum($content[4]);
+		
+		$this->_longitude = $content[5];
+		$this->_longitudeDirection = Nmea0183Rmc::directionToEnum($content[6]);
+		
+		$this->_speedOverGround = $content[7];
+		
+		$this->_courseOverGround = $content[8];
+		
+		$this->_magneticDeclination = $content[10];
+		$this->_magneticDeclinationDirection = Nmea0183Rmc::directionToEnum($content[11]);
+		
+		$tmp = explode("*", $content[12]);
+		$this->_signalIntegrity = Nmea0183Rmc::signalIntegrityToEnum($tmp[0]);
+	}
+	
+	public function dateTime($timezone = "UTC")
+	{
+		$timezone = new \DateTimeZone($timezone);
+		$date = $this->_dateTimeUtc;
+		if($date == null)
+			return null;
+		$date->setTimezone($timezone);
+		return $date;
+	}
+	
+	public function status()
+	{
+		return $this->_status;
+	}
+	
+	public function latitude()
+	{
+		return $this->_latitude;
+	}
+	
+	public function latitudeDirection()
+	{
+		return $this->_latitudeDirection;
+	}
+	
+	public function longitude()
+	{
+		return $this->_longitude;
+	}
+
+	public function longitudeDirection()
+	{
+		return $this->_longitudeDirection;
+	}
+	
+	public function speedOverGround()
+	{
+		return $this->_speedOverGround;
+	}
+	
+	public function courseOverGround()
+	{
+		return $this->_courseOverGround;
+	}
+	
+	public function magneticDeclination()
+	{
+		return $this->_magneticDeclination;
+	}
+	
+	public function magneticDeclinationDirection()
+	{
+		return $this->_magneticDeclinationDirection;
+	}
+	
+	public function signalIntegrity()
+	{
+		return $this->_signalIntegrity;
+	}
+	
+	private static function directionToEnum($direction)
+	{
+		switch($direction){
+			case 'N':
+				return Nmea0183Direction::North;
+			case 'E':
+				return Nmea0183Direction::East;
+			case 'S':
+				return Nmea0183Direction::South;
+			case 'W':
+				return Nmea0183Direction::West;
+		}
+		return Nmea0183Direction::Invalid;
+	}
+	
+	private static function signalIntegrityToEnum($integrity)
+	{
+		switch($integrity){
+			case 'A':
+				return Nmea0183RmcSignal::AutonomousMode;
+			case 'D':
+				return Nmea0183RmcSignal::DifferentialMode;
+			case 'E':
+				return Nmea0183RmcSignal::EstimatedMode;
+			case 'M':
+				return Nmea0183RmcSignal::ManualInputMode;
+			case 'S':
+				return Nmea0183RmcSignal::SimulatedMode;
+		}
+		return Nmea0183RmcSignal::DataNotValid;
+	}
+	
+	private $_dateTimeUtc;
+	private $_status;
+	private $_latitude;
+	private $_latitudeDirection;
+	private $_longitude;
+	private $_longitudeDirection;
+	private $_speedOverGround;
+	private $_courseOverGround;
+	private $_magneticDeclination;
+	private $_magneticDeclinationDirection;
+	private $_signalIntegrity;
+}
+
+?>
Index: src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183RmcSignal.php
===================================================================
--- src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183RmcSignal.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
+++ src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183RmcSignal.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
@@ -0,0 +1,31 @@
+<?php
+/*
+    Copyright (C) 2017 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/>.
+*/
+
+namespace GnuBoat\Nmea\Nmea0183;
+
+abstract class Nmea0183RmcSignal
+{
+	const AutonomousMode = 'A';
+	const DifferentialMode = 'D';
+	const EstimatedMode = 'E';
+	const ManualInputMode = 'M';
+	const SimulatedMode = 'S';
+	const DataNotValid = 'N';
+}
+
+?>
Index: src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183RmcStatus.php
===================================================================
--- src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183RmcStatus.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
+++ src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183RmcStatus.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
@@ -0,0 +1,27 @@
+<?php
+/*
+    Copyright (C) 2017 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/>.
+*/
+
+namespace GnuBoat\Nmea\Nmea0183;
+
+abstract class Nmea0183RmcStatus
+{
+	const V = 0;
+	const A = 1;
+}
+
+?>
Index: src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183Sentence.php
===================================================================
--- src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183Sentence.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
+++ src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183Sentence.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
@@ -0,0 +1,75 @@
+<?php
+/*
+    Copyright (C) 2017 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/>.
+*/
+
+namespace GnuBoat\Nmea\Nmea0183;
+
+class Nmea0183Sentence extends \GnuBoat\Nmea\NmeaSentence
+{
+	function __construct($type, $talker, $checksum, $sentence)
+	{
+		parent::__construct($type, $talker, $sentence);
+	
+		$this->_checksum = strtolower($checksum);
+	}
+	
+	public function checksum()
+	{
+		return $this->_checksum;
+	}
+	
+	public function checksumValid(&$errorMessage)
+	{
+		// extract characters to calculate checksum
+		$matches = array();
+		$result = preg_match('/^[\$!]{1}([^\*]+)\*([\da-zA-Z]+)$/', $this->sentence(), $matches);
+		if($result === false || $result == 0 || count($matches) != 3){
+			$errorMessage .= "Unable to determine ascii content and checksum from ". $this->sentence() ."\n";
+			return false;
+		}
+		
+		$sentenceChecksum = strtolower($matches[2]);
+		if($this->checksum() != $sentenceChecksum){
+			$errorMessage .= "Checksum from sentece (". $sentenceChecksum .") is not equal stored checksum (". $this->checksum() .")\n";
+			return false;
+		}
+		
+		// calculate checksum
+		$checksum = 0;
+		for($i = 0; $i < strlen($matches[1]); $i++)
+			$checksum = $checksum ^ ord($matches[1][$i]);
+
+		if($sentenceChecksum == strtolower(dechex($checksum)))
+			return true;
+		$errorMessage .= "Checksum from sentence (". $sentenceChecksum .") is not equal calculated checksum (". dechex($checksum) .")\n";
+		return false;
+	}
+	
+	/**
+	 * @brief Abstract function to provide additional checks in your implementation.
+	 *
+	 * Called by valid() and must return true or false
+	 */
+	protected function validate(&$errorMessage)
+	{
+		return $this->checksumValid($errorMessage);
+	}
+	
+	private $_checksum;
+}
+
+?>
Index: src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Parser.php
===================================================================
--- src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Parser.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
+++ src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Parser.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
@@ -0,0 +1,111 @@
+<?php
+/*
+    Copyright (C) 2017 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/>.
+*/
+
+namespace GnuBoat\Nmea\Nmea0183;
+
+require_once(__DIR__ ."/../../../autoloader.php");
+
+class Parser extends \GnuBoat\Nmea\NmeaParser
+{
+	function __construct()
+	{
+		$this->_types = array();
+		$this->_types["rmc"] = "GnuBoat\Nmea\Nmea0183\Nmea0183Rmc";
+		$this->_types["dpt"] = "GnuBoat\Nmea\Nmea0183\Nmea0183Dpt";
+		$this->_types["mtw"] = "GnuBoat\Nmea\Nmea0183\Nmea0183Mtw";
+	}
+	
+	public function parseFile($file, $debug)
+	{
+		$result = array();
+		if(!file_exists($file)){
+			$message = "NMEA file to parse does not exists: ". $file ."\n";
+			error_log($message);
+			if($debug > 0)
+				print $message;
+			return $result;
+		}
+		
+		$fileHandler = fopen($file, 'r');
+		if(!$fileHandler){
+			$message = "NMEA file to parse could not be opend for reading: ". $file ."\n";
+			error_log($message);
+			if($debug > 0)
+				print $message;
+			return $result;
+		}
+		
+		// despite the standards uses CR LF line ends, we are more flexible with auto here
+		ini_set('auto_detect_line_endings',true);
+		
+		$line = 1;
+		while(!feof($fileHandler)){
+			$sentence = fgets($fileHandler);
+			$parsedSentence = $this->parseSentence($sentence, $debug);
+			if($parsedSentence != null)
+				$result[] = $parsedSentence;
+			else{
+				$message = "Skipped sentence on line ". $line .": ". $sentence ."\n";
+				error_log($message);
+				if($debug > 0)
+					print $message;
+			}
+		}
+		fclose($fileHandler);
+		return $result;
+	}
+	
+	public function parseSentence($sentence, $debug)
+	{
+		$sentence = trim($sentence);
+		if(empty($sentence)){
+			$message = "Empty sentence\n";
+			error_log($message);
+			if($debug > 0)
+				print $message;
+			return null;
+		}
+	
+		$matches = array();
+		$result = preg_match('/^[\$!]{1}([\w]{2})([\w]{3})([^\*]+)\*([\da-zA-Z]+)$/', $sentence, $matches);
+		if($result === false || $result != 1 || count($matches) != 5){
+			$message = "Could not detect talker, type and checksum from ". $sentence ."\n";
+			error_log($message);
+			if($debug > 0)
+				print $message;
+			return null;
+		}
+
+		$talker = $matches[1];
+		$type = $matches[2];
+		$checksum = $matches[4];
+		
+		if(!array_key_exists(strtolower($type), $this->_types)){
+			$message = "Skipping unknown NMEA0183 sentence of type ". $type .": ". $sentence ."\n";
+			error_log($message);
+			if($debug > 0)
+				print $message;
+			return null;
+		}
+		
+		$reflectionClass = new \ReflectionClass($this->_types[strtolower($type)]);
+		return $reflectionClass->newInstanceArgs([$talker, $checksum, $sentence]);
+	}
+}
+
+?>
Index: src/webapp/webservice/inc/GnuBoat/Nmea/NmeaParser.php
===================================================================
--- src/webapp/webservice/inc/GnuBoat/Nmea/NmeaParser.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
+++ src/webapp/webservice/inc/GnuBoat/Nmea/NmeaParser.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
@@ -0,0 +1,27 @@
+<?php
+/*
+    Copyright (C) 2017 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/>.
+*/
+
+namespace GnuBoat\Nmea;
+
+abstract class NmeaParser
+{
+	abstract public function parseFile($file, $debug);
+	abstract public function parseSentence($sentence, $debug);
+}
+
+?>
Index: src/webapp/webservice/inc/GnuBoat/Nmea/NmeaSentence.php
===================================================================
--- src/webapp/webservice/inc/GnuBoat/Nmea/NmeaSentence.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
+++ src/webapp/webservice/inc/GnuBoat/Nmea/NmeaSentence.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
@@ -0,0 +1,70 @@
+<?php
+/*
+    Copyright (C) 2017 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/>.
+*/
+
+namespace GnuBoat\Nmea;
+
+abstract class NmeaSentence
+{
+	function __construct($type, $talker, $sentence)
+	{
+		$this->_talker = $talker;
+		$this->_type = $type;
+		$this->_sentence = $sentence;
+	}
+	
+	public function valid(&$errorMessage = "")
+	{
+		if(empty($this->talker())){
+			$errorMessage = "Talker not set";
+			return 	false;
+		}
+		if(empty($this->type())){
+			$errorMessage = "Type not set";
+			return 	false;
+		}
+		return $this->validate($errorMessage);
+	}
+	
+	public function talker()
+	{
+		return $this->_talker;
+	}
+	
+	public function type()
+	{
+		return $this->_type;
+	}
+	
+	public function sentence()
+	{
+		return $this->_sentence;
+	}
+	
+	/**
+	 * @brief Abstract function to provide additional checks in your implementation.
+	 *
+	 * Called by valid() and must return true or false
+	 */
+	abstract protected function validate(&$errorMessage);
+	
+	private $_talker;
+	private $_type;
+	private $_sentence;
+}
+
+?>
Index: src/webapp/webservice/inc/GnuBoat/Nmea/Parser.php
===================================================================
--- src/webapp/webservice/inc/GnuBoat/Nmea/Parser.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
+++ src/webapp/webservice/inc/GnuBoat/Nmea/Parser.php	(revision fc63b30e2819918c1c41f5e702b96b8506394bbb)
@@ -0,0 +1,79 @@
+<?php
+/*
+    Copyright (C) 2017 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/>.
+*/
+
+namespace GnuBoat\Nmea;
+
+require_once(__DIR__ ."/../../autoloader.php");
+
+/**
+ * @brief Use this class to parse a single NMEA sentence (parseSentence()) or a complete file (parseFile())
+ *
+ */
+class Parser
+{
+	function __construct($debug = 0)
+	{
+		$this->_debug = $debug;
+	
+		$this->_formats = array();
+		if(canClassBeLoaded("GnuBoat\Nmea\Nmea0183\Parser"))
+			$this->_formats["0183"] = "GnuBoat\Nmea\Nmea0183\Parser";
+	}
+	
+	public function formatsSupported()
+	{
+		return array_keys($this->_formats);
+	}
+	
+	/**
+	 * @brief Returns an array of NmeaSentence objects, specialized for the type of sentence
+	 */
+	function parseFile($file, $format)
+	{
+		return call_user_func(array(new $this->_formats[$format], "parseFile"), $file, $this->_debug);
+	}
+	
+	/**
+	 * @brief Returns an NmeaSentence object, specialized for the type of sentence
+	 */
+	function parseSentence($sentence, $format)
+	{
+		if(!array_key_exists($format, $this->_formats)){
+			$message = "No handler for requested format ". $format ." found\n";
+			error_log($message);
+			if($this->_debug > 0)
+				print $message;
+			return null;
+		}
+		
+		if(empty($sentence)){
+			$message = "Empty sentence\n";
+			error_log($message);
+			if($this->_debug > 0)
+				print $message;
+			return null;
+		}
+		
+		return call_user_func(array(new $this->_formats[$format], "parseSentence"), $sentence, $this->_debug);
+	}
+
+	private $_formats;
+	private $_debug;
+}
+
+?>
