Latitude Longtitude Altitude convert to X Y Z with starting reference
74 次查看(过去 30 天)
显示 更早的评论
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 个评论
Michael Madelaire
2018-12-30
编辑:Michael Madelaire
2018-12-30
So let me understand what you are saying.
The data you have given is [latitude, longitude, altitude]. I presume that the altitude is from sea-level? since the values are so small.
Next I do not understand why you suddenly say that the data is in x, y, z? wasn't it just in geodetic...
lla2ecef
Doesn't take x, y, z as input or give them as output. Simply changes reference frame.
But what you simply want is to illustrate the path in a plot, yes?
回答(1 个)
Michael Madelaire
2019-1-2
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Mapping Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!