Sample code for GNSS constellation selection

//--------------------------------------------------------------------------------------------------
/**
* Test: GNSS Position request.
*
*/
//--------------------------------------------------------------------------------------------------
static void TestLeGnssStart
(
void
)
{
uint32_t rate = 0;
le_gnss_ConstellationBitMask_t constellationMask;
uint32_t ttff = 0;
 
 
LE_INFO("Start Test Testle_gnss_StartTest");
 
LE_INFO("Acquisition rate %d ms", rate);
 
LE_ASSERT(le_gnss_GetConstellation(&constellationMask) == LE_OK);
LE_INFO("Constellation 0x%X", constellationMask);
LE_ASSERT(le_gnss_SetConstellation(constellationMask) == LE_OK);
 
LE_ASSERT((le_gnss_GetNmeaSentences(&nmeaMask)) == LE_OK);
LE_INFO("Enabled NMEA sentences 0x%08X", nmeaMask);
LE_ASSERT((le_gnss_SetNmeaSentences(nmeaMask)) == LE_OK);
 
LE_INFO("Start GNSS");
LE_ASSERT((le_gnss_Start()) == LE_OK);
 
/* Wait for a position fix */
LE_INFO("Wait 120 seconds for a 3D fix");
sleep(120);
 
// Get TTFF
result = le_gnss_GetTtff(&ttff);
LE_ASSERT((result == LE_OK)||(result == LE_BUSY));
if(result == LE_OK)
{
LE_INFO("TTFF start = %d msec", ttff);
}
else
{
LE_INFO("TTFF start not available");
}
 
LE_INFO("Stop GNSS");
LE_ASSERT((le_gnss_Stop()) == LE_OK);
}