Browse Source

Before ATP of MER Group (preluminary)

AGP
Evgeny Gagua 3 years ago
parent
commit
fe50367773
  1. 2
      Projects/la_mojo/build
  2. 14
      lib/App/common/deviceNode2D.cpp
  3. 2
      lib/App/mojo/mojoKernel.cpp
  4. 45
      lib/components/object/objectSystemAnchor.cpp

2
Projects/la_mojo/build

@ -4,7 +4,7 @@
#make clean -e "CFG=Debug"
#make -e "CFG=Debug" -j6
make clean -e "CFG=Debug86"
#make clean -e "CFG=Debug86"
make -e "CFG=Debug86" -j4
#make clean -e "CFG=Release86"

14
lib/App/common/deviceNode2D.cpp

@ -3138,10 +3138,16 @@ TARGET_DATA *device2DSensor::prepareTargetData( uint16_t AZ, uint16_t RANGE, uin
// system - C3D_DECART
// global - C3D_WGS84_LOC
tSystem->convertToSystem( &m_oPosition, tVal->local_target, tVal->system_target );
//ToDo: Fix Convert!
tSystem->convertToGlobal( &m_oPosition, tVal->local_target, tVal->global_target );
//tSystem->convertToGlobal( &m_oPosition, tVal->system_target, tVal->global_target );
#ifdef DEBUG_EXTRA
if ( tSystem->beLocal() ) {
tVal->global_target.lat = tVal->system_target.y;
tVal->global_target.lon = tVal->system_target.x;
tVal->global_target.alt = tVal->system_target.z;
} else {
//ToDo: Fix Convert!
tSystem->convertToGlobal(&m_oPosition, tVal->local_target, tVal->global_target);
//tSystem->convertToGlobal( &m_oPosition, tVal->system_target, tVal->global_target );
};
#ifdef DEBUG
char tB[128];
sprintf(tB, "tCords Local: %0.3f %0.3f %0.3f", tVal->local_target.r, tVal->local_target.fi, tVal->local_target.tetta );
LOG( tB );

2
lib/App/mojo/mojoKernel.cpp

@ -155,7 +155,7 @@ bool mojoKernel::create(){
t.lat = tSiteData->lat;
t.lon = tSiteData->lon;
t.alt = tSiteData->alt;
m_pSystemAnchor = systemAnchor::getInstance( tSiteData->SH, &t, false );//tSiteData->local_binding );
m_pSystemAnchor = systemAnchor::getInstance( tSiteData->SH, &t, tSiteData->local_binding );
free( tSiteData );
} else {
LOG_ERROR("Error Loading Site DATA!");

45
lib/components/object/objectSystemAnchor.cpp

@ -93,17 +93,23 @@ systemAnchor::systemAnchor( bool SOUTH, C3D_WGS84_LOC *ptr, bool beJustLocal ):
basicSettingsProvider::getInstance()->validate();
};
} else {
lat = ptr->lat;
lon = ptr->lon;
z = ptr->alt;
if ( m_bUseJustLocalDiffCoords ) {
y = lat = ptr->lat;
x = lon = ptr->lon;
z = ptr->alt;
} else {
lat = ptr->lat;
lon = ptr->lon;
z = ptr->alt;
#ifdef FLOAT_64
double A, B;
utmZone = CC.LatLonToUTMXY( lat, lon, 0 , A, B );
x = A;
y = B;
double A, B;
utmZone = CC.LatLonToUTMXY( lat, lon, 0 , A, B );
x = A;
y = B;
#else
utmZone = m_SCC.LatLonToUTMXY(lat, lon, m_bSouthHemisphere, x, y);
utmZone = m_SCC.LatLonToUTMXY(lat, lon, m_bSouthHemisphere, x, y);
#endif
};
};
#ifdef DEBUG
char tBuff[256];
@ -315,28 +321,31 @@ bool systemAnchor::convertToSystem(basicPosition *SP, C3D_SPH_DEGREES POS, C3D_D
A[0] = tDec.x;
A[1] = tDec.y;
A[2] = tDec.z;
#ifdef DEBUG_EXTRA
#ifdef DEBUG
char tB[256];
LOG("C2S Sph.(deg) -> Dec.");
sprintf( tB, "Local Decart: %.3f %.3f %.3f", A[0], A[1], A[2] );
LOG( tB );
#endif
pTF->get_vector_world( A, B );
#ifdef DEBUG_EXTRA
#ifdef DEBUG
sprintf( tB, "World Decart: %.3f %.3f %.3f", B[0], B[1], B[2] );
LOG( tB );
#endif
#ifdef DEBUG_EXTRA
#ifdef DEBUG
sprintf( tB, "Systen Anchor Decart: %.3f %.3f %.3f", getX(), getY(), getZ() );
LOG( tB );
#endif
LOC.x = B[0] - getX();
//LOC.x = B[0] + SP->getX() - getX();
LOC.y = B[1] - getY();
//LOC.y = B[1] + SP->getY() - getY();
LOC.z = B[2] - getZ();
//LOC.z = B[2] + SP->getZ() - getZ();
#ifdef DEBUG_EXTRA
if ( m_bUseJustLocalDiffCoords ) {
LOC.x = B[0];
LOC.y = B[1];
LOC.z = B[2];
} else {
LOC.x = B[0] - getX();
LOC.y = B[1] - getY();
LOC.z = B[2] - getZ();
};
#ifdef DEBUG
sprintf( tB, "Final System Decart: %.3f %.3f %.3f", LOC.x, LOC.y, LOC.z );
LOG( tB );
#endif

Loading…
Cancel
Save