GPRMC device

Lukas Z.6 years ago

Hello,
is it possible in any way to push GPRMC message to the traccar server directly (like to the OpenGTS sever)?
e.g.

http://localhost.com:8080/gprmc/Data?acct=demo&dev=123&code=0xF020&gprmc=$GPRMC,080701.00,A,3128.7540,N,14257.6714,W,000.0,000.0,180707,,A*1C

I have to use OpenGTS for GPRMC devices now and Traccar for others but I want to use Traccar only.

Thanks, Lukas

Anton Tananaev6 years ago

That's OpenGTS protocol and it is supported by Traccar. Have you tried it before asking?

Lukas Z.6 years ago

Sorry I haven't tried... I'm going to try it now.

Lukas Z.6 years ago

Any documentation for this protocol please? Couldn't find exact format of the sentence anywhere. Now I am using this format with OpenGTS

http://track.[removed].cz:8083/gprmc/Data?acct=[removed]&dev=gprmc_999000000000013&code=0xF183&gprmc=$GPRMC,143013.0,A,5006.728217,N,01416.437869,E,0.0,329.6,281017,1.2,E,A*0E
Lukas Z.6 years ago

Found the solution...
Correct format sample

http://[server.ip]:5159/?id=gprmc_999000000000003&gprmc=$GPRMC,143013,A,5006.728217,N,01416.437869,E,0.0,329.6,281017,1.2,E,A*0E

Incorrect format sample

http://[server.ip]:5159/?id=gprmc_999000000000003&gprmc=$GPRMC,143013.0,A,5006.728217,N,01416.437869,E,0.0,329.6,281017,1.2,E,A*0E

regexp is:

                .text("$GPRMC,")
                .number("(dd)(dd)(dd),")             // time (hhmmss)
                .expression("([AV]),")               // validity
                .number("(d+)(dd.d+),")              // latitude
                .expression("([NS]),")
                .number("(d+)(dd.d+),")              // longitude
                .expression("([EW]),")
                .number("(d+.d+),")                  // speed
                .number("(d+.d+),")                  // course
                .number("(dd)(dd)(dd),")             // date (ddmmyy)
                .any()*

So the problem is, that Traccar server expects .number("(dd)(dd)(dd),") // time (hhmmss) but it could be also decimal number (eg4 here http://aprs.gids.nl/nmea/#rmc)

Anton could You implement it please? Thank You, Lukas

Lukas Z.6 years ago

Implemented by Anton, thanks