plot boat heading
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I would like to create a map, which shows my boat survey track and for each data point boat heading as a directional vector. I have lat, lon and boat heading(0-360degree) for each point. However, to create a directional vector (for example with quiver) I need U and V and I can't get my head around what I have to add as value to the boat heading. Unfortunatley I don't have data about boat speed. I created a vector of similar size with only ones, but somehow that doesn't work.
val=ones(length(track(1,1).hd),1);
quiver(track(1,1).lon,track(1,1).lat, track(1,1).hd, val,0)
Any suggestions of how I'm getting around this problem are highly appreciated!!
Many thanks for your help, Astrid
0 comentarios
Respuestas (1)
Matt Kindig
el 14 de Abr. de 2012
My guess is that you would need to take the sine and cosine of the boat heading. Something like:
U = mag*cosd( track(1,1).hd);
V = mag*sind( track(1,1).hd);
where 'mag' is the magnitude (length) of the arrow that you want.
0 comentarios
Ver también
Categorías
Más información sobre Vector Fields en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!