@@ -4782,7 +4782,7 @@ function toString(this)
4782
4782
end
4783
4783
end
4784
4784
4785
- function [XS_tx_r ,XS_tx] = getXSTxRot(this, go_id)
4785
+ function [XS_tx_r ,XS_tx, VS_tx_all ] = getXSTxRot(this, go_id)
4786
4786
% Compute satellite positions at transmission time and rotate them by the earth rotation
4787
4787
% occured during time of travel of the signal
4788
4788
%
@@ -4793,19 +4793,29 @@ function toString(this)
4793
4793
% sat = go_id of the satellite (optional)
4794
4794
%
4795
4795
% OUTPUT
4796
+ % XS_tx_r = satellite postions at transimission time rotated by earth rotation occured during time of travel
4796
4797
% XS_tx = satellite position computed at trasmission time
4797
- % XS_tx_r = Satellite postions at transimission time rotated by earth rotation occured during time of travel
4798
- %
4798
+ % VS_tx_all = satellite velocity computed at trasmission time
4799
4799
if nargin > 1
4800
4800
[XS_tx] = this.getXSTx(go_id);
4801
4801
[XS_tx_r] = this.earthRotationCorrection(XS_tx, go_id);
4802
4802
else
4803
4803
n_sat = this.parent.getMaxSat;
4804
4804
XS_tx_r = zeros(this.time.length, n_sat, 3);
4805
- for i = unique(this.go_id)'
4806
- [XS_tx] = this.getXSTx(i);
4807
- [XS_tx_r_temp] = this.earthRotationCorrection(XS_tx, i);
4808
- XS_tx_r(logical(this.sat.avail_index(:,i)) ,i ,:) = permute(XS_tx_r_temp, [1 3 2]);
4805
+ if nargout == 3
4806
+ VS_tx_all = zeros(this.time.length, n_sat, 3);
4807
+ for i = unique(this.go_id)'
4808
+ [XS_tx, VS_tx] = this.getXSTx(i);
4809
+ [XS_tx_r_temp] = this.earthRotationCorrection(XS_tx, i);
4810
+ XS_tx_r(logical(this.sat.avail_index(:,i)) ,i ,:) = permute(XS_tx_r_temp, [1 3 2]);
4811
+ VS_tx_all(logical(this.sat.avail_index(:,i)) ,i ,:) = permute(VS_tx, [1 3 2]);
4812
+ end
4813
+ else
4814
+ for i = unique(this.go_id)'
4815
+ [XS_tx] = this.getXSTx(i);
4816
+ [XS_tx_r_temp] = this.earthRotationCorrection(XS_tx, i);
4817
+ XS_tx_r(logical(this.sat.avail_index(:,i)) ,i ,:) = permute(XS_tx_r_temp, [1 3 2]);
4818
+ end
4809
4819
end
4810
4820
end
4811
4821
end
@@ -4850,7 +4860,7 @@ function toString(this)
4850
4860
end
4851
4861
end
4852
4862
4853
- function [XS_tx] = getXSTx(this, sat)
4863
+ function [XS_tx, VS_tx ] = getXSTx(this, sat)
4854
4864
% SYNTAX
4855
4865
% [XS_tx_frame , XS_rx_frame] = this.getXSTx()
4856
4866
%
@@ -4859,6 +4869,7 @@ function toString(this)
4859
4869
% sta : index of the satellite
4860
4870
% OUTPUT
4861
4871
% XS_tx = satellite position computed at trasmission time
4872
+ % VS_tx = satellite velocity computed at trasmission time
4862
4873
%
4863
4874
% Compute satellite positions at trasmission time
4864
4875
time_tx = this.getTimeTx(sat);
@@ -4869,17 +4880,9 @@ function toString(this)
4869
4880
sky = Core.getCoreSky;
4870
4881
%sky.initSession(this.time.first, this.time.last, Core.getConstellationCollector);
4871
4882
[XS_tx] = sky.coordInterpolate(time_tx, sat);
4872
-
4873
-
4874
- % [XS_tx(idx,:,:), ~] = Core.getCoreSky.coordInterpolate(time_tx);
4875
- % XS_tx = zeros(size(this.sat.avail_index));
4876
- % for s = 1 : size(XS_tx)
4877
- % idx = this.sat.avail_index(:,s);
4878
- % %%% compute staeliite position a t trasmission time
4879
- % time_tx = this.time.subset(idx);
4880
- % time_tx = time_tx.time_diff - this.sat.tot(idx,s)
4881
- % [XS_tx(idx,:,:), ~] = Core.getCoreSky.coordInterpolate(time_tx);
4882
- % end
4883
+ if nargout == 2
4884
+ [XS_tx, VS_tx] = sky.coordInterpolate(time_tx, sat);
4885
+ end
4883
4886
end
4884
4887
end
4885
4888
0 commit comments