static void TestLeGnssDevice
(
void
)
{
uint32_t ttffValue;
uint32_t acqRate;
uint8_t minElevation;
int32_t altitudeOnWgs84=0;
int64_t altitudeOnPZ90;
le_gnss_ConstellationBitMask_t constellationMask;
le_gnss_NmeaBitMask_t nmeaMask = 0;
le_gnss_ConstellationArea_t constellationArea;
LE_INFO(
"Start Test Testle_gnss_DeviceTest");
"Factory restart in disabled state");
"Hot start in disabled state");
"Warm start in disabled state");
"Cold start in disabled state");
"Factory start in disabled state");
"Set constellation in disabled state");
"Get constellation in disabled state");
LE_GNSS_WORLDWIDE_AREA),
"Set GPS constellation area in disabled state");
&constellationArea),
"Get GPS constellation area in disabled state");
LE_GNSS_WORLDWIDE_AREA),
"Set GLONASS constellation area in disabled state");
&constellationArea),
"Get GLONASS constellation area in disabled state");
"Get acquisition rate in disabled state");
"Set acquisition rate in disabled state");
"Set NMEA sentences in disabled state");
"Get NMEA sentences in disabled state");
minElevation = 40;
LE_INFO(
"GNSS min elevation obtained: %d",minElevation);
LE_TEST_OK(minElevation == 40,
"Confirm min elevation is set to %d", minElevation);
"Set constellation GPS");
LE_TEST_OK(constellationMask == LE_GNSS_CONSTELLATION_GPS,
"Confirm constellation is set to %d", LE_GNSS_CONSTELLATION_GPS);
LE_GNSS_UNSET_AREA)),
"Set invalid Galileo constellation area");
LE_GNSS_OUTSIDE_US_AREA),
"Set Galileo constellation area outside US");
&constellationArea),
"Get Galileo constellation area");
LE_TEST_OK(LE_GNSS_OUTSIDE_US_AREA == constellationArea,
"Confirm Galileo constellation area is set to %d", LE_GNSS_OUTSIDE_US_AREA);
LE_GNSS_WORLDWIDE_AREA),
"Set Galileo constellation area worldwide");
&constellationArea),
"Get Galileo constellation area");
LE_TEST_OK(LE_GNSS_WORLDWIDE_AREA == constellationArea,
"Confirm Galileo constellation area is set to %d", LE_GNSS_WORLDWIDE_AREA);
acqRate = 0;
"Set invalid acquisition rate");
acqRate = 1100;
minElevation = 0;
LE_TEST_INFO(
"GNSS min elevation obtained: %d",minElevation);
LE_TEST_OK(minElevation == 0,
"Confirm min elevation is set to 0");
"Set constellation in wrong state");
"Get constellation in wrong state");
"Hot start in active state");
"Warm start in active state");
"Cold start in active state");
"Factory start in active state");
"Get acquisition rate in wrong state");
"Set acquisition rate in wrong state");
"Set NMEA sentences in wrong state");
"Get NMEA sentences in wrong state");
minElevation = LE_GNSS_MIN_ELEVATION_MAX_DEGREE;
LE_TEST_INFO(
"GNSS min elevation obtained: %d",minElevation);
LE_TEST_OK(minElevation == LE_GNSS_MIN_ELEVATION_MAX_DEGREE,
"Confirm min elevation is set to %d", LE_GNSS_MIN_ELEVATION_MAX_DEGREE);
minElevation = LE_GNSS_MIN_ELEVATION_MAX_DEGREE+1;
"Set invalid min elevation");
"Set GPS constellation");
LE_TEST_OK(constellationMask == LE_GNSS_CONSTELLATION_GPS,
"Confirm constellation is set to GPS");
LE_GNSS_COORDINATE_SYSTEM_PZ90,
LE_GNSS_POS_LATITUDE,
altitudeOnWgs84,
NULL)),
"ConvertDataCoordinateSystem error test: NULL pointer");
LE_GNSS_COORDINATE_SYSTEM_MAX,
LE_GNSS_COORDINATE_SYSTEM_PZ90,
LE_GNSS_POS_LATITUDE,
altitudeOnWgs84,
&altitudeOnPZ90)),
"ConvertDataCoordinateSystem error test: invalid source coordinate");
LE_GNSS_COORDINATE_SYSTEM_PZ90,
LE_GNSS_COORDINATE_SYSTEM_PZ90,
LE_GNSS_POS_LATITUDE,
altitudeOnWgs84,
&altitudeOnPZ90)),
"ConvertDataCoordinateSystem error test: wrong source coordinate");
LE_GNSS_COORDINATE_SYSTEM_WGS84,
LE_GNSS_COORDINATE_SYSTEM_PZ90,
LE_GNSS_POS_MAX,
altitudeOnWgs84,
&altitudeOnPZ90)),
"ConvertDataCoordinateSystem error test: invalid data type");
LE_GNSS_COORDINATE_SYSTEM_WGS84,
LE_GNSS_POS_ALTITUDE,
altitudeOnWgs84,
&altitudeOnPZ90)),
"ConvertDataCoordinateSystem error test: mismatched coordinates");
}