Hi Guys
Qt 5.15, ArcGis 100.9
I'm prototyping a simple flightplan tool to get to know the SDK better. The flightplan is described in NED system with meters and is referenced with a WGS84 point.
I need CurvedSegments but as of right now there are no such thing in the SDK. The closest I've seen is GeodesicSector, but this gives me a closed Polyline. I do not need the straight line (radius).
Currently im doing it like this.
QQuaternion rotQ = QQuaternion::fromAxisAndAngle(QVector3D(0,0,1),qRadiansToDegrees(m_angle)/100.0);
QMatrix4x4 rot(rotQ.toRotationMatrix());
QVector3D r = m_startArc;
for(int i = 0; i < 100; i++){
r = rot.map(r);
QVector3D point = m_center + r;
VisualObject::setPoint(i,VisualObject::localToWGS84(point,m_reference));
}
Esri::ArcGISRuntime::Point VisualObject::localToWGS84(QVector3D &point, Esri::ArcGISRuntime::Point &reference){
qreal azimuth = qAtan2(point.y(),point.x());
QList<Esri::ArcGISRuntime::Point> movedPoints = Esri::ArcGISRuntime::GeometryEngine::moveGeodetic({reference},point.length(),Esri::ArcGISRuntime::LinearUnit::meters(),azimuth,Esri::ArcGISRuntime::AngularUnit::radians(),Esri::ArcGISRuntime::GeodeticCurveType::Geodesic);
if(movedPoints.isEmpty()){
return reference;
}
return movedPoints.first();
}
As you can imagine this is very slow. When I calculate everything in Web Mercator it is faster because i dont need the moveGeodetic command but I lose precisision when I compare it with the above method.
My guess is that I just don't know where to look for a better solution. Do you have an idea to improve the performance?
Best regards