25 #if PLATFORM_IS_WINDOWS 31 #if PLATFORM_IS_LINUX || PLATFORM_IS_APPLE 39 #define PRINTV3_P1 "%8.1f,%8.1f,%8.1f\n" 40 #define PRINTV3_P2 " %8.2f,%8.2f,%8.2f\n" 41 #define PRINTV3_P3 " %8.3f,%8.3f,%8.3f\n" 42 #define PRINTV4_P1 "%8.1f,%8.1f,%8.1f,%8.1f\n" 43 #define PRINTV4_P2 " %8.2f,%8.2f,%8.2f,%8.2f\n" 44 #define PRINTV4_P3 " %8.3f,%8.3f,%8.3f,%8.3f\n" 45 #define PRINTV3_LLA "%13.7f,%13.7f,%7.1f ellipsoid\n" 46 #define PRINTV3_LLA_MSL "%13.7f,%13.7f,%7.1f MSL\n" 49 #define DISPLAY_DELTA_TIME 0 // show delta time instead of time 53 #if PLATFORM_IS_WINDOWS 55 static bool ctrlHandler(
DWORD fdwCtrlType)
60 case CTRL_CLOSE_EVENT:
61 case CTRL_BREAK_EVENT:
62 case CTRL_LOGOFF_EVENT:
63 case CTRL_SHUTDOWN_EVENT:
89 #if PLATFORM_IS_WINDOWS 94 if (!SetConsoleCtrlHandler((PHANDLER_ROUTINE)ctrlHandler,
true))
96 std::cout <<
"Failed to set console ctrl handler!" << std::endl;
111 #if PLATFORM_IS_WINDOWS 114 m_windowsConsoleOut = GetStdHandle(STD_OUTPUT_HANDLE);
115 CONSOLE_CURSOR_INFO cursorInfo;
116 GetConsoleCursorInfo(m_windowsConsoleOut, &cursorInfo);
117 cursorInfo.bVisible = visible;
118 SetConsoleCursorInfo(m_windowsConsoleOut, &cursorInfo);
135 #if PLATFORM_IS_WINDOWS 137 COORD topLeft = { 0, 0 };
138 HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE);
139 CONSOLE_SCREEN_BUFFER_INFO screen;
141 GetConsoleScreenBufferInfo(console, &screen);
142 FillConsoleOutputCharacterA(console,
' ', screen.dwSize.X * screen.dwSize.Y, topLeft, &written);
143 FillConsoleOutputAttribute(console, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE, screen.dwSize.X * screen.dwSize.Y, topLeft, &written);
144 SetConsoleCursorPosition(console, topLeft);
157 #if PLATFORM_IS_WINDOWS 159 COORD topLeft = { 0, 0 };
160 SetConsoleCursorPosition(m_windowsConsoleOut, topLeft);
173 #if PLATFORM_IS_WINDOWS 175 COORD pos = { 0, (int16_t)y };
176 SetConsoleCursorPosition(m_windowsConsoleOut, pos);
189 #if PLATFORM_IS_WINDOWS 191 COORD pos = { (int16_t)x, (int16_t)y };
192 SetConsoleCursorPosition(m_windowsConsoleOut, pos);
196 printf(
"\x1B[%d;%df", y, x);
204 return "$ Inertial Sense. Press CTRL-C to terminate.\n";
209 return string(
"$ Inertial Sense. Connected. Press CTRL-C to terminate. Rx ") + std::to_string(
m_rxCount) +
"\n";
216 SNPRINTF(buf,
BUF_SIZE,
"$ Inertial Sense. Replay mode at %.1lfx speed. Press CTRL-C to terminate.\n", speed);
223 return "\nThanks for using Inertial Sense!\n";
229 #if PLATFORM_IS_WINDOWS 235 PeekConsoleInputA(m_windowsConsoleIn, &ip, 1, &numRead);
238 ReadConsoleInputA(m_windowsConsoleIn, &ip, 1, &numRead);
239 if (numRead == 1 && ip.EventType == KEY_EVENT && ip.Event.KeyEvent.bKeyDown)
241 return ip.Event.KeyEvent.uChar.AsciiChar;
258 FD_SET(STDIN_FILENO, &fds);
259 select(STDIN_FILENO + 1, &fds,
NULL,
NULL, &tv);
260 if (FD_ISSET(0, &fds))
264 tcgetattr(STDIN_FILENO, &oldt);
266 newt.c_lflag &= ~(ICANON);
267 tcsetattr(STDIN_FILENO, TCSANOW, &newt);
269 tcsetattr(STDIN_FILENO, TCSANOW, &oldt);
295 static bool isTowMode =
false;
296 static int gpsTowMsOffset = 0;
297 static int msgTimeMsOffset = 0;
305 switch (data->
hdr.
id)
347 msgTimeMs = (int)(1000.0*d.
imu.
time) + gpsTowMsOffset;
349 msgTimeMs = (int)(1000.0*d.
imu.
time);
358 if (msgTimeMs != 0 && replaySpeedX>0.0)
365 int replayTimeMs = (int)(
long)(((double)curTimeMs)*replaySpeedX);
368 if (abs(msgTimeMs + msgTimeMsOffset - replayTimeMs) > 1500)
369 msgTimeMsOffset = replayTimeMs - msgTimeMs;
372 if (replayTimeMs >= msgTimeMs + msgTimeMsOffset)
383 static int timeSinceRefreshMs = 0;
384 static int timeSinceClearMs = 0;
389 if (curTimeMs - timeSinceClearMs > 2000 || curTimeMs < timeSinceClearMs || idHist[data->
hdr.
id] == 0)
392 idHist[data->
hdr.
id] = 1;
393 timeSinceClearMs = curTimeMs;
410 if (curTimeMs - timeSinceRefreshMs > 50 || curTimeMs < timeSinceRefreshMs)
420 timeSinceRefreshMs = curTimeMs;
426 if (curTimeMs - timeSinceRefreshMs > 50 || curTimeMs < timeSinceRefreshMs)
432 timeSinceRefreshMs = curTimeMs;
450 for (
size_t i = 0; i <
m_didMsgs.size(); i++)
463 size_t id = data->
hdr.
id;
474 size_t id = data->
hdr.
id;
489 printf(
" Name DID Count dt\n");
490 for (
int i = 0; i < (int)
m_didStats.size(); i++)
508 switch (data->
hdr.
id)
538 #if 0 // List all DIDs 551 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tSTATUS\n");
552 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\t\tSatellite Rx %d Aiding: Mag %d, GPS (Hdg %d, Pos %d)\n",
559 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\t\tMode: NAV ");
563 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\t\tMode: AHRS");
580 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\t\tErrors Rx parse %d, temperature %d, self-test %d\n",
611 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"DID_INS_1:");
613 #if DISPLAY_DELTA_TIME==1 614 static double lastTime = 0;
615 double dtMs = 1000.0*(ins1.
timeOfWeek - lastTime);
617 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %4.1lfms", dtMs);
625 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" theta[%6.2f,%6.2f,%7.2f], uvw[%6.2f,%6.2f,%6.2f], lla[%12.7f,%12.7f,%7.1f], ned[%6.3f,%6.3f,%6.3f]",
635 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\n\tEuler\t");
640 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tUWV\t");
645 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tLLA\t");
662 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"DID_INS_2:");
664 #if DISPLAY_DELTA_TIME==1 665 static double lastTime = 0;
666 double dtMs = 1000.0*(ins2.
timeOfWeek - lastTime);
668 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %4.1lfms", dtMs);
676 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" qn2b[%6.3f,%6.3f,%6.3f,%6.3f], uvw[%6.2f,%6.2f,%6.2f], lla[%12.7f,%12.7f,%7.1f]",
683 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\n\tQn2b\t");
691 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\t(Euler)\t");
694 theta[1] * C_RAD2DEG_F,
695 theta[2] * C_RAD2DEG_F);
696 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tUWV\t");
701 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tLLA\t");
718 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"DID_INS_3:");
720 #if DISPLAY_DELTA_TIME==1 721 static double lastTime = 0;
722 double dtMs = 1000.0*(ins3.
timeOfWeek - lastTime);
724 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %4.1lfms", dtMs);
732 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" qn2b[%6.3f,%6.3f,%6.3f,%6.3f], uvw[%6.2f,%6.2f,%6.2f], lla[%12.7f,%12.7f,%7.1f]",
739 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\n\tQn2b\t");
747 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\t(Euler)\t");
750 theta[1] * C_RAD2DEG_F,
751 theta[2] * C_RAD2DEG_F);
752 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tUWV\t");
757 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tLLA\t");
774 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"DID_INS_4:");
776 #if DISPLAY_DELTA_TIME==1 777 static double lastTime = 0;
778 double dtMs = 1000.0*(ins4.
timeOfWeek - lastTime);
780 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %4.1lfms", dtMs);
788 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" qe2b[%6.3f,%6.3f,%6.3f,%6.3f], ve[%6.2f,%6.2f,%6.2f], ecef[%12.7f,%12.7f,%7.1f]",
790 ins4.
ve[0], ins4.
ve[1], ins4.
ve[2],
795 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\n\tQe2b\t");
803 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\t(Euler)\t");
806 theta[1] * C_RAD2DEG_F,
807 theta[2] * C_RAD2DEG_F);
808 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tVE\t");
813 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tECEF\t");
830 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"DID_DUAL_IMU:");
832 #if DISPLAY_DELTA_TIME==1 833 static double lastTime = 0;
834 double dtMs = 1000.0*(imu.
time - lastTime);
836 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %4.1lfms", dtMs);
838 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %.3lfs", imu.
time);
843 for (
int i = 0; i < 2; i++)
845 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
", pqr[%5.1f,%5.1f,%5.1f]",
847 imu.
I[i].
pqr[1] * C_RAD2DEG_F,
848 imu.
I[i].
pqr[2] * C_RAD2DEG_F);
850 for (
int i = 0; i < 2; i++)
852 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
", acc[%5.1f,%5.1f,%5.1f]",
858 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\n");
859 for (
int i = 0; i < 2; i++)
861 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tPQR\t");
864 imu.
I[i].
pqr[1] * C_RAD2DEG_F,
865 imu.
I[i].
pqr[2] * C_RAD2DEG_F);
866 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tAcc\t");
883 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"DID_PREINTEGRATED_IMU:");
885 #if DISPLAY_DELTA_TIME==1 886 static double lastTime = 0;
887 double dtMs = 1000.0*(imu.
time - lastTime);
889 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %4.1lfms", dtMs);
891 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %.3lfs, dt:%6.3f", imu.
time, imu.
dt);
896 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
", theta1[%6.3f,%6.3f,%6.3f], vel1[%6.3f,%6.3f,%6.3f]",
901 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
", theta2[%6.3f,%6.3f,%6.3f], vel2[%6.3f,%6.3f,%6.3f]",
909 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\n\tIMU1 theta1\t");
914 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tIMU2 theta2\t");
919 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tIMU1 vel1\t");
924 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tIMU2 vel2\t");
942 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"DID_MAGNETOMETER_%d:", i + 1);
944 #if DISPLAY_DELTA_TIME==1 945 static double lastTime[2] = { 0 };
946 double dtMs = 1000.0*(mag.
time - lastTime[i]);
947 lastTime[i] = mag.
time;
948 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %4.1lfms", dtMs);
950 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %.3lfs", mag.
time);
955 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
", mag[%6.2f,%6.2f,%6.2f]",
962 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\n\tmag\t");
978 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"DID_MAG_CAL:");
982 default: ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" recalCmd %3d, ", mag.
recalCmd);
break;
989 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" progress: %3.0f %%, declination: %4.1f",
996 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\n");
1008 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"DID_BAROMETER:");
1010 #if DISPLAY_DELTA_TIME==1 1011 static double lastTime = 0;
1012 double dtMs = 1000.0*(baro.
time - lastTime);
1013 lastTime = baro.
time;
1014 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %4.1lfms", dtMs);
1016 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %.3lfs", baro.
time);
1019 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
", %.2fkPa", baro.
bar);
1026 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\n");
1039 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"%s:", didName.c_str());
1041 #if DISPLAY_DELTA_TIME==1 1042 static int lastTimeMs = 0;
1045 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %3dms", dtMs);
1052 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
", LLA[%12.7f,%12.7f,%7.1f], %d sats, %4.1f cno, %4.3f hAcc, %4.3f vAcc, %4.3f pDop",
1059 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\n\tSats: %2d, ",
1061 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"Status: 0x%08x (", gps.
status);
1072 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"),\thAcc: %.3f m cno: %3.1f dBHz\n", gps.
hAcc, gps.
cnoMean);
1073 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tLLA: ");
1082 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"Compassing, ");
1104 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"%s:", didName.c_str());
1106 #if DISPLAY_DELTA_TIME==1 1107 static int lastTimeMs = 0;
1110 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %3dms", dtMs);
1117 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
", V2B[%10.3f,%10.3f,%9.2f], %4.1f age, %4.1f arRatio, %4.3f dist, %4.2f bear",
1123 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tvectorToRover: ");
1128 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\tRTK:\tdiffAge:%5.1fs arRatio: %4.1f dist:%7.2fm bear:%6.1f\n",
1142 ptr +=
SNPRINTF(buf, ptrEnd - ptr,
"%s: T=%d, lla[%4.7f,%4.7f,%7.3f], A[%3.3f,%3.3f,%3.3f], AR:%3.3f, dop(g,h,v)[%3.3f,%3.3f,%3.3f] %s",
1152 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\n");
1165 ptr +=
SNPRINTF(buf, ptrEnd - ptr,
"RAW GPS: receiverIndex=%d, type=%d, count=%d %s",
1170 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\n");
1182 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"DID_SURVEY_IN:");
1184 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" state: %d ", survey.
state);
1185 switch (survey.
state)
1196 int elapsedTimeSec = survey.
elapsedTimeSec - (elapsedTimeMin * 60);
1198 int maxDurationSec = survey.
maxDurationSec - (maxDurationMin * 60);
1200 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
", elapsed: %d:%02d of %2d:%02d",
1201 elapsedTimeMin, elapsedTimeSec, maxDurationMin, maxDurationSec );
1213 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" lla[%12.7f,%12.7f,%7.1f]",
1227 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"DID_SYS_PARAMS:");
1229 #if DISPLAY_DELTA_TIME==1 1230 static int lastTimeMs = 0;
1233 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %3dms", dtMs);
1255 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"DID_SYS_SENSORS:");
1257 #if DISPLAY_DELTA_TIME==1 1258 static double lastTime = 0;
1259 double dtMs = 1000.0*(sensors.
time - lastTime);
1260 lastTime = sensors.
time;
1261 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %4.1lfms", dtMs);
1263 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %.3lfs", sensors.
time);
1267 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
", %4.1fC, pqr[%5.1f,%5.1f,%5.1f], acc[%5.1f,%5.1f,%5.1f], mag[%6.2f,%6.2f,%6.2f]",
1272 sensors.
acc[0], sensors.
acc[1], sensors.
acc[2],
1273 sensors.
mag[0], sensors.
mag[1], sensors.
mag[2]
1276 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
", baro[%5.2fkPa, %4.1fC, %7.2fm, %3.1f%% humidity], adc[%3.1fV, %3.1fV, %3.1fV, %3.1fV]",
1283 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"\n");
1295 return string(
"RTOS: ") + csvString + terminator;
1304 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"DID_DEV_INFO:");
1307 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" SN%d, Fw %d.%d.%d.%d %c%d, %04d-%02d-%02d",
1322 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %02d:%02d:%02d, Proto %d.%d.%d.%d\n",
1340 ss <<
"DID_SENSORS_ADC:";
1342 ss <<
"time " << setprecision(3) << sensorsADC.
time <<
", ";
1343 ss <<
"bar " << setprecision(2) << sensorsADC.
bar <<
", ";
1344 ss <<
"barTemp " << setprecision(2) << sensorsADC.
barTemp <<
", ";
1345 ss <<
"humidity " << setprecision(2) << sensorsADC.
humidity <<
", ";
1358 #define SADC_WIDTH 5 1361 auto &mpu = sensorsADC.
mpu[i];
1362 ss <<
"\tmpu[" << i <<
"]: " << setprecision(0);
1366 ss <<
"temp " << setprecision(3) << mpu.temp <<
",";
1374 auto &mpu = sensorsADC.
mpu[i];
1375 ss <<
"mpu[" << i <<
"]: " << setprecision(0);
1376 ss <<
"pqr[" << mpu.pqr[0] <<
"," << mpu.pqr[1] <<
"," << mpu.pqr[2] <<
"], ";
1377 ss <<
"acc[" << mpu.acc[0] <<
"," << mpu.acc[1] <<
"," << mpu.acc[2] <<
"], ";
1378 ss <<
"mag[" << mpu.mag[0] <<
"," << mpu.mag[1] <<
"," << mpu.mag[2] <<
"], ";
1379 ss <<
"temp " << setprecision(3) << mpu.temp <<
",";
1392 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
"DID_WHEEL_ENCODER:");
1394 #if DISPLAY_DELTA_TIME==1 1395 static double lastTime[2] = { 0 };
1396 double dtMs = 1000.0*(wheel.
timeOfWeek - lastTime[i]);
1398 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
" %4.1lfms", dtMs);
1403 ptr +=
SNPRINTF(ptr, ptrEnd - ptr,
", [left,right] (rad) theta[%6.2f,%6.2f] omega[%5.2f,%5.2f] wrap[%d,%d]\n",
1418 #if PLATFORM_IS_WINDOWS 1424 return os <<
"\033[1m";
1433 #if PLATFORM_IS_WINDOWS 1439 return os <<
"\033[0m";
1449 #if PLATFORM_IS_WINDOWS 1455 return os << endl <<
boldOn;
1465 #if PLATFORM_IS_WINDOWS
static const char * GetDataSetName(uint32_t dataId)
float baseToRoverVector[3]
string DataToStringINS1(const ins_1_t &ins1, const p_data_hdr_t &hdr)
static void signalFunction(int sig)
ostream & boldOn(ostream &os)
void GoToColumnAndRow(int x, int y)
void ProcessData(p_data_t *data, bool enableReplay=false, double replaySpeedX=1.0)
string DataToStringRawGPS(const gps_raw_t &raw, const p_data_hdr_t &hdr)
string DataToStringSysSensors(const sys_sensors_t &sensors, const p_data_hdr_t &hdr)
string DataToStringSysParams(const sys_params_t &sys, const p_data_hdr_t &hdr)
#define DID_GPS2_RTK_CMP_REL
void DataToStats(const p_data_t *data)
ostream & endlbOff(ostream &os)
string DataToStringSensorsADC(const sys_sensors_adc_t &sensorsADC, const p_data_hdr_t &hdr)
string DataToStringMag(const magnetometer_t &mag, const p_data_hdr_t &hdr)
char * InsStatusToSolStatusString(char *ptr, char *ptrEnd, const uint32_t insStatus)
char * StatusToString(char *ptr, char *ptrEnd, const uint32_t insStatus, const uint32_t hdwStatus)
char copyDataPToStructP(void *sptr, const p_data_t *data, const unsigned int maxsize)
#define DID_PREINTEGRATED_IMU
bool DataToStringCSV(const p_data_hdr_t &hdr, const uint8_t *buf, string &csv)
string DataToStringPreintegratedImu(const preintegrated_imu_t &imu, const p_data_hdr_t &hdr)
ostream & endlbOn(ostream &os)
string DataToString(const p_data_t *data)
gps_rtk_misc_t gpsRtkMisc
#define DID_MAGNETOMETER_2
wheel_encoder_t wheelEncoder
float baseToRoverDistance
string DataToStringDualIMU(const dual_imu_t &imu, const p_data_hdr_t &hdr)
string DataToStringINS2(const ins_2_t &ins2, const p_data_hdr_t &hdr)
bool ControlCWasPressed()
ostream & boldOff(ostream &os)
string DataToStringBaro(const barometer_t &baro, const p_data_hdr_t &hdr)
string DataToStringINS3(const ins_3_t &ins3, const p_data_hdr_t &hdr)
#define DID_GPS2_RTK_CMP_MISC
vector< string > m_didMsgs
static bool s_controlCWasPressed
string DataToStringMagCal(const mag_cal_t &mag, const p_data_hdr_t &hdr)
#define DID_MAGNETOMETER_1
void qe2b2EulerNedEcef(ixVector3 eul, const ixVector4 qe2b, const ixVector3d ecef)
#define INS_STATUS_SOLUTION(insStatus)
USBInterfaceDescriptor data
string DataToStringRtkMisc(const gps_rtk_misc_t &sol, const p_data_hdr_t &hdr, const string didName)
sensors_mpu_w_temp_t mpu[NUM_IMU_DEVICES]
void ShowCursor(bool visible)
string DataToStringGpsPos(const gps_pos_t &gps, const p_data_hdr_t &hdr, const string didName)
string DataToStringINS4(const ins_4_t &ins4, const p_data_hdr_t &hdr)
#define DID_WHEEL_ENCODER
void DataToVector(const p_data_t *data)
eDisplayMode m_displayMode
string DataToStringRTOS(const rtos_info_t &info, const p_data_hdr_t &hdr)
#define DID_GPS1_RTK_POS_REL
sys_sensors_adc_t sensorsAdc
#define HDW_STATUS_COM_PARSE_ERROR_COUNT(hdwStatus)
vector< sDidStats > m_didStats
string DataToStringSurveyIn(const survey_in_t &survey, const p_data_hdr_t &hdr)
string DataToStringDevInfo(const dev_info_t &info, const p_data_hdr_t &hdr)
string Replay(double speed=1.0)
#define DID_GPS1_RTK_POS_MISC
string DataToStringRtkRel(const gps_rtk_rel_t &gps, const p_data_hdr_t &hdr, const string didName)
string DataToStringWheelEncoder(const wheel_encoder_t &enc, const p_data_hdr_t &hdr)