Why does geodetic2aer give ranges differing extremely from euclidian distance?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
DISCLAIMER: This is a duplicate of http://stackoverflow.com/questions/39129748/matlab-mapping-toolbox-function-geodetic2aer-gives-extremely-different-ranges-th and http://de.mathworks.com/matlabcentral/newsreader/view_thread/346036, but I don't seem to get a lot of responses there. So I thought I might just try MATLAB Answers for the first time.
Now to the problem: I am calculating slant range distances between different points, of which I have both the lat-lon-height as well as the ENU coordinates (UTM, same heights as for in lat-lon-height). Now, I am using the function geodetic2aer from MATLAB's Mapping Toolbox to determine the slant ranges between these points.
In addition, I calculate the euclidian norm in XYZ space as defined by the UTM ENU-coordinates. The strange thing is: I get differences in range of up to 35 meters! That can't be right, can it?
I try to provide a minimal working example here:
P1_utm = [19237270 4714162 246.197998046875];
P1_llh = [42.5351900557357 -72.1991953382484 246.197998046875];
P2_utm = [19239222.083941354 4716423.97292039 778.630006880859];
P2_llh = [42.5563144623905 -72.176008488885 772.845077514484];
range_utm = norm(P1_utm-P2_utm);
S = referenceEllipsoid('wgs84');
[~,~,range_llh] = geodetic2aer(P1_llh(1),P1_llh(2),P1_llh(3),P2_llh(1),P2_llh(2),P2_llh(3),S);
This way you will end up with
range_utm = 3034.90313695554
range_llh = 3067.98897478523
What's happening here?? The transformation between lat-lon-height and UTM coordinates has been carried out using Peter Wasmeier's Geodetic Transformations Toolbox from MATLAB file exchange, and transforming back and forth gives residual errors in the 1e-4 to 1e-6 range - so this shouldn't be the problem.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Coordinate Systems finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!