Differences when using geodetic2aer and aer2geodetic?

13 visualizaciones (últimos 30 días)
Bart
Bart el 30 de Mayo de 2017
I was working to convert some locations and derive angles between them. I wanted to check everything by running the functions the other way and just make sure I understood how everything worked. When I ran the code I got slightly different answers. I have simplified the code to show what my problem is. I start with a lat, long, ht and a destination lat, long, and ht. I calculate the az, elev, and slantrange to the destination. I then use those calculated results with my destination to try to recalculate the starting point. I get slightly different answers especailly in the height which is off by 14.3 meters. I feel like I am missing some conversion or not setting something correclty, but I can't figure out what that is any help would be greatly appreciated.
%%Clear old data
clear all
close all
%%Starting information
myLat = 38.297289639;
myLon = -76.375796722;
myHt = -25.4162;
%%Destination information
dest_lat = 38.211172096750970;
dest_lon = -76.377352632698090;
dest_ht = 2900.782308925875;
%%Calculations
%Get az, el, and slant range give starting point and end point
[az,elev,slantRange] = geodetic2aer(dest_lat,dest_lon,dest_ht,myLat,myLon,myHt,wgs84Ellipsoid);
%Use end point with az, el, and range to calculate staring point
%I flip the sign of the az and el, but don't understand a slight
%difference in my results
[myLat2, myLon2, myHt2] = aer2geodetic(-1*az,-1*elev,slantRange,dest_lat,dest_lon,dest_ht,wgs84Ellipsoid);
latError = myLat - myLat2
lonError = myLon - myLon2
htError = myHt - myHt2

Respuestas (0)

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by