|
52 | 52 | #include <string> |
53 | 53 | #include "cover/coVRConfig.h" |
54 | 54 | #include <PluginUtil/PluginMessageTypes.h> |
55 | | -#include <../../../../3rdparty/easyexif/exif.h> |
56 | 55 | #include <filesystem> |
57 | 56 |
|
58 | 57 | #include "VrmlNodeSkySphere.h" |
@@ -229,14 +228,10 @@ void parseExifData(const std::filesystem::path &path, double &longitude, double |
229 | 228 | auto gimbalYawIt = xmpData.findKey(Exiv2::XmpKey("Xmp.drone-dji.GimbalYawDegree")); |
230 | 229 | auto flightYawIt = xmpData.findKey(Exiv2::XmpKey("Xmp.drone-dji.FlightYawDegree")); |
231 | 230 |
|
232 | | - double yaw = 0.0; |
233 | | - |
234 | 231 | if (gimbalYawIt != xmpData.end()) |
235 | | - yaw += xmpData["Xmp.drone-dji.GimbalYawDegree"].toFloat(); |
| 232 | + trueNorth = xmpData["Xmp.drone-dji.GimbalYawDegree"].toFloat() + 90; |
236 | 233 | if (flightYawIt != xmpData.end()) |
237 | | - yaw += xmpData["Xmp.drone-dji.FlightYawDegree"].toFloat(); |
238 | | - |
239 | | - trueNorth = yaw + 180.0; |
| 234 | + trueNorth = xmpData["Xmp.drone-dji.FlightYawDegree"].toFloat() + 90; |
240 | 235 | } |
241 | 236 | } |
242 | 237 |
|
@@ -427,7 +422,7 @@ bool SkySphere::update() |
427 | 422 | const osg::Matrix &m = cover->getObjectsXform()->getMatrix(); |
428 | 423 |
|
429 | 424 | skyRootNode->setMatrix( |
430 | | - osg::Matrix::scale(scale, scale, scale) * osg::Matrix::rotate(osg::DegreesToRadians(northAngle), osg::Vec3(0, 0, 1)) * osg::Matrix::rotate(m.getRotate()) |
| 425 | + osg::Matrix::scale(scale, scale, scale) * osg::Matrix::rotate(osg::DegreesToRadians(-northAngle), osg::Vec3(0, 0, 1)) * osg::Matrix::rotate(m.getRotate()) |
431 | 426 | * osg::Matrix::translate(cover->getViewerMat().getTrans())); |
432 | 427 | return false; // don't request that scene be re-rendered |
433 | 428 | } |
|
0 commit comments