Why dopplershift function still output non-nan value when stellite and groundstation theoratically can't access each other?

2 次查看(过去 30 天)
I was using satellite scenario to simulate starlink satellite and predicting doppler shift of satellites to the groundstation. I set the minelevationangle of 30 degree to the groundstation to simulate the situation that only satellites that elevation>30 degree can get access to the groundstation. However I discovered when I use dopplershift() funciton, it still output valid value to any satellites that has elevation>0 degree, instead of 30 degree. Is there any way to correct this?
Below are the codes I used.
%% 定义数值
% tic
disp('begin...')
latitude=30.5288888;
longitude=114.3530555;
altitude=56;
minelevation=30;
durationtimeSeconds=120;
starttime=datetime(2025,5,17,15,44,0,'TimeZone',hours(8));
sampletime=1;
%% 模拟环境
disp('creating satellitescenario object...')
% 创建图窗
sc = satelliteScenario(starttime,starttime+seconds(durationtimeSeconds),sampletime);
%% 地面站
disp('creating groundstation...')
% 创建地面站
gs=groundStation(sc,Name='WHU',Latitude=latitude,Longitude=longitude,Altitude=altitude,MinElevationAngle=minelevation);
%% 导入卫星
disp('importing satellites...')
% 创建和读取卫星,渲染轨道
sat=satellite(sc,[pwd,'\gp2.tle'],OrbitPropagator="sgp4");
%% 预报多普勒频移
disp('Predicting Doppler shift...')
carrierFrequency=11.325e9;
[frequencyShift,timeOut,dopplerInfo] = dopplershift(sat,gs,Frequency=carrierFrequency);
frequencyRate = dopplerInfo.DopplerRate;
relativeVelocity = dopplerInfo.RelativeVelocity;
its result:
I also calculated the true elevation value. it can be seen that dopplershift() still output valid value when elevation angle is only 1-2 degree, when the satellites and groundstation theroratically can't access to each other, but accroding to the documentation, dopplershift() function should output nan if source and target cannot access to each other.
Am I using it wrong?

采纳的回答

Ayush
Ayush 2025-6-18
The short answer is that, under the hood, dopplershift will compute the instantaneous frequency shift any time there is geometric line‐of‐sight (i.e. elevation > 0°), but it does not automatically apply your MinElevationAngle setting on the groundStation object. That property is used by coverage‑ and access‑type analyses (e.g. coverage, access) and your scenario viewer, but not by the raw doppler‑shift calculator.
You have two straightforward ways to mask out any samples below your 30° (minelevation) elevation threshold:
  1. You can use lookAngles to get elevation and then mask. Here is a pesudo MATLAB code for the same:
% 1) Here, we compute doppler
[frequencyShift, timeOut, dopplerInfo] = dopplershift(sat, gs, Frequency=carrierFrequency);
% 2) Then we compute elevation angles at the same time points
[~, elevationDeg, ~] = lookAngles(gs, sat);
% 3) Zero‐out (or NaN‐out) everything below your minelevation
maskLow = elevationDeg < minelevation;
frequencyShift(maskLow) = NaN;
2. You can also use access intervals to find "valid" windows. If you want to work with time intervals rather than per-sample elevations, you can use access function which does respect your MinElevationAngle.
Here's the MATLAB code for the same:
% Getting the access intervals (as datetime pairs)
[acStart, acEnd] = access(sat, gs);
% Pre‑allocation of your masked doppler array
[frequencyShift, timeOut, ~] = dopplershift(sat, gs, Frequency=carrierFrequency);
frequencyShiftMasked = NaN(size(frequencyShift));
% For each access window, copy across the valid doppler samples
for k = 1:numel(acStart)
idx = (timeOut >= acStart(k)) & (timeOut <= acEnd(k));
frequencyShiftMasked(idx) = frequencyShift(idx);
end
% frequencyShiftMasked now has NaNs outside elevation ≥30°
The dopplershift function is intended to give you the pure physics‑only Doppler profile under any direct line‐of‐sight. In MATLAB’s design, things like minimum elevation angles, atmospheric masks, antenna patterns, etc., are orthogonal “coverage” attributes that you layer on afterwards (via access, coverage, or graphical filters).
Hope it helps!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Scenario Generation and Visualization 的更多信息

产品


版本

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by