Add your own alternative version
Stats
158.8K views 12.4K downloads 94 bookmarked
Posted
9 Nov 2011
|
Comments and Discussions
|
|
Hi, there is no way to build sentence from empty object first, as you trying it - NMEAParser unable to infer TalkerID, SentenceID and parameters list from empty object
And i suppose, since TalkerID and SentenceID are enums (always have determined values), it will be safe to add functionality as you wish. In near future.
Thank you for your message!
|
|
|
|
|
How would you change current code to be able to parse binary messages, without separators, just knowing what means each bit from each type of message?
I guess raw strings wouldn't help in that case...
|
|
|
|
|
why do you need it? Result will be the same - you have parsed message, and don't care how parser did it.
Or you talking about another (not NMEA0183) standart?
|
|
|
|
|
That's it: not NMEA. There are many gps messages from commercialreceptor which are raw, and data comes binary. Also SBAS systems give its data in binary format.
I was looking for an elegant way of writing my code to get data from those messages, and found thia project. I really like the way you are paraing the NMEA messages, it's clear and smart. But in a gps raw message I don't have commas (colons?) to separate one data fiel from another, and since it is not a string I don't see how I could use raw strings to compare received message with them as you do.
So, any suggestion of how could I adapt your ideas to binary messages?
|
|
|
|
|
Commas and colons - it doesn't matter, if you have field with fixed sizes and/or field separators - method will be similar. Raw strings - i don't know what you mean, in C# i use byte arrays for such purposes. Tell me which protocol support you need - may be it will be interesting to add such functionality to library.
PS Is it binary sirf or something like this?
|
|
|
|
|
spelling remains a bit quirky but that's no problem
I am updating a number of the sentence profiles to meet my requirements (sailing performance monitoring ) - is there a mechanism for me to pass on the changes and reasons ?
|
|
|
|
|
I'm glad you find it usefull!
There are two ways to add some new sentences support:
1) if it's a proprietary sentences of known manufacturer, you can add templates in runtime, just like this:
NMEAParser.AddProprietarySentenceDescription(ManufacturerCodes.GRM, "<sent_name>", "<formatting string>");
2) if no such manufacturer in NMEAParser, or if you find incorrect/irrelevant sentence description, or you have description for new/unknown sentence - say it to me by email (dikarev-aleksandr[at]yandex.ru, and i'll update NMEAParser.
|
|
|
|
|
|
|
У вас нет желания сделать то-же самое но на Java и на коммерческой основе? Напишите - обсудим детали.
|
|
|
|
|
Многое из того что написано, основано на C#-ском syntax sugar. На Java это будет не так интересно делать, конечно мысли такие были, но это где-то может быть в 475-ую, или 896-ую очередь)). Так что на данный момент нет ни времени ни желания.
|
|
|
|
|
Если ещё есть необходимость - библиотека переведена на Java. Частично при помощи Tangible Code Converter. Ссылка на скачивание вверху статьи. Код возможно несколько сыроват, буду признателен за любые замечания и сообщения об ошибках.
|
|
|
|
|
Спасибо, необходимость по-прежнему существует, загружаю библиотеку и буду тестировать!
|
|
|
|
|
|
You're welcome!
pojaluista, tovarish! )
|
|
|
|
|
First of all, let me tell you this is an incredible piece of work ... good design and the implementation is the best of all the projects in The Code Project website. You lapse into Russian every once in awhile in the comments, but that's okay. The code is easy enough to read. Thank you for sharing.
I'd like to see an example of the sentence creation. More specifically, I'm looking for an example on how to create a TTM sentence. Regards, Ed.
|
|
|
|
|
Thanks for your message!
I have updated NMEAParser (TTM message format was obsolete).
You can build TTM sentence as follows:
object[] ttmParameters = new object[]
{
0,
1000.0,
10.0,
"True",
1.0,
10.0,
"True",
10.0,
0.0,
"Knots",
"Target name",
"Tracking",
"R",
DateTime.Now,
"Automatic",
};
var sentenceStr = NMEAParser.BuildSentence(TalkerIdentifiers.GP, SentenceIdentifiers.TTM, ttmParameters);
var parsedSentence = NMEAParser.Parse(sentenceStr);
|
|
|
|
|
I am interested in the tester. The NMEA.csproj component is mssing from NMEAtester.zip. Could this be added so the program can be run?
Peter Felgate
|
|
|
|
|
Thanks for message. Fixed.
|
|
|
|
|
Hi
Congrats for your code!
I made a few tests with a simulator called NmeaTalker and the only version the parser supported was 2.20. There is or will be a way to support the version 2.30/3.01?
Regards,
Ruben P.
|
|
|
|
|
Thanks for your message! I haven't found a 2.30/3.01 specification, i have only version from wikipedia - link, if you know of freely available any NMEA specification - let me know, i'll update NMEAParser.
PS When i was working with my Quectel L10 GPS receiver, I found some inconsistencies and fix it (extra status field at the end of GGA, GSV and GLL sentences), but not uploaded it yet.
|
|
|
|
|
|
|
|
Thank you for commenting! I tried to make it easily expanded and as easy as i can. And i think about sentences formats not as 'magic strings' anti-pattern but as database, integrated in code. These strings ('x.x' or 'hhmmss.ss' etc.) easy to understand for people who read manuals for GPS receivers.
|
|
|
|
|
|
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
|
|