plot boat heading
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Matt Kindig
am 14 Apr. 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 Kommentare
Siehe auch
Kategorien
Mehr zu Vector Fields finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!