Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDOP is an int, not a double #3

Open
jpmeijers opened this issue Apr 29, 2018 · 1 comment
Open

HDOP is an int, not a double #3

jpmeijers opened this issue Apr 29, 2018 · 1 comment

Comments

@jpmeijers
Copy link

In gps.c:

int8_t GpsGetLatestGpsHorizontalDilution (void)
{
    BoardDisableIrq( );
    if( HasFix == true )
    {    
        Hdop = atoi( NmeaGpsData.NmeaHorizontalDilution );
    }
    else
    {
        Hdop = 0xFFFF;
    }
    BoardEnableIrq( );

    return Hdop;

}

We should change this to
double GpsGetLatestGpsHorizontalDilution (void)
and parse a float, not an int
Hdop = atof( NmeaGpsData.NmeaHorizontalDilution );

@jcaridadhdez
Copy link
Owner

You are right! Thank you!
in gps.h changed:
int8_t GpsGetLatestGpsHorizontalDilution (void)
to
float GpsGetLatestGpsHorizontalDilution (void)

In gps.c the function:
int8_t GpsGetLatestGpsHorizontalDilution (void)
And the parser line:
Hdop = atoi( NmeaGpsData.NmeaHorizontalDilution );
have been changed to:
float GpsGetLatestGpsHorizontalDilution (void)
And:
Hdop = atof( NmeaGpsData.NmeaHorizontalDilution );

jcaridadhdez added a commit that referenced this issue Apr 30, 2018
fixed issue #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants