Calculate Rotaion for referenceframe
Ältere Kommentare anzeigen
Hello, I would like to determine the 3 rotation parameters from the 2 given files (each with different frequenzcy bands) Unfortunately I always got the value zero. The files have the same size and the respective sources are in the same array position. The required right ascension α (Var5 in the file) and declination δ (Var8) are given in hours and degrees. I have a problem with the adjustment calculation and currently the dimension from the two arrays dosent match. I also have to determine the Uncertainty for the respective rotation parameter.The given equation is ∆α cos δ = R1 cos α sin δ + R2 sin α sin δ − R3 cos δ. I already prepared the data and filtered the sources.
data1 = readtable('Sources_in_SX_filtered_XKA_with_SX.csv');
data2 = readtable('Sources_in_XKA_filtered_XKA_with_SX.csv');
alpha1 = data1.Var5;
delta1 = data1.Var8;
alpha2 = data2.Var5;
delta2 = data2.Var8;
% arcsec
alpha1_arcsec = alpha1 * 15 * 3600; % right ascension data 1 in arsec
delta1_arcsec = delta1*3600; % declination data 1 in arcsec
alpha2_arcsec = alpha2* 15 * 3600; % right ascension data 2 in arsec
delta2_arcsec = delta2*3600; % declination data 2 in arcsec
% coordinate differences
delta_alpha_cos_delta_arcsec = cos(delta1_arcsec) .* (alpha2_arcsec - alpha1_arcsec);
% linear adjustment calculation for the rotation
A = [sin(alpha1_arcsec) .* sin(delta1_arcsec), cos(alpha1_arcsec) .* sin(delta1_arcsec),-cos(delta1_arcsec)];
L = delta_alpha_cos_delta_arcsec';
% solve
X = pinv(A) * L; % wrong dimensions for matrix multiplication 556x3 * 556x1 not possible
% ectract rotation parameter
R1_arcsec = X(1);
R2_arcsec = X(2);
R3_arcsec = X(3);
Antworten (1)
data1 = readtable('Sources_in_SX_filtered_XKA_with_SX.csv');
data2 = readtable('Sources_in_XKA_filtered_XKA_with_SX.csv');
alpha1 = data1.Var5;
delta1 = data1.Var8;
alpha2 = data2.Var5;
delta2 = data2.Var8;
% arcsec
alpha1_arcsec = alpha1 * 15 * 3600; % right ascension data 1 in arsec
delta1_arcsec = delta1*3600; % declination data 1 in arcsec
alpha2_arcsec = alpha2* 15 * 3600; % right ascension data 2 in arsec
delta2_arcsec = delta2*3600; % declination data 2 in arcsec
% coordinate differences
delta_alpha_cos_delta_arcsec = cos(delta1_arcsec) .* (alpha2_arcsec - alpha1_arcsec);
% linear adjustment calculation for the rotation
A = [sin(alpha1_arcsec) .* sin(delta1_arcsec), cos(alpha1_arcsec) .* sin(delta1_arcsec),-cos(delta1_arcsec)];
% no transpose (or do transpose here, then transpose L in the next step)
L = delta_alpha_cos_delta_arcsec;
% solve
X = pinv(A) * L % correct dimensions for matrix multiplication 3x556 * 556x1
% ectract rotation parameter
R1_arcsec = X(1);
R2_arcsec = X(2);
R3_arcsec = X(3);
1 Kommentar
Jakob
am 26 Aug. 2023
Kategorien
Mehr zu Aerospace Applications finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!