Radius from a GPS trajectory
11 views (last 30 days)
Show older comments
Hello,
I have a table with three variables, from a car driving arround a circuit: distance in meters, latitude and longitude in degress (decimals).
I would like to calculate a fourth column with the corner radius (in meters) that the car is doing in each point, in other words, the radius of the gps lines when they are plotted as if each small segment was part of single circle.

Of course, the result will tend to infinite when the car is in a straight line, but this is for me not an issue.
My best attempt was creating a function like that:
for i = 1:(numel(Map.Distance)-3)
xTemp = Map.Latitude(i:i+3);
yTemp = Map.Longitude(i:i+3);
Map.Radius(i) = circfit(xTemp, yTemp);
end
Function circfit was this one: https://de.mathworks.com/matlabcentral/fileexchange/5557-circle-fit
But this is not really working... Any ideas?
2 Comments
Answers (0)
See Also
Categories
Find more on Language Support 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!