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.
 
 
 
 
 
 

51 lines
2.1 KiB

#ifndef __POSITION_SYSTEM_SANCHOR_HEADER__
#define __POSITION_SYSTEM_SANCHOR_HEADER__
#include "../base/basicPosition.h"
#include "../base/basicSettingsProvider.h"
#include <string.h>
#define TAG_POSITION_LAT "POSITION_LATITUDE"
#define TAG_POSITION_LON "POSITION_LONGITUDE"
#define TAG_POSITION_SOUTH_HS "SOUTH_HEMISPHERE"
#define TAG_POSITION_ALT "POSITION_ALT"
#define TAG_POSITION_ROLL "ORIENTATION_ROLL"
#define TAG_POSITION_PITCH "ORIENTATION_PITCH"
#define TAG_POSITION_YAW "ORIENTATION_YAW"
#define TAG_POSITION_LOCAL "POSITION_LOCAL_DIFF"
class systemAnchor: public position3D {
private:
config_setting_t *m_pSettings;
coordConverter m_SCC;
bool m_bSouthHemisphere;
bool m_bUseJustLocalDiffCoords;
public:
static systemAnchor *getInstance( bool SOUTH = false, C3D_WGS84_LOC *ptr = NULL, bool jl = false );
virtual ~systemAnchor( void );
// local - C3D_SPH_RADIANS/C3D_SPH_DEGREES
// system - C3D_DECART
// global - C3D_WGS84_LOC
bool convertToLocal(basicPosition *SP, C3D_WGS84_LOC POS, C3D_SPH_DEGREES &LOC);
bool convertToLocal(basicPosition *SP, C3D_WGS84_LOC POS, C3D_SPH_RADIANS& LOC);
bool convertToLocal(basicPosition *SP, C3D_DECART POS, C3D_SPH_DEGREES& LOC);
bool convertToLocal(basicPosition *SP, C3D_DECART POS, C3D_SPH_RADIANS& LOC);
bool convertToSystem(basicPosition *SP, C3D_WGS84_LOC POS, C3D_DECART& LOC);
bool convertToSystem(basicPosition *SP, C3D_SPH_DEGREES POS, C3D_DECART& LOC);
bool convertToSystem(basicPosition *SP, C3D_SPH_RADIANS POS, C3D_DECART& LOC);
bool convertToGlobal(basicPosition *SP, C3D_SPH_DEGREES POS, C3D_WGS84_LOC& LOC);
bool convertToGlobal(basicPosition *SP, C3D_SPH_RADIANS POS, C3D_WGS84_LOC& LOC);
bool convertToGlobal(basicPosition *SP, C3D_DECART POS, C3D_WGS84_LOC& LOC);
bool beLocal( void ){ return m_bUseJustLocalDiffCoords; };
private:
static systemAnchor *_instance;
protected:
explicit systemAnchor( bool SOUTH, C3D_WGS84_LOC *ptr, bool beJustLocal );
};
#endif