Skip to content

[Feature Request] Helper for POSECEF position accuracy (pAcc) on M10 #91

@mlucifer56

Description

@mlucifer56

on m10 the HPPOSECEF dosent exist anymore it replaced by POSECEF most of the code for POSECEF is already in the library i just add this for my self to get the pAcc and share it hear just in case anybody need that

`// ***** POSECEF Helper Functions

// Get the current 3D high precision positional accuracy - a fun thing to watch
// Returns a long representing the 3D accuracy in millimeters
uint32_t DevUBLOXGNSS::getPositionAccuracyM10(uint16_t maxWait)
{
if (packetUBXNAVPOSECEF == nullptr)
initPacketUBXNAVPOSECEF(); // Check that RAM has been allocated for the HPPOSECEF data
if (packetUBXNAVPOSECEF == nullptr) // Bail if the RAM allocation failed
return 0;

if (packetUBXNAVPOSECEF->moduleQueried.moduleQueried.bits.pAcc == false)
getNAVPOSECEF(maxWait);
packetUBXNAVPOSECEF->moduleQueried.moduleQueried.bits.pAcc = false; // Since we are about to give this to user, mark this data as stale
packetUBXNAVPOSECEF->moduleQueried.moduleQueried.bits.all = false;

uint32_t tempAccuracy = packetUBXNAVPOSECEF->data.pAcc;

if ((tempAccuracy % 10) >= 5)
tempAccuracy += 5; // Round fraction of mm up to next mm if .5 or above
tempAccuracy /= 10; // Convert 0.1mm units to mm

return (tempAccuracy);
}`

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