Boost logo

Boost Users :

Subject: Re: [Boost-users] [spirit] Qi rule for GPS NMEA
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2013-09-05 22:24:07


On Thu, Sep 5, 2013 at 9:21 PM, Michael Caisse <mcaisse-lists_at_[hidden]> wrote:
> On 09/05/2013 07:13 PM, Agustín K-ballo Bergé wrote:
>> On 05/09/2013 10:54 p.m., Michael Caisse wrote:
>>> Parsing NMEA is about as easy as you have described in english.
>>>
>>> rule = lit('$') >> ~char_('*') >> lit('$') >> hex >> lit("\r\n");
>>
>> There should be a `>> '*'` right after `~char_('*')` to consume that '*'.
>>
>> Regards,
>
> Whoops. K-ballo is correct of course. I got a little hasty. The second
> lit('$') should be lit('*') or just '*'.

Yessir, I got all that. Pretty straightforward from the NMEA docs.

How to specify the width of the hex field, though?

I'm pretty sure it should go $XYZ*HH\r\n (only 2-hex-digits).

Thank ye...

> Michael Caisse
> ciere consulting
> ciere.com
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net