# how can I calculate the nautical direction angle from Cartesian x- and y-component of velocity

15 vues (au cours des 30 derniers jours)
jie hu le 27 Déc 2023
Commenté : Sam Chak le 27 Déc 2023
I have a set of Cartesian x- (u) and y-component (v) of velocity. But I want the velocity to be Nautical direction based, which I did the follows:
for k=1:length(u)
if u(k) > 0 && v(k) >0 % velocity direction is from southwest and pointing towards northeast
elseif u(k) < 0 && v(k) >0
elseif u(k) < 0 && v(k) <0
else
end
end
May I know if my understanding is conceptually correct?
##### 3 commentairesAfficher 1 commentaire plus ancienMasquer 1 commentaire plus ancien
jie hu le 27 Déc 2023
Déplacé(e) : Dyuman Joshi le 27 Déc 2023
thanks, But I am talking about the direction in Nautical convention. for y1 = atan2d(10, 10) = 45, shall that angle be 225 in Nautical convention?
Dyuman Joshi le 27 Déc 2023
As I said earlier, I am not familiar with Nautical convention.
Could you provide a definition/reference to it?

Connectez-vous pour commenter.

### Réponses (1)

Chunru le 27 Déc 2023
Modifié(e) : Chunru le 27 Déc 2023
vx = 10;
vy = 10;
v = sqrt(vx.^2 + vy.^2)
v = 14.1421
theta = wrapTo360(90 - rad2deg(atan2(vy, vx))) % Earth coordinates, with ref to North, Clock wise
theta = 45
##### 5 commentairesAfficher 3 commentaires plus anciensMasquer 3 commentaires plus anciens
Chunru le 27 Déc 2023
In nautical navigation the absolute bearing is the clockwise angle between north and an object observed from the vessel. https://en.wikipedia.org/wiki/Bearing_(angle)
The wind direction is defined as the direction from which the wind originates (the opposite of the wind velocity vector).
Sam Chak le 27 Déc 2023

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Earth, Ocean, and Atmospheric Sciences dans Help Center et File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by