How to get a column vector for all the considered time instants?
Afficher commentaires plus anciens
Hi everyone. I have a problem with this code. At the end I would like to obtain the r_ORF column vector for all the time instants (41) but I don't understand why this does not happen in this code. Thanks in advance.
clc;clear all; close all;
% Components determination in ORF
% ECI (GEOC) to ORF matrix determination
A = load('DatiCosmoSkymed.txt');
times = A(:,1);
for i = 1: length(times)
r_inertial(1,i)= A(i,8);
r_inertial(2,i)= A(i,9);
r_inertial(3,i)= A(i,10);
v_inertial(1,i)= A(i,11);
v_inertial(2,i)= A(i,12);
v_inertial(3,i)= A(i,13);
kORF_ECI=-r_inertial/norm(r_inertial);
jORF_ECI=-cross(r_inertial,v_inertial)/norm(cross(r_inertial,v_inertial));
iORF_ECI=cross(jORF_ECI,kORF_ECI);
M_ECItoORF(1,1)=iORF_ECI(1,1);
M_ECItoORF(1,2)=iORF_ECI(2,1);
M_ECItoORF(1,3)=iORF_ECI(3,1);
M_ECItoORF(2,1)=jORF_ECI(1,1);
M_ECItoORF(2,2)=jORF_ECI(2,1);
M_ECItoORF(2,3)=jORF_ECI(3,1);
M_ECItoORF(3,1)=kORF_ECI(1,1);
M_ECItoORF(3,2)=kORF_ECI(2,1);
M_ECItoORF(3,3)=kORF_ECI(3,1);
r_ECI = r_inertial;
r_ORF = M_ECItoORF*r_ECI;
display(r_ORF)
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Get Started with MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!