I am writing a program in Qt, in C ++, for translating the coordinate values from the geodetic coordinate system into the coordinates of the rectangular coordinate system, in all calculations I need accuracy to at least the 8th digit.
For example, there is such a function for converting degrees to radians:
#include "convertorad.h" #include <QDebug> #include <QString> double convertToRad(double grad){ double rad; rad = (grad * 3.1415926535897932) / 180; QString str; str.setNum(rad); qDebug() << str; return rad; } The output of qDebug() with grad = 49.8344 and grad = 36.7203 as follows: 
I need a minimum of 0.86977439, and 0.8697743902. Ideally this is up to the 10th mark.
Here is the function itself for converting from a geodetic coordinate system to a rectangular one:
#include "to_rectangular_cs.h" #include <QDebug> QString to_rectangular_cs(double BGrad, double BMin, double BSec, double LGrad, double LMin, double LSec, double h){ BGrad = BGrad + (BMin / 60); BGrad = BGrad + (BSec / 3600); double BRad; BRad = convertToRad(BGrad); LGrad = LGrad + (LMin / 60); LGrad = LGrad + (LSec / 3600); double LRad; LRad = convertToRad(LGrad); double alpha, E, N; int a = 6378137; alpha = 1 / 298.257223563; E = 2 * alpha - pow(alpha, 2); N = a / sqrt((1 - E * pow(sin(BRad), 2))); double X, Y, Z; X = (N + h) * (cos(BRad)) * (cos(LRad)); Y = (N + h) * (cos(BRad)) * (sin(LRad)); Z = (floor(((1 - E) * N + h) + 0.5)) * (sin(BRad)); QString res, str; res = str.setNum(X) + " " + str.setNum(Y) + " " + str.setNum(Z); return res; } The string that is returned by this function with .split ("") is divided and written to the QStringList class variable, and then set to using line.edText () in lineEdit. It is displayed with the exponent up to the 5th digit, but you need a minimum of 8th: 
intnot confuse. - alexis031182