advance
Syntax
Description
moves the simulation forward by the amount of time specified by the isrunning = advance(sc)SampleTime
property of the scenario sc.
Examples
Create a satellite scenario object and set the AutoSimulate property to false to enable manual simulation of the satellite scenario.
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: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 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);

Input Arguments
Satellite scenario, specified as a satelliteScenario
object. The argument applies only if the AutoSimulate property of the sc object is
false.
Output Arguments
Running status of the satellite scenario simulation, returned as a logical 1
(true) or 0 (false). The
isrunning value is true until the scenario
reaches the specified StopTime value.
Version History
Introduced in R2022a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)