Skip to content

getPositionAccuracy() not returning correct values ?  #6

Closed
@Niv1900

Description

@Niv1900

Hi @PaulZC,

Thank you for this 2.0.x version. I'm quite a "baby user" here since it's my first issue that I post on github...

I'm having some trouble to use the getPositionAccuracy() function. I'll try to not miss any piece of information.

Workbench

  • NEO-M8N (this product is not officially marked as compatible, but so far all functions are working correctly) ;
  • ESP32 (lolin32) with the Arduino framework ;
  • I²C connection without addition pull-up resistor ;
  • I²C tested at 400 000 Hz and 40 000 Hz ;
  • Everything is powered via the USB cable on the ESP32 ;
  • an IMU is running in parallel via SPI Bus ;
  • compiled code with -O3 flag.
  • the GNSS receiver and module are static since startup

Steps to reproduce

Ok so I'm quite a begginer here, so what I do is that I get all the info I need and put them into a struct for a use in another task, here is my GNSS Task :

void xT_GNSS(void *pvParameters)
{
    TickType_t xLastWakeTime_GNSS;
    xLastWakeTime_GNSS = xTaskGetTickCount();

    while (1)
    {
        vTaskDelayUntil(&xLastWakeTime_GNSS, Tck_GNSS);

        F.GNSS.fix           = myGNSS.getGnssFixOk();
        F.GNSS.latitude      = myGNSS.getLatitude();
        F.GNSS.longitude     = myGNSS.getLongitude();
        F.GNSS.altitude      = myGNSS.getAltitude();
        F.GNSS.fixType       = myGNSS.getFixType();
        F.GNSS.groundSpeed   = myGNSS.getGroundSpeed();
        F.GNSS.heading       = myGNSS.getHeading();
        F.GNSS.PDOP          = myGNSS.getPDOP();
        F.GNSS.SIV           = myGNSS.getSIV();
        F.GNSS.year          = myGNSS.getYear();
        F.GNSS.month         = myGNSS.getMonth();
        F.GNSS.day           = myGNSS.getDay();
        F.GNSS.hour          = myGNSS.getHour();
        F.GNSS.minute        = myGNSS.getMinute();
        F.GNSS.second        = myGNSS.getSecond();
        F.GNSS.millisecond   = myGNSS.getMillisecond();
        F.GNSS.nanosecond    = myGNSS.getNanosecond();
        F.GNSS.PosACC        = myGNSS.getPositionAccuracy(); //? not working :(
    }

    vTaskDelete(NULL);
}

Expected behavior

To have a correct value returned by the getPositionAccuracy() function.

Actual behavior

getPositionAccuracy() function return a very strange result (like 107341414, even if my PDOP is quite near 1).

F.GNSS.PosACC = myGNSS.getPositionAccuracy();

When this line of code is commented I have noticed that everything run faster :

Here it's when getPositionAccuracy() is used :
lent

And here it's when getPositionAccuracy() is not being used :
rapide

(the delta time between each line is around 18ms for both example)

So does a maxdelay is being triggered and then the operation to get the position accuracy is cancelled ?

Thank you, if the problem is only related to the fact that I'm using the NEO-M8N I'm really sorry for creating this issue...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions