Search the Community
Showing results for tags 'geodetic'.
-
Cloud layer is vanishing when setting semimajor axis of ellipsoid
sebastian.vesenmayer posted a topic in C++ Programming
Hi, just tried to let the clouds vanish at the horizon. When using the c++ api, only the standard value of 6378.137 km is working correctly for the ellipsoid of the GeodeticPivot. When I slightly change it the clouds will vanish. I am using OpenGL and Unigine 2.7.2.1. m_cloudsGeodetic = Unigine::GeodeticPivot::create(); m_cloudsGeodetic->setOriginBasis(Unigine::GeodeticPivot::ORIGIN_BASIS_LOCAL); auto ellipsoid = m_cloudsGeodetic->getEllipsoid(); ellipsoid->setMode(Unigine::Ellipsoid::MODE_FAST); ellipsoid->setSemimajorAxis(6378137.); //coverage normal //ellipsoid->setSemimajorAxis(6378137.-500.); //coverage gets higly reduced //ellipsoid->setSemimajorAxis(6378137.+500.); //coverage normal //ellipsoid->setSemimajorAxis(6378137.+1000.); //no clouds visible anymore .... m_cloudsGeodetic->addChild(cloudLayer->getNode()); Did I miss something or is it a bug? Thanks Sebastian -
Hello Test code: g = new Unigine::Geodetic(); g.radius_a = 100; // a - ECF dvec3 vector dvec3 b = g.WGSToECF(g.ECFToWGS(a)); log.message(string(a)); log.message(string(b)); Result: 4.5197 -8.45577 99.2056 4.5197 -8.45577 105.983 Why did double conversion to WGS and back change value so much? And why did it change only z coord?