Voyager 1 Flyby script
Posted: 26.11.2003, 10:24
***** Updated script 11-30-2003 ****
First Post!
New to scripting, but have been following and enjoying the Celestia program/forum since version 1.25 or so. Currently using Celestia version 1.3.1 pre 11. Since I've taken so much from this forum I decided I'd try to give something back in return, small as it may be.
My current PC is a HP Pavilion 650 Mhz (so slow!) with nVanta 8 meg video card and 128 meg Ram running Windows 98. I hope to upgrade very soon!
Thought I'd try my hand at the scripts and see what I could learn. I found out I didn't know very much After many hours of trial and error and various other tests I think I'm getting the hang of it, though I have a good ways to go yet. Many thanks to Don for his scripting documentation! It really helps and I hope to see it completed.
So here is my first "real" script for better or worse. I welcome any comments.
I saw a few posts mentioning the lack of Voyager 1 and 2 scripts and such so I decided to try those first. The cel script for Voyager 1 is pasted below. Not sure if there is a better way to get this posted or not, the paste wrapped around on the message screen, maybe it'll be ok. Still working on Voyager 2 script.
{
# Script Start ---------------------------------------------------------------------------
# Voyager 1 Flybys by Andr? Smith 11/24-26/2003 Version 4
# Created using screen resolution of 1024 x 768
# Celestia Program by Chris Laurel
# http://ennui.celestiaproject.net/celestia/
# Requires Voyager trajectory xyz files available from "Jack's Celestia Add-ons" web site.
# http://homepage.eircom.net/~jackcelestia/
# Requires Voyager Model produced by Kalaus Gierloff.
# Can be found on Darkmiss site as of November 26,2003
# http://www.bt.homepage.btinternet.co.uk/Celestia.htm
# Stop Time
timerate { rate 0 }
# Preload Textures
preloadtex { object "earth" }
preloadtex { object "jupiter" }
preloadtex { object "io" }
preloadtex { object "ganymede" }
preloadtex { object "europa" }
preloadtex { object "callisto" }
preloadtex { object "saturn" }
preloadtex { object "titan" }
wait { duration 4 }
# Clear Labels, Render Flags and Unmark everything.
labels {clear "galaxies|moons|asteroids|constellations|stars|planets|spacecraft" }
renderflags {clear "stars|galaxies|orbits|constellations|markers|planets|spacecraft"}
unmarkall {}
cancel {}
# Set Field of View and Ambient Light values
set { name "FOV" value 45.0 }
set { name "AmbientLightLevel" value 0.3 }
# Set date to September 5, 1977
time { jd 2443392.24619 }
# Select Voyager 1, position to View Earth after Launch and follow Voyager for 20 seconds
select { object "sol/Voyager 1" }
gotolonglat {distance 3 longitude -90 latitude 10 up [0 1 0] time 2}
wait { duration 2 }
follow { }
renderflags { set "planets|spacecraft"}
timerate { rate 1 }
select { object "Earth" }
print { text "Voyager 1 Launch Date - September 5, 1977" origin "left" duration 15 row -12 column 18 }
timerate {rate 2500}
wait { duration 20 }
#--------------------------- On To Jupiter ------------------------------------------
# Turn on Labels, Mark Voyager 1 and Jupiter, Zoom out and speed up timerate.
labels { set "planets" }
select { object "Voyager 1" }
gotolonglat {distance 3 longitude 120 latitude 10 up [0 1 0] time 7}
wait { duration 8 }
track {}
orbit { axis [ 1 0 0 ] rate 45 duration 2 }
renderflags { set "orbits|markers" }
labels { set "spacecraft" }
mark { object "Voyager 1" color [1 1 1] symbol "diamond" }
mark { object "Jupiter" color [1 0 0] symbol "square" }
changedistance { duration 6.3 rate 4.0 }
print { text "Timerate 1 Month per second" origin "left" duration 7 row -12 column 18 }
timerate { rate 2592000 }
wait { duration 17.5}
labels {clear "planets|spacecraft" }
renderflags {clear "orbits|markers|planets"}
unmarkall {}
timerate {rate 7500}
# Set date to March 1979, return to Voyager and Track Jupiter for the Flyby
time { jd 2443936.02403 }
select {}
track {}
select { object "Voyager 1" }
gotolonglat {distance 3 longitude 120 latitude 10 up [0 1 0] time 1}
wait { duration 1 }
chase {}
select { object "jupiter" }
track {}
renderflags { set "planets"}
print { text "Jupiter Flyby - March 1979" origin "left" duration 25 row -12 column 18 }
wait { duration 30 }
#--------------------------- On To Saturn ------------------------------------------
# Turn on Labels, Mark Voyager 1 and Saturn, Zoom out and speed up timerate.
labels { set "planets" }
select {}
track {}
select { object "Voyager 1" }
gotolonglat {distance 3 longitude 100 latitude 10 up [0 1 0] time 8}
wait { duration 8 }
track {}
orbit { axis [ 1 0 0 ] rate 45 duration 2 }
renderflags { set "orbits|markers" }
labels { set "spacecraft" }
mark { object "Voyager 1" color [1 1 1] symbol "diamond" }
mark { object "saturn" color [1 0 0] symbol "square" }
changedistance { duration 6.3 rate 4.0 }
print { text "Timerate 1 Month per second" origin "left" duration 7 row -12 column 18 }
timerate { rate 2592000 }
wait { duration 20}
labels {clear "planets|spacecraft" }
renderflags {clear "orbits|markers|planets"}
unmarkall {}
timerate {rate 7500}
# Set date to November 1980, return to Voyager and Track Saturn for the Flyby
time { jd 2444554.02403 }
select { object "Voyager 1" }
gotolonglat {distance 3 longitude 120 latitude 10 up [0 1 0] time 1}
wait { duration 1 }
chase {}
select { object "saturn" }
track {}
lock {}
renderflags { set "planets" }
print { text "Saturn Flyby - November 1980" origin "left" duration 25 row -12 column 18 }
wait { duration 35 }
#--------------------------- Leaving System ------------------------------------------
select {}
track {}
lock {}
renderflags {set "orbits"}
labels { set "planets|spacecraft" }
select { object "saturn" }
timerate { rate 2592000 }
wait { duration 4 }
print { text "Tour Complete - Leaving System" origin "left" duration 20 row -12 column 18 }
select { object "Voyager 1" }
gotolonglat {distance 5 longitude 25 latitude 30 up [0 1 0] time 3}
wait { duration 3 }
center { time 3 }
wait { duration 3 }
lock { }
select { object "sol" }
center { time 5 }
wait { duration 5 }
lock { }
timerate { rate 25920000 }
wait { duration 26 }
timerate {rate 1}
# Set date to November 27, 2003. Turn on Stars and Galaxies. Clear Orbits and Labels
time { jd 2452970.92623 }
renderflags {set "stars|galaxies"}
wait { duration 2 }
renderflags {clear "orbits"}
wait { duration 2 }
labels {clear "planets|spacecraft"}
unmarkall {}
select {}
track {}
select { object "sol" }
wait { duration 4 }
print { text "Returning to Earth" origin "left" duration 7 row -12 column 18 }
select { object "earth" }
goto { time 10 }
wait { duration 10 }
print { text "End of Script" origin "left" duration 4 row -12 column 18 }
wait { duration 4 }
cancel {}
# Script End ---------------------------------------------------------------------------
}
What you're supposed to see when it's run:
Clears all stars, galaxies, etc.
Sets the date to September 1977
Positions the viewer with Voyager 1 and Earth visible.
Follows and Tracks Voyager 1 for a few seconds.
Zooms out to view solar system while tracking Voyager 1
As it approaches Jupiter, jumps back to view and track Jupiter in the first flyby.
Zooms out again.
Jump back to view and track Saturn on second flyby.
Tracks Voyager 1 and Sol as it leaves the system.
Returns to Earth
Ends Script
Things I know need to be fixed:
Is there any way yet to capture user settings and restore them after a script is run? If not maybe they'll be added later?
Would love to see more modifications to this script, maybe some split screens, better/more info in the texts etc. Perhaps more stops along the way to view the moons, etc.
Plenty of things can be added. As it is now it's pretty basic.
Enjoy! Voyager 2 flying by now!
First Post!
New to scripting, but have been following and enjoying the Celestia program/forum since version 1.25 or so. Currently using Celestia version 1.3.1 pre 11. Since I've taken so much from this forum I decided I'd try to give something back in return, small as it may be.
My current PC is a HP Pavilion 650 Mhz (so slow!) with nVanta 8 meg video card and 128 meg Ram running Windows 98. I hope to upgrade very soon!
Thought I'd try my hand at the scripts and see what I could learn. I found out I didn't know very much After many hours of trial and error and various other tests I think I'm getting the hang of it, though I have a good ways to go yet. Many thanks to Don for his scripting documentation! It really helps and I hope to see it completed.
So here is my first "real" script for better or worse. I welcome any comments.
I saw a few posts mentioning the lack of Voyager 1 and 2 scripts and such so I decided to try those first. The cel script for Voyager 1 is pasted below. Not sure if there is a better way to get this posted or not, the paste wrapped around on the message screen, maybe it'll be ok. Still working on Voyager 2 script.
{
# Script Start ---------------------------------------------------------------------------
# Voyager 1 Flybys by Andr? Smith 11/24-26/2003 Version 4
# Created using screen resolution of 1024 x 768
# Celestia Program by Chris Laurel
# http://ennui.celestiaproject.net/celestia/
# Requires Voyager trajectory xyz files available from "Jack's Celestia Add-ons" web site.
# http://homepage.eircom.net/~jackcelestia/
# Requires Voyager Model produced by Kalaus Gierloff.
# Can be found on Darkmiss site as of November 26,2003
# http://www.bt.homepage.btinternet.co.uk/Celestia.htm
# Stop Time
timerate { rate 0 }
# Preload Textures
preloadtex { object "earth" }
preloadtex { object "jupiter" }
preloadtex { object "io" }
preloadtex { object "ganymede" }
preloadtex { object "europa" }
preloadtex { object "callisto" }
preloadtex { object "saturn" }
preloadtex { object "titan" }
wait { duration 4 }
# Clear Labels, Render Flags and Unmark everything.
labels {clear "galaxies|moons|asteroids|constellations|stars|planets|spacecraft" }
renderflags {clear "stars|galaxies|orbits|constellations|markers|planets|spacecraft"}
unmarkall {}
cancel {}
# Set Field of View and Ambient Light values
set { name "FOV" value 45.0 }
set { name "AmbientLightLevel" value 0.3 }
# Set date to September 5, 1977
time { jd 2443392.24619 }
# Select Voyager 1, position to View Earth after Launch and follow Voyager for 20 seconds
select { object "sol/Voyager 1" }
gotolonglat {distance 3 longitude -90 latitude 10 up [0 1 0] time 2}
wait { duration 2 }
follow { }
renderflags { set "planets|spacecraft"}
timerate { rate 1 }
select { object "Earth" }
print { text "Voyager 1 Launch Date - September 5, 1977" origin "left" duration 15 row -12 column 18 }
timerate {rate 2500}
wait { duration 20 }
#--------------------------- On To Jupiter ------------------------------------------
# Turn on Labels, Mark Voyager 1 and Jupiter, Zoom out and speed up timerate.
labels { set "planets" }
select { object "Voyager 1" }
gotolonglat {distance 3 longitude 120 latitude 10 up [0 1 0] time 7}
wait { duration 8 }
track {}
orbit { axis [ 1 0 0 ] rate 45 duration 2 }
renderflags { set "orbits|markers" }
labels { set "spacecraft" }
mark { object "Voyager 1" color [1 1 1] symbol "diamond" }
mark { object "Jupiter" color [1 0 0] symbol "square" }
changedistance { duration 6.3 rate 4.0 }
print { text "Timerate 1 Month per second" origin "left" duration 7 row -12 column 18 }
timerate { rate 2592000 }
wait { duration 17.5}
labels {clear "planets|spacecraft" }
renderflags {clear "orbits|markers|planets"}
unmarkall {}
timerate {rate 7500}
# Set date to March 1979, return to Voyager and Track Jupiter for the Flyby
time { jd 2443936.02403 }
select {}
track {}
select { object "Voyager 1" }
gotolonglat {distance 3 longitude 120 latitude 10 up [0 1 0] time 1}
wait { duration 1 }
chase {}
select { object "jupiter" }
track {}
renderflags { set "planets"}
print { text "Jupiter Flyby - March 1979" origin "left" duration 25 row -12 column 18 }
wait { duration 30 }
#--------------------------- On To Saturn ------------------------------------------
# Turn on Labels, Mark Voyager 1 and Saturn, Zoom out and speed up timerate.
labels { set "planets" }
select {}
track {}
select { object "Voyager 1" }
gotolonglat {distance 3 longitude 100 latitude 10 up [0 1 0] time 8}
wait { duration 8 }
track {}
orbit { axis [ 1 0 0 ] rate 45 duration 2 }
renderflags { set "orbits|markers" }
labels { set "spacecraft" }
mark { object "Voyager 1" color [1 1 1] symbol "diamond" }
mark { object "saturn" color [1 0 0] symbol "square" }
changedistance { duration 6.3 rate 4.0 }
print { text "Timerate 1 Month per second" origin "left" duration 7 row -12 column 18 }
timerate { rate 2592000 }
wait { duration 20}
labels {clear "planets|spacecraft" }
renderflags {clear "orbits|markers|planets"}
unmarkall {}
timerate {rate 7500}
# Set date to November 1980, return to Voyager and Track Saturn for the Flyby
time { jd 2444554.02403 }
select { object "Voyager 1" }
gotolonglat {distance 3 longitude 120 latitude 10 up [0 1 0] time 1}
wait { duration 1 }
chase {}
select { object "saturn" }
track {}
lock {}
renderflags { set "planets" }
print { text "Saturn Flyby - November 1980" origin "left" duration 25 row -12 column 18 }
wait { duration 35 }
#--------------------------- Leaving System ------------------------------------------
select {}
track {}
lock {}
renderflags {set "orbits"}
labels { set "planets|spacecraft" }
select { object "saturn" }
timerate { rate 2592000 }
wait { duration 4 }
print { text "Tour Complete - Leaving System" origin "left" duration 20 row -12 column 18 }
select { object "Voyager 1" }
gotolonglat {distance 5 longitude 25 latitude 30 up [0 1 0] time 3}
wait { duration 3 }
center { time 3 }
wait { duration 3 }
lock { }
select { object "sol" }
center { time 5 }
wait { duration 5 }
lock { }
timerate { rate 25920000 }
wait { duration 26 }
timerate {rate 1}
# Set date to November 27, 2003. Turn on Stars and Galaxies. Clear Orbits and Labels
time { jd 2452970.92623 }
renderflags {set "stars|galaxies"}
wait { duration 2 }
renderflags {clear "orbits"}
wait { duration 2 }
labels {clear "planets|spacecraft"}
unmarkall {}
select {}
track {}
select { object "sol" }
wait { duration 4 }
print { text "Returning to Earth" origin "left" duration 7 row -12 column 18 }
select { object "earth" }
goto { time 10 }
wait { duration 10 }
print { text "End of Script" origin "left" duration 4 row -12 column 18 }
wait { duration 4 }
cancel {}
# Script End ---------------------------------------------------------------------------
}
What you're supposed to see when it's run:
Clears all stars, galaxies, etc.
Sets the date to September 1977
Positions the viewer with Voyager 1 and Earth visible.
Follows and Tracks Voyager 1 for a few seconds.
Zooms out to view solar system while tracking Voyager 1
As it approaches Jupiter, jumps back to view and track Jupiter in the first flyby.
Zooms out again.
Jump back to view and track Saturn on second flyby.
Tracks Voyager 1 and Sol as it leaves the system.
Returns to Earth
Ends Script
Things I know need to be fixed:
Is there any way yet to capture user settings and restore them after a script is run? If not maybe they'll be added later?
Would love to see more modifications to this script, maybe some split screens, better/more info in the texts etc. Perhaps more stops along the way to view the moons, etc.
Plenty of things can be added. As it is now it's pretty basic.
Enjoy! Voyager 2 flying by now!