Code covered by the BSD License
Highlights from
Shark
-
J=rpy2J(rpy)
J=rpy2J(rpy); computes generalised Jacobian matrix which
-
R_eb=rpy2R_eb(rpy)
R_eb=rpy2R_eb(rpy), computes the rotation matrix of e-frame wrt b-frame,
-
[Cl,Cd,xcp]=a2clcdxc(alfa)
[Cl,Cd,xcp]=a2clcdxc(alfa) computes hydrodynamic coefficients Cl and Cd
-
[v1,v2,v3]=vehicle()
-
a2clcd(alfa)
[Cl, Cd] = a2clcd(alfa) computes hydrodynamic coefficients Cl and Cd
-
demos
DEMOS Demo list for Shark.
-
shark()
(the function shark adds the needed folders to the matlab path)
-
tc=tau_cor(veh,v,vr)
tc=tau_cor(veh,v,vr) calculates coriolis forces from
-
td=tau_damp(veh,vr,de)
td=tau_damp(veh,vr,de); calculates damping forces from
-
tr=tau_rest(veh,p)
tr=tau_rest(veh,p); calculates restoring forces from
-
xdot=vxdot(xu)
computes state derivatives as a function of state and input
-
z=vp(x,y)
-
contents.m
-
linattk.m
-
NLKSF
-
OPLOOP
-
xtrlmod
-
View all files
from
Shark
by Giampiero Campa
Nonlinear 6DOF Model of an Underwater Vehicle
|
| a2clcd(alfa)
|
function [Cl, Cd] = a2clcd(alfa)
% [Cl, Cd] = a2clcd(alfa) computes hydrodynamic coefficients Cl and Cd
% for the fins
% Costants
CLa = 2.865; % CLalfa [rad^-1]
CDmin = 0.0115; % CDmin
K = 0.1309; % K
ALFA1 = 0.419; % alfa_stall [rad]
ALFA2 = 0.7854; % alfa45 [rad]
C1 = -1.0572; % interpolating coefficients
C2 = 1.6434; % between zone 1 and 3
C3 = 1.6759;
C4 = -0.5021;
CT = 1.15;
% sign correction
mod_alfa=abs(alfa-sign(alfa)*(abs(alfa)>pi/2)*pi);
if mod_alfa < ALFA1
% zone 1
Cl = CLa * mod_alfa ;
Cd = CDmin + K * Cl^2 ;
elseif mod_alfa < ALFA2
% zone2
Cl = C1 * mod_alfa + C2;
Cd = C3 * mod_alfa + C4;
else
% zone 3 , piastra
Cl = CT*cos(mod_alfa);
Cd = CT*sin(mod_alfa);
end;
% sign correction
Cl = Cl*sign(sin(2*alfa));
|
|
Contact us at files@mathworks.com