Ignore:
Timestamp:
Sep 20, 2017, 6:40:51 PM (9 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
0.5, debian/bullseye, debian/jessie, master
Children:
939b309
Parents:
99959fb
Message:

Nmea Parser now also parses lines starting with date tine string

Location:
src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Nmea0183Sentence.php

    r99959fb r74f0621  
    3737                // extract characters to calculate checksum
    3838                $matches = array();
    39                 $result = preg_match('/^[\$!]{1}([^\*]+)\*([\da-zA-Z]+)$/', $this->sentence(), $matches);
     39                $result = preg_match('/^[^\$!]{0,}[\$!]{1}([^\*]+)\*([\da-zA-Z]+)$/', $this->sentence(), $matches);
    4040                if($result === false || $result == 0 || count($matches) != 3){
    4141                        $errorMessage .= "Unable to determine ascii content and checksum from ". $this->sentence() ."\n";
  • src/webapp/webservice/inc/GnuBoat/Nmea/Nmea0183/Parser.php

    r99959fb r74f0621  
    8080       
    8181                $matches = array();
    82                 $result = preg_match('/^[\$!]{1}([\w]{2})([\w]{3})([^\*]+)\*([\da-zA-Z]+)$/', $sentence, $matches);
     82                $result = preg_match('/^[^\$!]{0,}[\$!]{1}([\w]{2})([\w]{3})([^\*]+)\*([\da-zA-Z]+)$/', $sentence, $matches);
    8383                if($result === false || $result != 1 || count($matches) != 5){
    8484                        $message = "Could not detect talker, type and checksum from ". $sentence;
Note: See TracChangeset for help on using the changeset viewer.