Giter Club home page Giter Club logo

nmeaparser's People

Contributors

ocrumjungle avatar visualgps avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nmeaparser's Issues

How to Read Lat and Lon with high precision

Hi,

I recently used this parser. I used GGA Sentences to get the Lat and Lon Data, however, i found that the precision was too less. Is there a way to increase the precision?

Multiple ??GSA Sentenses -- Is this NMEA comlpliant?

I've noticed that the uBlox 8 chipset will send multiple GSA sentences. They are doing this because the GSA only allows 12 satellites in the sentence, however the GSA sentence did not have a sequence number associated with it. What happens now is when you do get multiple GSA sentences, the last one out will get preference.

Example:

$GNGSA,A,3,17,28,30,13,19,07,11,15,01,51,,,1.56,0.75,1.37*1A $GNGSA,A,3,81,79,82,78,88,80,69,,,,,,1.56,0.75,1.37*1C

Incorrect conversion of RMC Speed in Knots

In the NMEASentenceRMC.cpp :

// Speed over ground knots
	if (GetField(pData, szField, 6, c_nMaxField) == CNMEAParserData::ERROR_OK) {
		m_SentenceData.m_dSpeedKnots = atol(szField);
	}

the use of atol() is incorrect, it converts to long int, should be a floating point conversion with atof(), like this:
m_SentenceData.m_dSpeedKnots = atof(szField);

[Suggestion of minor evolution] Removing verbose

Hello,

(First of all, thank you for sharing this code!)

The function CNMEAParser::ProcessRxCommand has a printf that can be annoying when used in an application that already has a certain level of verbosity.

Since this function can be overloaded by child classes as described in the documentation, could it be removed from the parent class and be placed in the example's child class instead? Something like :

Parent CNMEAParser class:

CNMEAParserData::ERROR_E CNMEAParser::ProcessRxCommand(char * pCmd, char * pData)
{
        /* REMOVE FROM HERE ....
	//
	// Grab the talker ID
	//
	uint16_t u16TalkerID = (uint16_t)((uint8_t)pCmd[0]) << 8;
	u16TalkerID |= (uint16_t)((uint8_t)pCmd[1]);

	//
	// Get the sentence ID, --XXX where XXX is the sentence ID
	//
	char *lpszSentenceID = &pCmd[2];

	printf("Cmd: %s, TalkerID:%c%c, Sentence ID: %s\n", pCmd, (u16TalkerID >> 8) & 0xFF, (u16TalkerID) & 0xFF, lpszSentenceID);

        ... UNTIL HERE */

        //-----------------------------------------------------------------------------
        // ...

Child example class:

    ///
    /// \brief This method is redefined from CNMEAParserPacket::ProcessRxCommand(char *pCmd, char *pData)
    ///
    /// \param pCmd Pointer to the NMEA command string
    /// \param pData Comma separated data that belongs to the command
    /// \return Returns CNMEAParserData::ERROR_OK If successful
    ///
    virtual CNMEAParserData::ERROR_E ProcessRxCommand(char *pCmd, char *pData) {
	// Grab the talker ID
	uint16_t u16TalkerID = (uint16_t)((uint8_t)pCmd[0]) << 8;
	u16TalkerID |= (uint16_t)((uint8_t)pCmd[1]);

	// Get the sentence ID, --XXX where XXX is the sentence ID
	char *lpszSentenceID = &pCmd[2];

        // Debug verbosity
	printf("Cmd: %s, TalkerID:%c%c, Sentence ID: %s\n", pCmd, (u16TalkerID >> 8) & 0xFF, (u16TalkerID) & 0xFF, lpszSentenceID);

        // Call base class to process the command
        CNMEAParser::ProcessRxCommand(pCmd, pData);

        return CNMEAParserData::ERROR_OK;
    }

(Or the verbosity could be embedded in a #define so it could be turned ON/OFF.)

This way, the example in the documentation would have the very same behavior but the user would be free not to have any verbosity.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.