You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.8 KiB

7 years ago
​
​
7 years ago
​
​
​
​
7 years ago
​
​
​
​
​
​
​
​
​
7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 years ago
​
​
​
​
​
​
  1. #ifndef __POSITION_SYSTEM_SANCHOR_HEADER__
  2. #define __POSITION_SYSTEM_SANCHOR_HEADER__
  3. #include "../base/basicPosition.h"
  4. #include "../base/basicSettingsProvider.h"
  5. #include <string.h>
  6. #define TAG_POSITION_LAT "POSITION_LATITUDE"
  7. #define TAG_POSITION_LON "POSITION_LONGITUDE"
  8. #define TAG_POSITION_SOUTH_HS "SOUTH_HEMISPHERE"
  9. #define TAG_POSITION_ALT "POSITION_ALT"
  10. #define TAG_POSITION_ROLL "ORIENTATION_ROLL"
  11. #define TAG_POSITION_PITCH "ORIENTATION_PITCH"
  12. #define TAG_POSITION_YAW "ORIENTATION_YAW"
  13. class systemAnchor: public position3D {
  14. private:
  15. config_setting_t *m_pSettings;
  16. coordConverter m_SCC;
  17. bool m_bSouthHemisphere;
  18. public:
  19. static systemAnchor *getInstance(void);
  20. virtual ~systemAnchor( void );
  21. // local - C3D_SPH_RADIANS/C3D_SPH_DEGREES
  22. // system - C3D_DECART
  23. // global - C3D_WGS84_LOC
  24. bool convertToLocal(basicPosition *SP, C3D_WGS84_LOC POS, C3D_SPH_DEGREES &LOC);
  25. bool convertToLocal(basicPosition *SP, C3D_WGS84_LOC POS, C3D_SPH_RADIANS& LOC);
  26. bool convertToLocal(basicPosition *SP, C3D_DECART POS, C3D_SPH_DEGREES& LOC);
  27. bool convertToLocal(basicPosition *SP, C3D_DECART POS, C3D_SPH_RADIANS& LOC);
  28. bool convertToSystem(basicPosition *SP, C3D_WGS84_LOC POS, C3D_DECART& LOC);
  29. bool convertToSystem(basicPosition *SP, C3D_SPH_DEGREES POS, C3D_DECART& LOC);
  30. bool convertToSystem(basicPosition *SP, C3D_SPH_RADIANS POS, C3D_DECART& LOC);
  31. bool convertToGlobal(basicPosition *SP, C3D_SPH_DEGREES POS, C3D_WGS84_LOC& LOC);
  32. bool convertToGlobal(basicPosition *SP, C3D_SPH_RADIANS POS, C3D_WGS84_LOC& LOC);
  33. bool convertToGlobal(basicPosition *SP, C3D_DECART POS, C3D_WGS84_LOC& LOC);
  34. private:
  35. static systemAnchor *_instance;
  36. protected:
  37. systemAnchor( void );
  38. };
  39. #endif