Saetllite among the stars

All about writing scripts for Celestia in Lua and the .cel system
Topic author
Rich

Saetllite among the stars

Post #1by Rich » 10.11.2004, 14:24

Hi,
The other night I was star gazing with my 5 year old, and pointed out a satellite moving among the stars. Needless to say, she was pretty excited.
So I was inspired to write this little script, which requires Globalstar M022 satellite. Again, it's kind of geared for a child, but fun. Feel free to edit at will.
-RB

{
## ==== Sat among the stars: (by RBucci)
timerate {rate 0}
cancel {}
setfaintestautomag45deg { magnitude 8.7 }
seturl { url
"cel://Freeflight/2004-11-08T21:32:40.85482?x=mDBIiHfBlGTIDA&y=1+cCxbsZHA&z=7h5DtLVRtJj0/////////w&ow=0.025965&ox=0.220036&oy=0.969835&oz=-0.101641&fov=45.0&ts=3.000000<d=0&rf=118275&lm=0" }
set { name "StarStyle" value "points" }
setfaintestautomag45deg { magnitude 8.7 }
unmarkall {}
renderflags { clear "markers" }
select { object "Earth/north kingstown, ri"}
synchronous {}
renderflags { set "markers" }
print { text " Looking at the night sky over NK, RI..." row -5 duration 4}
wait {duration 4}
timerate {rate 5.5}
print { text " Can you pick out the satellite among the stars?" row -5 duration 4}
wait {duration 7}
print { text " It looks like a star that is moving." row -5 duration 4}
wait {duration 8}
print { text " Did you find it yet?" row -5 duration 4}
wait {duration 8}
print { text " Right here, in this square" row -5 duration 4}
mark { object "globalstar m022" size 24 color [0 0 1] symbol "square" }
wait { duration 6.0 }
unmark { object "globalstar m022"}
wait { duration 12.0 }
select { object "globalstar m022"}
goto {time 6}
wait { duration 3.0 }
print { text " The satellite looks something like this." row -5 duration 7}
wait { duration 3.0 }
chase {}
renderflags { clear "markers" }
timerate {rate 250}
wait { duration 13.5 }
follow {}
wait { duration 6.0 }
timerate {rate 100}
renderflags { set "cloudmaps|atmospheres" }
changedistance { duration 4 rate 0.25 } #>> Neg rate makes camera closer!
wait { duration 8 }
timerate {rate 0}
print { text " Orbiting the Earth." row -5 duration 3}
wait { duration 3.0 }
orbit {axis [ 0 -1 0 ] rate 6.5 duration 6.5 }
wait { duration 3 }
changedistance { duration 4 rate 2.5 } #>> Neg rate makes camera closer!
timerate {rate 1}
cancel {}
wait { duration 9 }
print { text "end" row -2 duration 14}
wait { duration 23 }
}

Return to “Scripting”