-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathEx5_float_solut_multiepoch_doguilmak.m
69 lines (47 loc) · 1.49 KB
/
Ex5_float_solut_multiepoch_doguilmak.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
function[dxi, v, vtpv, qx, m0, cx] = Ex5_float_solut_multiepoch_doguilmak
clc
wavelenght_L1 = 0.1902937;
[nrsat, xsatref, ysatref, zsatref, pref, L1ref, L2ref, xsatrov, ysatrov, zsatrov, prov, L1rov, L2rov] = textread('sat3.txt', '%d%f%f%f%f%f%f%f%f%f%f%f%f', 'headerlines',6);
xyz_app = [4075599.632, 931875.237, 4801587.744];
xyz_ref = [4075535.184, 931821.775, 4801609.099];
nsat = 7;
nepoch = 5;
iref = 4;
DD_L = [];
k=1;
for i=1:nepoch
L1refi = L1ref(k:k+nsat-1);
L1rovi = L1rov(k:k+nsat-1);
L1refref = L1refi(iref);
L1rovref = L1rovi(iref);
L1refi(iref) = [];
L1rovi(iref) = [];
DD_Lk = (L1rovi - L1refi) - (L1rovref - L1refref);
DD_L = [DD_L;DD_Lk];
k = k+nsat;
end
format long g
DD_Livec = [];
k=1;
k1=1;
M = zeros(6,7);
M(1:3,1:3) = eye(3);
M(:,4) = -ones(6,1);
M(4:6,5:7) = eye(3);
M
for i=1:nepoch
xsatrefi = xsatref(k:k+nsat-1);
ysatrefi = ysatref(k:k+nsat-1);
zsatrefi = zsatref(k:k+nsat-1);
xsatrovi = xsatrov(k:k+nsat-1);
ysatrovi = ysatrov(k:k+nsat-1);
zsatrovi = zsatrov(k:k+nsat-1);
rosatref = sqrt((xsatrefi-xyz_ref(1)).^2 + (ysatrefi-xyz_ref(2)).^2 + (zsatrefi-xyz_ref(3)).^2);
rosatrov = sqrt((xsatrovi-xyz_app(1)).^2 + (ysatrovi-xyz_app(2)).^2 + (zsatrovi-xyz_app(3)).^2);
SD = rosatrov - rosatref;
DD = M * SD;
DD_Livec = [DD_Livec ; DD];
k = k+nsat;
end
format long g
DD_Livec