diff --git a/bsp_hosted/ObjectFactory.cpp b/bsp_hosted/ObjectFactory.cpp index 798fa7ec..f3d7591d 100644 --- a/bsp_hosted/ObjectFactory.cpp +++ b/bsp_hosted/ObjectFactory.cpp @@ -11,13 +11,8 @@ #include #include -#ifdef LINUX -#include -#include -#elif WIN32 -#include -#include -#endif +#include +#include #include @@ -45,17 +40,9 @@ void ObjectFactory::produce(){ Factory::setStaticFrameworkObjectIds(); ObjectFactory::produceGenericObjects(); -#ifdef LINUX - new TmTcUnixUdpBridge(objects::UDP_BRIDGE, + new UdpTmTcBridge(objects::UDP_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR, objects::TM_STORE, objects::TC_STORE); - new TcUnixUdpPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE); -#elif WIN32 - new TmTcWinUdpBridge(objects::UDP_BRIDGE, - objects::CCSDS_PACKET_DISTRIBUTOR, objects::TM_STORE, - objects::TC_STORE); - new TcWinUdpPollingTask(objects::UDP_POLLING_TASK, - objects::UDP_BRIDGE); -#endif + new UdpTcPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE); } diff --git a/test/testtasks/TestTask.cpp b/test/testtasks/TestTask.cpp index 86f4af38..88a5d13e 100644 --- a/test/testtasks/TestTask.cpp +++ b/test/testtasks/TestTask.cpp @@ -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 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); }