% SIXDOF Calculate aircraft fixed-mass rigid-body six-degrees-of-freedom
% equations of motion using MATLAB ODE45 solver.
% Forces = 3x1 vector of forces in body coordinates
% Moments = 3x1 vectory of moments in body coordinates
% Mass = fixed mass of the aircraft
% Inertia = 3x3 Inertia Tensor matrix
% tarray = time series vector
% OPTIONAL INPUTS:
% Ipos_i = 3x1 vector of initial position
% Ivel_b = 3x1 vector of initial velocity (body)
% Irates_b = 3x1 vector of initial body rates
% Ieuler = 3x1 vector of initial euler angles
% t = simulation time
% y(1:3) = body rates
% y(4:6) = velocity in body coordinates
% y(7:9) = position in body coordinates
Note: the equation for the body-frame position is wrong.
dr/dt = v is only valid in a inertial frame, not on a rotating frame.
The right equation is
dr/dt = v - (omega)x(r), where x is the cross product between 2 vectors.
Then, the code is
y(4:6) - cross(y(1:3), y(7:9))
The rotation part works perfectly though, thanks
There is little reason for this *single* file to be highly rated. Errors as mentioned previously Mar 2008 have NOT been corrected.
The author apparently wants to play with the new custom toolbox toy. Nothing else here.
The Euler angles should have been included in the output.
That's a very good program!
Can anybody help me to get as an output the euler angles value...?
What should I supplement?
I tried something but unfortunately i didn't get the presumed result.
Great file, great help for people (like me) who are looking for software to simulate unconstrained motion of a rigid body. Quick comment: the code has a small bug...
In line 86:
Ipos_i = dcm*Ipos_i; % 3-by-3 by 1-by-3
Can be simply changed to:
Ipos_i = dcm*Ipos_i'; % 3-by-3 by 1-by-3
Ipos_i = Ipos_i';
Or something fancier. In any case, this is a great piece of code, and it is rather self-explanatory so disregard other reviews asking to make comments in the code.
In my humble opinion, if the derivation is unclear, one should write out (by hand) the equations to get a clearer picture. There are also short tutorials on the subject available (e.g., search for SIGGRAPH '97 unconstrained motion).
Very Good matlab function, especially for undergraduates to understand 6dof concept and to use this for case study simulation.
aku minta simulasi dinamik yang lain ya!
This is a very best simulation i ever found... hehehe...
je suis hocine ,je cherche des documents sur la simmulatuin avec maleb et qui concerne les signaux aléatoires (domaine des telecommunication).
je vous remirci.
The code looks good. I would increase the rating to five if the code included more details in the description.
This is my first download. I hope the description is an accurate description of the application. I am assuming the download includes the code. Not knowing exactly what I am getting is why I rated this 3. I will know more when I download the file.
update to MATLAB Toolbox File format
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.