enu2ecef function produces incorrect results
7 views (last 30 days)
Show older comments
Hello!
I need to convert ENU position data of an object to an ECEF type of data.
I have this in my code:
refLat = ...; % in radians
refLon = ..; % in radians
refAlt = ...; % in meters
objPosXENU = ...; % in meters
objPosYENU = ...; % in meters
objPosZENU = ...; % in meters
spheroid = wgs84Ellipsoid;
[objPosXECEF, objPosYECEF, objPosZECEF] = eun2ecef(objPosXENU, objPosYENU, objPosZENU, refLat refLon, refAlt, spheroid);
Then I convert ECEF positon back to ENU to double check that the conversion was correct:
[posXENU, posYENU, posZENU] = ecef2enu(objPosXECEF, objPosYECEF, objPosZECEF, refLat refLon, refAlt, spheroid);
Then I plot objPosXENU, objPosYENU (original data) and posXENU, posYENU (converted data) on the same plot and my converted data is not the same as the original data. It's shifted in the East direction by a few hundred meters. The North direcation looks normal, it's only the East direction that gets shifted. What am I doing wrong?
Thank you for any input.
0 Comments
Answers (1)
See Also
Categories
Find more on 3-D Coordinate and Vector Transformations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!