Tracker SOM loc-enhnced event

Hello,
@rickkas7 and @gusgonnet

I understand for every loc event sent by the particle device one loc-enhanced event is generated and published by the particle cloud itself, But i want to use the lattitude and longitide information from this loc-enhanced to track the vehicle.
how do i access this information in my device application firmware i am writing to use this information and act on it.

Thanks

You need to enable Callback to device with enhanced location data in location settings in the console.

Then use regEnhancedLocCallback to register a function to get the enhanced location from your Tracker Edge firmware.

void enhancedCb(const LocationPoint& point, const void* context)
{
Log.info("Enhanced location callback");
}
void setup()
{
Tracker::instance().init();
TrackerLocation::instance().regEnhancedLocCallback(enhancedCb);
Particle.connect();
}
void loop()
{
Tracker::instance().loop();
}

if i do this i will have the loc-enhanced information from the cloud via the LocationPoint& point ?

Yes, as long as you also turn the feature on in the console. Receiving enhanced location on-device also counts as an additional data operation.

Apparently i did turn the callback on from the cloud and i cannot see the callback triggered and printing this log Log.info("Enhanced location callback");

I found the Issue, The issue was in the Tracker settings in the product and device console.
I got it working Now.

0002708498 [app] INFO: location cb publish 2707 success!
0002708499 [app] INFO: Enhanced location callback

Thanks for the Quick Responses
@rickkas7

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.