satellite scenario -凯发k8网页登录
satellite scenario
since r2021a
description
the satellitescenario
object represents a 3d arena consisting of
satellites, ground stations, and the interactions between them. use this object to model
satellite constellations, model ground station networks, perform access analyses between the
satellites and the ground stations, and visualize the results.
creation
syntax
description
creates a default
satellite scenario object.sc
= satellitescenario
sets the sc
= satellitescenario(starttime,stoptime,sampletime)starttime
, stoptime
,
and sampletime
properties to the values of starttime
,
stoptime
, and sampletime
, respectively.
sets the sc
= satellitescenario(___,autosimulate
=false)autosimulate
property to a specified value.
properties
starttime
— start time of satellite scenario simulation in utc
datetime
scalar
start time of the satellite scenario simulation in utc, specified as a scalar.
the default starttime
is the current utc time if no satellites
are present in the scenario. otherwise, it is the earliest value among
the current utc time.
the epoch defined in the tle files.
the reference time deduced from the gps week number defined in sem files.
the earliest time deduced from rinex navigation data for gps and galileo.
the initial time in the timetable and timeseries.
if the starttime
, stoptime
, or
sampletime
properties are explicitly specified, the
starttime
property no longer updates with further additions of
satellites.
when the autosimulate
property is false
, you can modify the
starttime
property only when the simulationstatus
is notstarted
. you can use the
function to
reset simulationstatus
to notstarted
, but doing
so erases the simulation data.
data types: datetime
stoptime
— stop time of satellite scenario simulation in utc
datetime
scalar
stop time of the satellite scenario simulation in utc, specified as a scalar. the default stoptime
is
starttime
longest orbital period among the satellites in the
scenario. if no satellites are added to the scenario, the default
stoptime
is the same as the default
starttime
. if the starttime
,
stoptime
, or sampletime
properties are
explicitly specified, the stoptime
property no longer updates with
further additions of satellites.
when the autosimulate
property is false
, you can modify the
stoptime
property only when the simulationstatus
is notstarted
. you can use the
function to
reset simulationstatus
to notstarted
, but doing
so erases the simulation data.
data types: datetime
sampletime
— sample time of satellite scenario simulation
scalar
sample time of the satellite scenario simulation, specified as a real-valued scalar.
the default sample time is set such that there are 100 samples between
starttime
and stoptime
. if the default
starttime
and stoptime
are the same, which
is the case when no satellites are added to the scenario, the default
sampletime
is 60 seconds. if the starttime
,
stoptime
, or sampletime
properties are
explicitly specified, the sampletime
property no longer updates
with further additions of satellites.
when the autosimulate
property is false
, you can modify the
sampletime
property only when the simulationstatus
is notstarted
. you can use the
function to
reset simulationstatus
to notstarted
, but doing
so erases the simulation data.
data types: double
simulationtime
— simulation time of satellite scenario in utc
current utc time (default) | datetime
scalar
this property is read-only.
current simulation time of the satellite scenario simulation in utc, specified as a
scalar. call the function to
reset the time to starttime
.
dependencies
to enable this property, set autosimulate
to false
.
data types: datetime
simulationstatus
— simulation status
'notstarted'
(default) | 'inprogress'
| 'completed'
this property is read-only.
simulation status of the satellite scenario, specified as one of the following:
'notstarted'
— no call to the function has been made'inprogress'
— simulation is running'completed'
— simulation is finished
the simulation starts when the first call to the function is made. the simulation continues until one of the following occurs:
the simulation reaches the
stoptime
.a new asset is added to the satellite scenario.
certain properties of the asset (satellites, ground stations, gimbals, conical sensors, and so on) have been modified, such as
mountinglocation
ormountingangles
. refer to the properties to determine if modifying them can stop the simulation.
call the function to
restart the simulation, erase the simulation data, and set
simulationstatus
to notstarted
.
dependencies
to enable this property, set autosimulate
to false
.
autosimulate
— option to simulate satellite scenario automatically
true
or 1
(default) | false
or 0
option to simulate the satellite scenario automatically, specified as one of these numeric or logical values.
1
(true
) — simulate the satellite scenario automatically on any call to an analysis function, such asstates
oraccessintervals
.0
(false
)— simulate the satellite scenario only by calling the function.
changing the autosimulate
value erases the previous
simulation data.
data types: double
satellites
— satellites in the scenario
row vector of satellite
objects
satellites in the scenario, returned as a row vector of objects. to create a object and add it to the satellite scenario, use the object function. after adding satellites to the scenario, this property is read-only.
groundstations
— ground stations in scenario
row vector of groundstation
objects
ground stations in the scenario, returned as a row vector of objects. to create a object and add it to the satellite scenario, use the object function. after adding ground stations to the scenario, this property is read-only.
autoshow
— option to automatically show graphics
true
or 1
(default) | false
or 0
option to automatically show graphics, specified as a logical 1
(true
) or 0
(false
). this
property determines if entities added to the scenario are automatically shown in an open
window.
object functions
add ground station to satellite scenario | |
add satellites to satellite scenario | |
create viewer for satellite scenario | |
move simulation forward by one sample time | |
restart simulation from beginning | |
play satellite scenario simulation results on viewer | |
create walker-delta constellation in satellite scenario | |
create walker-star constellation in satellite scenario |
examples
create satellite scenario with custom start and stop times
specify the start time in the current time zone as yesterday. the simulation lasts for half a day.
starttime = datetime("yesterday","timezone","local"); stoptime = starttime days(0.5);
specify the sample time as 60 seconds. create a satellite scenario object, specifying the start time, stop time, and sample time.
sampletime = 60; sc = satellitescenario(starttime,stoptime,sampletime)
sc = satellitescenario with properties: starttime: 02-mar-2023 05:00:00 stoptime: 02-mar-2023 17:00:00 sampletime: 60 autosimulate: 1 satellites: [1x0 matlabshared.satellitescenario.satellite] groundstations: [1x0 matlabshared.satellitescenario.groundstation] viewers: [0x0 matlabshared.satellitescenario.viewer] autoshow: 1
add satellites to scenario using keplerian elements
create a satellite scenario with a start time of 02-june-2020 8:23:00 am utc, and the stop time set to one day later. set the simulation sample time to 60 seconds.
starttime = datetime(2020,6,02,8,23,0); stoptime = starttime days(1); sampletime = 60; sc = satellitescenario(starttime,stoptime,sampletime);
add two satellites to the scenario using their keplerian elements.
semimajoraxis = [10000000;15000000];
eccentricity = [0.01;0.02];
inclination = [0;10];
rightascensionofascendingnode = [0;15];
argumentofperiapsis = [0;30];
trueanomaly = [0;20];
sat = satellite(sc,semimajoraxis,eccentricity,inclination, ...
rightascensionofascendingnode,argumentofperiapsis,trueanomaly)
sat = 1x2 satellite array with properties: name id conicalsensors gimbals transmitters receivers accesses groundtrack orbit orbitpropagator markercolor markersize showlabel labelfontcolor labelfontsize
view the satellites in orbit and the ground tracks over one hour.
show(sat) groundtrack(sat,leadtime=3600)
ans=1×2 object
1×2 groundtrack array with properties:
leadtime
trailtime
linewidth
leadlinecolor
traillinecolor
visibilitymode
play the scenario and set the animation speed of the simulation to 40.
play(sc,playbackspeedmultiplier=40)
manual simulation of satellite scenario
create a satellite scenario object and set the autosimulate
property to false
to enable manual simulation of the satellite scenario.
starttime = datetime(2022,1,12); stoptime = starttime days(0.5); sampletime = 60; % seconds sc = satellitescenario('autosimulate',false);
add a gps satellite constellation to the scenario.
sat = satellite(sc,"gpsalmanac.txt");
simulate the scenario using the advance
function.
while advance(sc) end
obtain the satellite position histories.
p = states(sat);
autosimulate
is false
, so restart the scenario before adding a ground station.
restart(sc);
add a ground station to the scenario.
gs = groundstation(sc);
add access analysis between each satellite and ground station.
ac = access(sat,gs);
simulate the scenario and determine the access intervals.
while advance(sc) end intvls1 = accessintervals(ac)
intvls1=35×8 table
source target intervalnumber starttime endtime duration startorbit endorbit
________ ___________________ ______________ ____________________ ____________________ ________ __________ ________
"prn:1" "ground station 32" 1 11-jan-2020 23:20:25 12-jan-2020 05:15:47 21322 nan nan
"prn:2" "ground station 32" 1 12-jan-2020 04:03:16 12-jan-2020 07:40:50 13055 nan nan
"prn:3" "ground station 32" 1 11-jan-2020 19:50:06 11-jan-2020 21:38:53 6527.3 nan nan
"prn:3" "ground station 32" 2 12-jan-2020 01:52:43 12-jan-2020 06:42:49 17406 nan nan
"prn:4" "ground station 32" 1 11-jan-2020 19:50:06 12-jan-2020 00:11:11 15665 nan nan
"prn:4" "ground station 32" 2 12-jan-2020 04:54:02 12-jan-2020 07:40:50 10008 nan nan
"prn:5" "ground station 32" 1 12-jan-2020 05:52:03 12-jan-2020 07:40:50 6527.3 nan nan
"prn:6" "ground station 32" 1 12-jan-2020 02:43:29 12-jan-2020 07:40:50 17841 nan nan
"prn:7" "ground station 32" 1 11-jan-2020 21:09:52 12-jan-2020 03:27:00 22628 nan nan
"prn:8" "ground station 32" 1 11-jan-2020 20:33:36 12-jan-2020 03:19:45 24369 nan nan
"prn:9" "ground station 32" 1 11-jan-2020 19:50:06 12-jan-2020 00:47:27 17841 nan nan
"prn:9" "ground station 32" 2 12-jan-2020 05:08:32 12-jan-2020 07:40:50 9138.2 nan nan
"prn:10" "ground station 32" 1 12-jan-2020 00:32:56 12-jan-2020 01:59:58 5221.8 nan nan
"prn:11" "ground station 32" 1 11-jan-2020 22:15:09 12-jan-2020 04:39:32 23063 nan nan
"prn:12" "ground station 32" 1 12-jan-2020 04:32:16 12-jan-2020 07:40:50 11314 nan nan
"prn:13" "ground station 32" 1 12-jan-2020 00:03:56 12-jan-2020 02:50:44 10008 nan nan
⋮
visualize the simulation results.
v = satellitescenarioviewer(sc,'showdetails',false);
play(sc);
verify that the access intervals are the same when you set the autosimulate
property to true
.
sc.autosimulate = true; intvls2 = accessintervals(ac)
intvls2=35×8 table
source target intervalnumber starttime endtime duration startorbit endorbit
________ ___________________ ______________ ____________________ ____________________ ________ __________ ________
"prn:1" "ground station 32" 1 11-jan-2020 23:20:25 12-jan-2020 05:15:47 21322 nan nan
"prn:2" "ground station 32" 1 12-jan-2020 04:03:16 12-jan-2020 07:48:06 13490 nan nan
"prn:3" "ground station 32" 1 11-jan-2020 19:50:06 11-jan-2020 21:38:53 6527.3 nan nan
"prn:3" "ground station 32" 2 12-jan-2020 01:52:43 12-jan-2020 06:42:49 17406 nan nan
"prn:4" "ground station 32" 1 11-jan-2020 19:50:06 12-jan-2020 00:11:11 15665 nan nan
"prn:4" "ground station 32" 2 12-jan-2020 04:54:02 12-jan-2020 07:48:06 10444 nan nan
"prn:5" "ground station 32" 1 12-jan-2020 05:52:03 12-jan-2020 07:48:06 6962.4 nan nan
"prn:6" "ground station 32" 1 12-jan-2020 02:43:29 12-jan-2020 07:48:06 18276 nan nan
"prn:7" "ground station 32" 1 11-jan-2020 21:09:52 12-jan-2020 03:27:00 22628 nan nan
"prn:8" "ground station 32" 1 11-jan-2020 20:33:36 12-jan-2020 03:19:45 24369 nan nan
"prn:9" "ground station 32" 1 11-jan-2020 19:50:06 12-jan-2020 00:47:27 17841 nan nan
"prn:9" "ground station 32" 2 12-jan-2020 05:08:32 12-jan-2020 07:48:06 9573.3 nan nan
"prn:10" "ground station 32" 1 12-jan-2020 00:32:56 12-jan-2020 01:59:58 5221.8 nan nan
"prn:11" "ground station 32" 1 11-jan-2020 22:15:09 12-jan-2020 04:39:32 23063 nan nan
"prn:12" "ground station 32" 1 12-jan-2020 04:32:16 12-jan-2020 07:48:06 11749 nan nan
"prn:13" "ground station 32" 1 12-jan-2020 00:03:56 12-jan-2020 02:50:44 10008 nan nan
⋮
visualize the scenario.
play(sc);
tips
when saving the satellite scenario, either save the entire workspace containing the scenario object or save the scenario object itself.
version history
introduced in r2021a
see also
objects
- |
functions
- | | | | | |
topics
打开示例
您曾对此示例进行过修改。是否要打开带有您的编辑的示例?
matlab 命令
您点击的链接对应于以下 matlab 命令:
请在 matlab 命令行窗口中直接输入以执行命令。web 浏览器不支持 matlab 命令。
select a web site
choose a web site to get translated content where available and see local events and offers. based on your location, we recommend that you select: .
you can also select a web site from the following list:
how to get best site performance
select the china site (in chinese or english) for best site performance. other mathworks country sites are not optimized for visits from your location.
americas
- (español)
- (english)
- (english)
europe
- (english)
- (english)
- (deutsch)
- (español)
- (english)
- (français)
- (english)
- (italiano)
- (english)
- (english)
- (english)
- (deutsch)
- (english)
- (english)
- switzerland
- (english)
asia pacific
- (english)
- (english)
- (english)
- 中国
- (日本語)
- (한국어)