[Twisted-Python] Handling of NMEA messages
![](https://secure.gravatar.com/avatar/212ddf1242fa2951699802ce30739a8a.jpg?s=120&d=mm&r=g)
Hi! We are working on a project that has to extract weather information from an NMEA stream. There is a NMEAReceiver class, but it only extracts GPS information - as expected, since the class is defined in t.p.gps.nmea. We intend to add the NMEA-0183 messages necessary for my purposes. The question is: should we just extend the NMEAReceiver? Weather information is not exactly what one would expect in a class below t.p.gps... On the other hand, it would be strange to create a different kind of NMEAReceiver which knows how to handle the messages dealing with weather data. Best regards, Albert -- Albert Brandl Weiermayer Solutions GmbH | Abteistraße 12, A-4813 Altmünster phone: +43 (0) 720 70 30 14 | fax: +43 (0) 7612 20 3 56 web: http://www.weiermayer.com
![](https://secure.gravatar.com/avatar/607cfd4a5b41fe6c886c978128b9c03e.jpg?s=120&d=mm&r=g)
On 29 Nov, 12:01 pm, albert.brandl@weiermayer.com wrote:
Perhaps the NMEA and GPS parts of NMEAReceiver can be separated from each other, so that your weather extractor can use just the former and ignore the latter. You may also want to look at https://code.launchpad.net/~lvh/twisted/positioning and see if it influences your plans at all. It would be nice if we eventually merged that code. :) Jean-Paul
![](https://secure.gravatar.com/avatar/212ddf1242fa2951699802ce30739a8a.jpg?s=120&d=mm&r=g)
On Wed, Dec 01, 2010 at 01:43:40PM -0000, exarkun@twistedmatrix.com wrote:
That is not necessary, since I will also need GPS data. I just wondered if it would be a good idea to add NMEA messages that have nothing to do with GPS to the NMEAReceiver, which is in the package t.p.gps. This seems to be misleading. But tearing nmea.py apart and moving parts of it to different packages looks like much work - not something I'd like to tackle right now :-). Maybe I'll just create a subclass of NMEAReceiver and add the necessary messages there for now.
It's kind of hard to understand what this repository is about. The README file looks like a copy of the README for Twisted 8.2.0 ;-). Regards, Albert -- Albert Brandl Weiermayer Solutions GmbH | Abteistraße 12, A-4813 Altmünster phone: +43 (0) 720 70 30 14 | fax: +43 (0) 7612 20 3 56 web: http://www.weiermayer.com
![](https://secure.gravatar.com/avatar/15fa47f2847592672210af8a25cd1f34.jpg?s=120&d=mm&r=g)
On Dec 1, 2010, at 9:33 AM, Albert Brandl wrote:
Right: it's a branch of Twisted. You can look at the changelog and see what changed. The interesting parts of that branch are all in the twisted/positioning directory, though: http://bazaar.launchpad.net/%7Elvh/twisted/positioning/files/head%3A/twisted... James
![](https://secure.gravatar.com/avatar/84b6e4ca9a6e15969649b4728224378b.jpg?s=120&d=mm&r=g)
Hi I'm the guy that wrote twisted-positioning. The NMEA parser should be feature-complete, but you might have some difficulty doing the glue code. I should really get around to turning that into an actual deliverable... lvh
![](https://secure.gravatar.com/avatar/607cfd4a5b41fe6c886c978128b9c03e.jpg?s=120&d=mm&r=g)
On 29 Nov, 12:01 pm, albert.brandl@weiermayer.com wrote:
Perhaps the NMEA and GPS parts of NMEAReceiver can be separated from each other, so that your weather extractor can use just the former and ignore the latter. You may also want to look at https://code.launchpad.net/~lvh/twisted/positioning and see if it influences your plans at all. It would be nice if we eventually merged that code. :) Jean-Paul
![](https://secure.gravatar.com/avatar/212ddf1242fa2951699802ce30739a8a.jpg?s=120&d=mm&r=g)
On Wed, Dec 01, 2010 at 01:43:40PM -0000, exarkun@twistedmatrix.com wrote:
That is not necessary, since I will also need GPS data. I just wondered if it would be a good idea to add NMEA messages that have nothing to do with GPS to the NMEAReceiver, which is in the package t.p.gps. This seems to be misleading. But tearing nmea.py apart and moving parts of it to different packages looks like much work - not something I'd like to tackle right now :-). Maybe I'll just create a subclass of NMEAReceiver and add the necessary messages there for now.
It's kind of hard to understand what this repository is about. The README file looks like a copy of the README for Twisted 8.2.0 ;-). Regards, Albert -- Albert Brandl Weiermayer Solutions GmbH | Abteistraße 12, A-4813 Altmünster phone: +43 (0) 720 70 30 14 | fax: +43 (0) 7612 20 3 56 web: http://www.weiermayer.com
![](https://secure.gravatar.com/avatar/15fa47f2847592672210af8a25cd1f34.jpg?s=120&d=mm&r=g)
On Dec 1, 2010, at 9:33 AM, Albert Brandl wrote:
Right: it's a branch of Twisted. You can look at the changelog and see what changed. The interesting parts of that branch are all in the twisted/positioning directory, though: http://bazaar.launchpad.net/%7Elvh/twisted/positioning/files/head%3A/twisted... James
![](https://secure.gravatar.com/avatar/84b6e4ca9a6e15969649b4728224378b.jpg?s=120&d=mm&r=g)
Hi I'm the guy that wrote twisted-positioning. The NMEA parser should be feature-complete, but you might have some difficulty doing the glue code. I should really get around to turning that into an actual deliverable... lvh
participants (4)
-
Albert Brandl
-
exarkun@twistedmatrix.com
-
James Y Knight
-
Laurens Van Houtven