updated host osal

This commit is contained in:
2021-04-01 10:37:34 +02:00
committed by Robin.Mueller
parent 4177f54f68
commit 853a728d4c
2 changed files with 18 additions and 23 deletions

View File

@ -66,6 +66,14 @@ gps_rx_data[] = ""
"$GPRMC,183731,A,3907.482,N,12102.436,W,000.0,360.0,080301,015.5,E*67\r\n"
"$GPRMB,A,,,,,,,,,,,,V*71\r\n";
const char hyperion_gps_data[] = ""
"$GNGGA,173225.998892,4908.5596,N,00906.2765,E,1,05,2.1,215.0,M,48.2,M,,0000*74\r\n"
"$GNGLL,4908.5596,N,00906.2765,E,173225.998892,A,A*7F\r\n"
"$GPGSA,A,3,18,16,26,31,20,,,,,,,,3.2,2.1,2.4*3C\r\n"
"$GNRMC,173225.998892,A,4908.5596,N,00906.2765,E,000.0,040.7,270221,,,A*4F\r\n"
"$GNVTG,040.7,T,,M,000.0,N,000.0,K,A*10\r\n"
"$GNZDA,173225.998892,27,02,2021,00,00*75\r\n";
ReturnValue_t TestTask::performOneShotAction() {
#if OBSW_ADD_TEST_CODE == 1
//performLwgpsTest();
@ -93,18 +101,18 @@ ReturnValue_t TestTask::performActionB() {
void TestTask::performLwgpsTest() {
/* Everything here will only be performed once. */
etl::vector<uint8_t, 30> testVec;
sif::info << "Processing sample GPS output.." << std::endl;
lwgps_t gpsStruct;
sif::info << "Size of GPS struct: " << sizeof(gpsStruct) << std::endl;
lwgps_init(&gpsStruct);
/* Process all input data */
lwgps_process(&gpsStruct, gps_rx_data, strlen(gps_rx_data));
lwgps_process(&gpsStruct, hyperion_gps_data, strlen(hyperion_gps_data));
/* Print messages */
printf("Valid status: %d\r\n", gpsStruct.is_valid);
printf("Latitude: %f degrees\r\n", gpsStruct.latitude);
printf("Longitude: %f degrees\r\n", gpsStruct.longitude);
printf("Altitude: %f meters\r\n", gpsStruct.altitude);
printf("Valid status: %d\n", gpsStruct.is_valid);
printf("Latitude: %f degrees\n", gpsStruct.latitude);
printf("Longitude: %f degrees\n", gpsStruct.longitude);
printf("Altitude: %f meters\n", gpsStruct.altitude);
}