Latitude Longtitude Altitude convert to X Y Z with starting reference
조회 수: 72 (최근 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!