Latitude Longtitude Altitude convert to X Y Z with starting reference
102 views (last 30 days)
Show older comments
Hi,
I have a gpx data logged by mobile smartphone. So I have latitude longitude and gps altitude (meters)
I am not a geo expert. I am trying to obtain a simple 3D digitized road from this data.
The data should be in x y z format.
I tried a code like this
p = lla2ecef(data1,'WGS84');
but the Z answer is actually really different from the altitude data. Same for x and y data.
plot3D result of this code is representing the profile but the values are really huge. It seems I should substract from a reference ??? That I do not know.
So is there any method or way that to convert is to real x y and z that helps to create 3D road with (x,y,z,) coordinate
Or to convert it to a data format that the starting point is 0 0 0 and.. or 0 0 6.5 it will change with road...(6.5 is starting height)
(ın other words ı am mentioning changing the lat long alttiude data to 3D line that starting reference can be changed by me)
GPS data is attached in mat format to the question.
2 Comments
Answers (1)
Michael Madelaire
on 2 Jan 2019
Hi, there are still an unanswered question about the altitude that you have applied. Is it altitude above sea level? or is it some other reference point?
1) Convert your GPS coordinates from long, lat and altitude to long, lat, radius (from Earths center).
3) Substract the first position (t=0) from all others, thus making it the new reference point.
See Also
Categories
Find more on Coordinate Systems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!