How to finding GAPS in satellite access times.
이전 댓글 표시
Hello,
Appreciate any help on how to find gaps in satellite access. The attached picture shows Iridium satellite accesses to a radio near Dulles during 1 day. You can see there are many overlapping accesses. I am trying to find any periods of time that do not have access (any time gaps in coverage). I do have Aerospace Toolbox which quickly calculates all the access intervals.
My question is a may be a more complex verion of this Q&A:
I have tried several plotting approaches but not luck yet. The plot function needed seems like a combination of "stairs" and many, superimposed "fplot" intervals; however fplot intervals do not seem to accept datetime input (the attached shows an attempt to fplot just one access interval).
Thanks in advance.
-Mike
채택된 답변
추가 답변 (1개)
There are ways to do this without loops, but the most straight-forward way (assuming the data are sorted by start time) is brute force, something like this:
StartTime = datetime(2023,11,22,0,[0,1,4,5,10,12,14,17,21]',0);
StopTime = datetime(2023,11,22,0,[1,2,11,16,21,20,25,24,28]',0);
Dur = StopTime - StartTime;
t = table(StartTime,StopTime,Dur)
for i = height(t):-1:2
upper = max(t.StopTime(1:i-1));
if t.StartTime(i) <= upper
t.StopTime(i-1) = max(t.StopTime(i),upper);
t(i,:) = [];
t.Dur(i-1) = t.StopTime(i-1) - t.StartTime(i-1);
end
t
end
In your data, IIUC, you had no gaps, so I changed them a bit. now you just need
gaps = table(t.StopTime(1:end-1),t.StartTime(2:end),t.StartTime(2:end)-t.StopTime(1:end-1),VariableNames=["GapStart" "GapStop" "GapDur"])
댓글 수: 1
Michael Hurley
2023년 11월 29일
편집: Michael Hurley
2023년 11월 29일
카테고리
도움말 센터 및 File Exchange에서 Scenario Generation and Visualization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
