ISUtilities.cpp
Go to the documentation of this file.
1 /*
2 MIT LICENSE
3 
4 Copyright (c) 2014-2021 Inertial Sense, Inc. - http://inertialsense.com
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
7 
8 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 
10 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 */
12 
13 #include <stdio.h>
14 #include <iostream>
15 #include <math.h>
16 #include <string>
17 
18 #include "ISUtilities.h"
19 #include "ISPose.h"
20 #include "ISEarth.h"
21 
22 #if PLATFORM_IS_EMBEDDED
23 
24 #include "../EVB-2/IS_EVB-2/src/drivers/d_time.h"
25 
26 #elif CPP11_IS_ENABLED
27 
28 #include <thread>
29 #include <mutex>
30 
31 #elif PLATFORM_IS_WINDOWS
32 
33 #include <windows.h>
34 #include <process.h>
35 
36 #elif PLATFORM_IS_LINUX
37 
38 
39 #else
40 
41 #error "Unsupported platform"
42 
43 #endif
44 
45 using namespace std;
46 
47 static const string s_base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
48 static inline bool is_base64(unsigned char c)
49 {
50  return (isalnum(c) || (c == '+') || (c == '/'));
51 }
52 
53 string base64Encode(const unsigned char* bytes_to_encode, unsigned int in_len)
54 {
55  string ret;
56  int i = 0;
57  int j = 0;
58  unsigned char char_array_3[3];
59  unsigned char char_array_4[4];
60 
61  while (in_len--)
62  {
63  char_array_3[i++] = *(bytes_to_encode++);
64  if (i == 3)
65  {
66  char_array_4[0] = (char_array_3[0] & 0xfc) >> 2;
67  char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4);
68  char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);
69  char_array_4[3] = char_array_3[2] & 0x3f;
70  for (i = 0; (i < 4); i++)
71  {
72  ret += s_base64_chars[char_array_4[i]];
73  }
74  i = 0;
75  }
76  }
77 
78  if (i)
79  {
80  for (j = i; j < 3; j++)
81  {
82  char_array_3[j] = '\0';
83  }
84 
85  char_array_4[0] = (char_array_3[0] & 0xfc) >> 2;
86  char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4);
87  char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);
88  char_array_4[3] = char_array_3[2] & 0x3f;
89 
90  for (j = 0; (j < i + 1); j++)
91  {
92  ret += s_base64_chars[char_array_4[j]];
93  }
94 
95  while ((i++ < 3))
96  {
97  ret += '=';
98  }
99  }
100 
101  return ret;
102 
103 }
104 
105 string base64Decode(const string& encoded_string)
106 {
107  int in_len = (int)encoded_string.size();
108  int i = 0;
109  int j = 0;
110  int in_ = 0;
111  unsigned char char_array_4[4], char_array_3[3];
112  string ret;
113 
114  while (in_len-- && (encoded_string[in_] != '=') && is_base64(encoded_string[in_]))
115  {
116  char_array_4[i++] = encoded_string[in_];
117  in_++;
118  if (i == 4)
119  {
120  for (i = 0; i < 4; i++)
121  {
122  char_array_4[i] = (unsigned char)s_base64_chars.find(char_array_4[i]);
123  }
124  char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
125  char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);
126  char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3];
127  for (i = 0; (i < 3); i++)
128  {
129  ret += char_array_3[i];
130  }
131  i = 0;
132  }
133  }
134 
135  if (i)
136  {
137  for (j = i; j < 4; j++)
138  {
139  char_array_4[j] = 0;
140  }
141  for (j = 0; j < 4; j++)
142  {
143  char_array_4[j] = (unsigned char)s_base64_chars.find(char_array_4[j]);
144  }
145  char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
146  char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);
147  char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3];
148  for (j = 0; (j < i - 1); j++)
149  {
150  ret += char_array_3[j];
151  }
152  }
153 
154  return ret;
155 }
156 
157 size_t splitString(const string& s, const string& delimiter, vector<string>& result)
158 {
159  result.clear();
160  size_t pos = 0;
161  size_t pos2;
162  while (true)
163  {
164  pos2 = s.find(delimiter, pos);
165  if (pos2 == string::npos)
166  {
167  result.push_back(s.substr(pos));
168  break;
169  }
170  else
171  {
172  result.push_back(s.substr(pos, pos2 - pos));
173  pos = pos2 + delimiter.length();
174  }
175  }
176  return result.size();
177 }
178 
179 #ifdef __cplusplus
180 extern "C" {
181 #endif
182 
183 #if PLATFORM_IS_WINDOWS
184 
185  void usleep(__int64 usec)
186  {
187  HANDLE timer;
188  LARGE_INTEGER ft;
189 
190  ft.QuadPart = -(10 * usec); // Convert to 100 nanosecond interval, negative value indicates relative time
191 
192  timer = CreateWaitableTimer(NULL, true, NULL);
193  SetWaitableTimer(timer, &ft, 0, NULL, NULL, 0);
194  WaitForSingleObject(timer, INFINITE);
195  CloseHandle(timer);
196  }
197 
198 #else
199 
200 #include <unistd.h>
201 #include <sys/time.h>
202 
203 #endif
204 
206 {
207 
208 #if PLATFORM_IS_WINDOWS
209 
210  SYSTEMTIME st;
211  GetLocalTime(&st);
212  return st.wSecond;
213 
214 #else
215 
216  struct timeval tv;
217  gettimeofday(&tv, NULL);
218  return tv.tv_sec;
219 
220 #endif
221 
222 }
223 
226 {
227 
228 #if PLATFORM_IS_WINDOWS
229 
230  // Time since week start (Sunday morning) in milliseconds, GMT
231  SYSTEMTIME st;
232  GetSystemTime(&st);
233  return st.wMilliseconds + 1000 * (st.wSecond + 60 * (st.wMinute + 60 * (st.wHour + 24 * st.wDayOfWeek)));
234 
235 #else
236 
237  // Time since epoch, January 1, 1970 (midnight UTC/GMT)
238  struct timeval tv;
239  gettimeofday(&tv, NULL);
240  return tv.tv_usec / 1000 + 1000 * tv.tv_sec;
241 
242 #endif
243 
244 }
245 
247 uint64_t current_timeUs()
248 {
249 
250 #if PLATFORM_IS_WINDOWS
251 
252  // Time since week start (Sunday morning) in milliseconds, GMT
253  LARGE_INTEGER StartingTime;
254  LARGE_INTEGER Frequency;
255 
256  QueryPerformanceCounter(&StartingTime);
257  QueryPerformanceFrequency(&Frequency);
258 
259  StartingTime.QuadPart *= 1000000;
260  StartingTime.QuadPart /= Frequency.QuadPart;
261 
262  return StartingTime.QuadPart;
263 
264 #else
265 
266  // Time since epoch, January 1, 1970 (midnight UTC/GMT)
267  struct timeval tv;
268  gettimeofday(&tv, NULL);
269  return tv.tv_usec + 1000000 * tv.tv_sec;
270 
271 #endif
272 
273 }
274 
275 uint64_t timerUsStart()
276 {
277 
278 #if PLATFORM_IS_WINDOWS
279 
280  LARGE_INTEGER StartingTime;
281  QueryPerformanceCounter(&StartingTime);
282  return StartingTime.QuadPart;
283 
284 #else
285 
286  // Time since epoch, January 1, 1970 (midnight UTC/GMT)
287  struct timeval tv;
288  gettimeofday(&tv, NULL);
289  return tv.tv_usec + 1000000 * tv.tv_sec;
290 
291 #endif
292 
293 }
294 
295 uint64_t timerUsEnd(uint64_t start)
296 {
297 
298 #if PLATFORM_IS_WINDOWS
299 
300  LARGE_INTEGER EndingTime, ElapsedTimeUs;
301  LARGE_INTEGER Frequency;
302 
303  QueryPerformanceCounter(&EndingTime);
304  QueryPerformanceFrequency(&Frequency);
305 
306  ElapsedTimeUs.QuadPart = EndingTime.QuadPart - start;
307 
308  ElapsedTimeUs.QuadPart *= 1000000;
309  ElapsedTimeUs.QuadPart /= Frequency.QuadPart;
310 
311  return ElapsedTimeUs.QuadPart;
312 
313 #else
314 
315  struct timeval tv;
316  gettimeofday(&tv, NULL);
317  uint64_t stopTimeUs = tv.tv_usec + 1000000 * tv.tv_sec;
318  return stopTimeUs - start;
319 
320 #endif
321 
322 }
323 
324 uint64_t timerRawStart()
325 {
326 
327 #if PLATFORM_IS_WINDOWS
328 
329  LARGE_INTEGER StartingTime;
330  QueryPerformanceCounter(&StartingTime);
331  return StartingTime.QuadPart;
332 
333 #else
334 
335  struct timeval tv;
336  gettimeofday(&tv, NULL);
337  return tv.tv_usec + 1000000 * tv.tv_sec;
338 
339 #endif
340 
341 }
342 
343 uint64_t timerRawEnd(uint64_t start)
344 {
345 
346 #if PLATFORM_IS_WINDOWS
347 
348  LARGE_INTEGER EndingTime, ElapsedTimeUs;
349  QueryPerformanceCounter(&EndingTime);
350  ElapsedTimeUs.QuadPart = EndingTime.QuadPart - start;
351  return ElapsedTimeUs.QuadPart;
352 
353 #else
354 
355  struct timeval tv;
356  gettimeofday(&tv, NULL);
357  uint64_t stopTimeUs = tv.tv_usec + 1000000 * tv.tv_sec;
358  return stopTimeUs - start;
359 
360 #endif
361 
362 }
363 
364 uint64_t getTickCount(void)
365 {
366 
367 #if PLATFORM_IS_WINDOWS
368 
369  return GetTickCount64();
370 
371 #elif PLATFORM_IS_EVB_2
372 
373  return time_ticks();
374 
375 #else
376 
377  struct timespec now;
378  if (clock_gettime(CLOCK_MONOTONIC, &now))
379  {
380  return 0;
381  }
382  return (uint64_t)(now.tv_sec * 1000.0 + now.tv_nsec / 1000000.0);
383 
384 #endif
385 
386 }
387 
388 int bootloadUploadProgress(const void* port, float percent)
389 {
390  // Suppress compiler warnings
391  (void)port;
392 
393  printf("\rUpload: %d%% \r", (int)(percent * 100.0f));
394  if (percent == 1.0f)
395  {
396  printf("\r\n");
397  }
398  fflush(stdout); // stdout stream is buffered (in Linux) so output is only seen after a newline '\n' or fflush().
399 
400  return 1; // could return 0 to abort
401 }
402 
403 int bootloadVerifyProgress(const void* port, float percent)
404 {
405  // Suppress compiler warnings
406  (void)port;
407 
408  printf("\rVerify: %d%% \r", (int)(percent * 100.0f));
409  if (percent == 1.0f)
410  {
411  printf("\r\n");
412  }
413  fflush(stdout); // stdout stream is buffered (in Linux) so output is only seen after a newline '\n' or fflush().
414 
415  return 1; // could return 0 to abort
416 }
417 
418 void bootloadStatusInfo(const void* port, const char* str)
419 {
420  (void)port;
421  cout << str << endl;
422 }
423 
424 float step_sinwave(float *sig_gen, float freqHz, float amplitude, float periodSec)
425 {
426  *sig_gen += freqHz * periodSec * C_TWOPI_F;
427 
428  // Unwrap Angle
429  if (*sig_gen > C_PI_F)
430  {
431  *sig_gen -= C_TWOPI_F;
432  }
433 
434  return amplitude * sinf(*sig_gen);
435 }
436 
437 FILE* openFile(const char* path, const char* mode)
438 {
439  FILE* file = 0;
440 
441 #ifdef _MSC_VER
442 
443  fopen_s(&file, path, mode);
444 
445 #else
446 
447  file = fopen(path, mode);
448 
449 #endif
450 
451  return file;
452 
453 }
454 
455 const char* tempPath()
456 {
457 
458 #if PLATFORM_IS_WINDOWS
459 
460  static char _tempPath[MAX_PATH];
461  if (_tempPath[0] == 0)
462  {
463  GetTempPathA(MAX_PATH, _tempPath);
464  }
465  return _tempPath;
466 
467 #else
468 
469  return "/tmp/";
470 
471 #endif
472 
473 }
474 
475 const unsigned char* getHexLookupTable()
476 {
477  static const unsigned char s_hexLookupTable[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
478  return s_hexLookupTable;
479 }
480 
481 uint8_t getHexValue(unsigned char hex)
482 {
483  return 9 * (hex >> 6) + (hex & 017);
484 }
485 
486 void* threadCreateAndStart(void(*function)(void* info), void* info)
487 {
488 #if PLATFORM_IS_EMBEDDED
489 
490  return NULLPTR;
491 
492 #elif CPP11_IS_ENABLED
493 
494  return new thread(function, info);
495 
496 #elif PLATFORM_IS_WINDOWS
497 
498  return CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)function, info, 0, NULL);
499 
500 #else
501 
502  pthread_t* t = (pthread_t*)MALLOC(sizeof(pthread_t));
503  pthread_create(t, NULL, function, info);
504  return t;
505 
506 #endif
507 
508 }
509 
510 void threadJoinAndFree(void* handle)
511 {
512  if (handle == NULL)
513  {
514  return;
515  }
516 
517 #if PLATFORM_IS_EMBEDDED
518 
519  return;
520 
521 #elif CPP11_IS_ENABLED
522 
523  ((thread*)handle)->join();
524  delete (thread*)handle;
525 
526 #elif PLATFORM_IS_WINDOWS
527 
528  WaitForSingleObject(handle, 0);
529  CloseHandle(handle);
530 
531 #else
532 
533  pthread_join((pthread_t*)handle);
534  FREE(handle);
535 
536 #endif
537 
538 }
539 
540 void* mutexCreate(void)
541 {
542 
543 #if PLATFORM_IS_EMBEDDED
544 
545  return NULLPTR;
546 
547 #elif CPP11_IS_ENABLED
548 
549  return new mutex();
550 
551 #elif PLATFORM_IS_WINDOWS
552 
553  CRITICAL_SECTION* c = (CRITICAL_SECTION*)MALLOC(sizeof(CRITICAL_SECTION));
554  InitializeCriticalSection(c);
555  return c;
556 
557 #else
558 
559  pthread_mutex_t* m = (pthread_mutex_t*)MALLOC(sizeof(pthread_mutex_t));
560  pthread_mutex_init(m, NULL);
561  return m;
562 
563 #endif
564 
565 }
566 
567 void mutexLock(void* handle)
568 {
569 
570 #if PLATFORM_IS_EMBEDDED
571 
572  return;
573 
574 #elif CPP11_IS_ENABLED
575 
576  ((mutex*)handle)->lock();
577 
578 #elif PLATFORM_IS_WINDOWS
579 
580  EnterCriticalSection((CRITICAL_SECTION*)handle);
581 
582 #else
583 
584  pthread_mutex_lock((pthread_mutex_t*)handle);
585 
586 #endif
587 
588 }
589 
590 void mutexUnlock(void* handle)
591 {
592 
593 #if PLATFORM_IS_EMBEDDED
594 
595  return;
596 
597 #elif CPP11_IS_ENABLED
598 
599  ((mutex*)handle)->unlock();
600 
601 #elif PLATFORM_IS_WINDOWS
602 
603  LeaveCriticalSection((CRITICAL_SECTION*)handle);
604 
605 #else
606 
607  pthread_mutex_unlock((pthread_mutex_t*)handle);
608 
609 #endif
610 
611 }
612 
613 void mutexFree(void* handle)
614 {
615  if (handle == NULL)
616  {
617  return;
618  }
619 
620 #if PLATFORM_IS_EMBEDDED
621 
622  return;
623 
624 #elif CPP11_IS_ENABLED
625 
626  delete (mutex*)handle;
627 
628 #elif PLATFORM_IS_WINDOWS
629 
630  DeleteCriticalSection((CRITICAL_SECTION*)handle);
631  FREE(handle);
632 
633 #else
634 
635  pthread_mutex_destroy((pthread_mutex_t*)handle);
636  FREE(handle);
637 
638 #endif
639 
640 }
641 
642 int32_t convertDateToMjd(int32_t year, int32_t month, int32_t day)
643 {
644  return
645  367 * year
646  - 7 * (year + (month + 9) / 12) / 4
647  - 3 * ((year + (month - 9) / 7) / 100 + 1) / 4
648  + 275 * month / 9
649  + day
650  + 1721028
651  - 2400000;
652 }
653 
654 int32_t convertGpsToMjd(int32_t gpsWeek, int32_t gpsSeconds)
655 {
656  uint32_t gpsDays = gpsWeek * 7 + (gpsSeconds / 86400);
657  return convertDateToMjd(1980, 1, 6) + gpsDays;
658 }
659 
660 void convertMjdToDate(int32_t mjd, int32_t* year, int32_t* month, int32_t* day)
661 {
662  int32_t j, c, y, m;
663 
664  j = mjd + 2400001 + 68569;
665  c = 4 * j / 146097;
666  j = j - (146097 * c + 3) / 4;
667  y = 4000 * (j + 1) / 1461001;
668  j = j - 1461 * y / 4 + 31;
669  m = 80 * j / 2447;
670  *day = j - 2447 * m / 80;
671  j = m / 11;
672  *month = m + 2 - (12 * j);
673  *year = 100 * (c - 49) + y + j;
674 }
675 
676 void convertGpsToHMS(int32_t gpsSeconds, int32_t* hour, int32_t* minutes, int32_t* seconds)
677 {
678  // shave off days
679  gpsSeconds = gpsSeconds % 86400;
680 
681  // compute hours, minutes, seconds
682  *hour = gpsSeconds / 3600;
683  *minutes = (gpsSeconds / 60) % 60;
684  *seconds = gpsSeconds % 60;
685 }
686 
687 uint32_t dateToWeekDay(uint32_t ul_year, uint32_t ul_month, uint32_t ul_day)
688 {
689  uint32_t ul_week;
690 
691  if (ul_month == 1 || ul_month == 2) {
692  ul_month += 12;
693  --ul_year;
694  }
695 
696  ul_week = (ul_day + 2 * ul_month + 3 * (ul_month + 1) / 5 + ul_year +
697  ul_year / 4 - ul_year / 100 + ul_year / 400) % 7;
698 
699  ++ul_week;
700 
701  return ul_week;
702 }
703 
704 gen_1axis_sensor_t gen1AxisSensorData(double time, const float val)
705 {
707  data.time = time;
708  data.val = val;
709  return data;
710 }
711 
712 gen_3axis_sensor_t gen3AxisSensorData(double time, const float val[3])
713 {
715  data.time = time;
716  data.val[0] = val[0];
717  data.val[1] = val[1];
718  data.val[2] = val[2];
719  return data;
720 }
721 
722 gen_dual_3axis_sensor_t genDual3AxisSensorData(double time, const float val1[3], const float val2[3])
723 {
725  data.time = time;
726  data.val1[0] = val1[0];
727  data.val1[1] = val1[1];
728  data.val1[2] = val1[2];
729  data.val2[0] = val2[0];
730  data.val2[1] = val2[1];
731  data.val2[2] = val2[2];
732  return data;
733 }
734 
735 gen_3axis_sensord_t gen3AxisSensorDataD(double time, const double val[3])
736 {
738  data.time = time;
739  data.val[0] = val[0];
740  data.val[1] = val[1];
741  data.val[2] = val[2];
742  return data;
743 }
744 
745 #ifdef __cplusplus
746 } // extern C
747 #endif
748 
749 cMutex::cMutex()
750 {
751  m_handle = mutexCreate();
752 }
753 
754 cMutex::~cMutex()
755 {
756  mutexFree(m_handle);
757 }
758 
759 void cMutex::Lock()
760 {
761  mutexLock(m_handle);
762 }
763 
764 void cMutex::Unlock()
765 {
766  mutexUnlock(m_handle);
767 }
768 
769 cMutexLocker::cMutexLocker(cMutex* mutex)
770 {
771  assert(mutex != NULLPTR);
772  m_mutex = mutex;
773  m_mutex->Lock();
774 }
775 
776 cMutexLocker::~cMutexLocker()
777 {
778  m_mutex->Unlock();
779 }
float val
Definition: data_sets.h:947
const char * tempPath()
void threadJoinAndFree(void *handle)
float step_sinwave(float *sig_gen, float freqHz, float amplitude, float periodSec)
Initialize signal generator.
float val2[3]
Definition: data_sets.h:970
void * threadCreateAndStart(void(*function)(void *info), void *info)
uint32_t dateToWeekDay(uint32_t ul_year, uint32_t ul_month, uint32_t ul_day)
uint64_t timerRawStart()
size_t splitString(const string &s, const string &delimiter, vector< string > &result)
int bootloadUploadProgress(const void *port, float percent)
uint64_t timerRawEnd(uint64_t start)
int bootloadVerifyProgress(const void *port, float percent)
#define NULL
Definition: nm_bsp.h:52
uint64_t current_timeUs()
uint64_t getTickCount(void)
int32_t convertDateToMjd(int32_t year, int32_t month, int32_t day)
gen_1axis_sensor_t gen1AxisSensorData(double time, const float val)
#define NULLPTR
Definition: ISConstants.h:426
void mutexUnlock(void *handle)
void bootloadStatusInfo(const void *port, const char *str)
const unsigned char * getHexLookupTable()
#define FREE(m)
Definition: ISConstants.h:138
volatile uint64_t time_ticks(void)
Definition: d_time.c:65
std::ostream & cout()
string base64Encode(const unsigned char *bytes_to_encode, unsigned int in_len)
Definition: ISUtilities.cpp:53
int current_timeMs()
FILE * openFile(const char *path, const char *mode)
#define printf(...)
Definition: evb_tasks.h:36
uint8_t getHexValue(unsigned char hex)
#define C_PI_F
Definition: ISConstants.h:554
static const string s_base64_chars
Definition: ISUtilities.cpp:47
uint64_t timerUsStart()
void convertMjdToDate(int32_t mjd, int32_t *year, int32_t *month, int32_t *day)
#define MALLOC(m)
Definition: ISConstants.h:136
USBInterfaceDescriptor data
gen_3axis_sensor_t gen3AxisSensorData(double time, const float val[3])
void * mutexCreate(void)
#define C_TWOPI_F
Definition: ISConstants.h:555
uint64_t timerUsEnd(uint64_t start)
static bool is_base64(unsigned char c)
Definition: ISUtilities.cpp:48
void mutexFree(void *handle)
int32_t convertGpsToMjd(int32_t gpsWeek, int32_t gpsSeconds)
int current_timeSec()
is_can_time time
Definition: CAN_comm.h:252
gen_dual_3axis_sensor_t genDual3AxisSensorData(double time, const float val1[3], const float val2[3])
float val1[3]
Definition: data_sets.h:967
void convertGpsToHMS(int32_t gpsSeconds, int32_t *hour, int32_t *minutes, int32_t *seconds)
string base64Decode(const string &encoded_string)
gen_3axis_sensord_t gen3AxisSensorDataD(double time, const double val[3])
void mutexLock(void *handle)


inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:17:57