Stellarium Command Reference

Version 1.21 - November 27, 2006
Robert Spearman

This document outlines commands supported by Stellarium 0.8.2 for UI or script use.

Command format basics:

COMMAND ARGUMENT_NAME1 ARGUMENT_VALUE1 ARGUMENT_NAME2 ARGUMENT_VALUE2 ...

Example Commands:

Below is a complete list of valid commands, along with their supported argument names and values. Lowercase values are literal, uppercase values are explanatory (i.e. replace SECONDS with the number of seconds desired). New or changed commands are bolded below.

Command Argument Names Argument Values Notes
audio
action
pause
play
sync

filename
AUDIO_FILENAME
Used with "play" action.  Format support depends on your binary.  Ogg Vorbis format is recommended. WAV format should work but is discouraged because in this case the audio track will not adjust if the script is fast forwarded.  [This is a current limitation of the  SDL_Mixer library.]
loop
on
off
Used with "play" action.  Default is off
output_rate SAMPLES_PER_SECOND For example, 44100 is CD quality audio.
volume
decrement
increment
VOLUME_LEVEL
VOLUME_LEVEL is between 0 and 1, inclusive.
clear
state
natural  Turn off fog and all labels, lines, and art. Turn planet, star, and nebula rendering on. Deselect any selected objects. Return to initial fov and viewing direction. 

If state is natural, ground and atmosphere will be turned on, otherwise these will be turned off.
configuration
action load
reload
Currently disabled.
date

local
[[-]YYYY-MM-DD]Thh:mm:ss
Set time to a specified date and/or time using current timezone.  'T' is literal.
utc
[-]YYYY-MM-DDThh:mm:ss Set time to a specified date and time in UTC time.  'T' is literal.
relative
DAYS
Change date and time by DAYS (can be fractional).
sidereal
DAYS
Change date and time by sidereal DAYS (can be fractional). Sidereal day length is dependent on your home planet.
load
current
Set date to current date.
deselect


Deselects current object selection, including any constellation selection.  See select command.
flag atmosphere
azimuthal_grid
bright_nebulae
cardinal_points
constellation_art
constellation_drawing
constellation_names
constellation_pick
ecliptic_line
enable_move_keys
enable_tui_menu
enable_zoom_keys
equator_line
equatorial_grid
fog
gravity_labels
help
infos
moon_scaled
landscape
manual_zoom
menu
meridian_line
milky_way
nebulae
nebula_names
object_trails
planets
planet_names
planet_orbits
point_star
script_gui_debug
show_appname
show_date
show_fov
show_fps
show_gravity_ui
show_selected_object_info
show_time
show_topbar
show_tui_datetime
show_tui_short_obj_info
star_names
star_twinkle
stars
track_object
utc_time
on
1
off
0
toggle
Set rendering flags. One argument name per command allowed currently.

track_object is only useful while an object is selected.

The following flags are key user settings and are not accessible from scripts:

enable_move_keys
enable_move_mouse
enable_tui_menu
enable_zoom_keys
gravity_labels
help
horizon
infos
menu
show_appname
show_date
show_fov
show_fps
show_gravity_ui
show_time
show_topbar
utc_time

image

action load
drop
Drop images when no longer needed to improve performance.
altitude
ALTITUDE_ANGLE
For positioning the center of the image in horizontal coordinates.  Zero is at the horizon, 90 is at the zenith.
azimuth
AZIMUTH_ANGLE
For positioning the center of the image in horizontal coordinates.  Zero is North, 90 is East.
coordinate_system
viewport
horizontal
equatorial
j2000
What coordinate system to use to position the image.  Must be defined at image load.  Can not be changed later.  Default is viewport.
duration
SECONDS
How long to take to complete the command.
filename IMAGE_FILENAME Path must be relative to script.
name
IMAGE_NAME
Used to refer to the image in later calls to manipulate the image. Images must be in PNG format. If images do not have dimensions that are powers of 2 (128, 256, etc.) they are resized when loaded to meet this requirement.
alpha
ALPHA
0 is transparent (default), 1 is opaque.  ALPHA can be fractional.

Note that images are drawn in the order they were loaded.

scale
SCALE
How large to draw the image. In viewport coordinates, at 1 the image is scaled to fit maximized in the viewport.  In horizontal coordinates, this defines the maximum angular width of the image in degrees.
rotation
DEGREES
Absolute rotation, positive is clockwise.
xpos
X_POSITION
Where to draw center of image. 0 is center of viewport, 1 is right edge of viewport.
ypos
Y_POSITION
Where to draw center of image. 0 is center of viewport, 1 is top edge of viewport.
landscape


Load a landscape.  Arguments have same names and possible values as in landscapes.ini file except that texture file names need to be specified in full including the path relative to the script.

Also add argument "action load"
meteors
zhr
ZENITH_HOURLY_RATE

moveto

lat
LATITUDE
South is negative
lon
LONGITUDE
West is negative
alt
ALTITUDE
In meters
duration
SECONDS
How long to take to effect this change.
script
action
play
end
pause
resume
Note that pause toggles playback.
If a script plays another script, the first will terminate.
filename
SCRIPT_FILENAME

select

If no arguments are supplied, deselects current object.  (Leaves constellation selection alone.)  See deselect command.
constellation CONSTELLATION_SHORT_NAME 3 character abbreviation from constellationship.fab, case insensitive.
hp HP_NUMBER  
nebula NEBULA_NAME Name as defined in messier.fab
planet
PLANET_NAME
Name as defined in ssystem.ini
pointer on
1
off
0
Whether to draw the highlighting pointer around the selected object.  Default is on.
set
atmosphere_fade_duration SECONDS

auto_move_duration SECONDS
used for auto zoom
constellation_art_fade_duration SECONDS

constellation_art_intensity
0-1
landscape_name

from landscapes.ini
max_mag_nebula_name

only label nebulas brighter than this
max_mag_star_name

only label stars brighter than this
moon_scale

1 is real size
home_planet

Change viewing location, case sensitive
sky_culture

Directory name from skycultures.fab
sky_locale

locale code: fr, zh_HK, etc.
star_mag_scale


star_scale


star_twinkle_amount

0 is no twinkling
time_zone

System dependent
timerate
rate
SECONDS_PER_SECOND
Set simulation time rate.
wait
duration
SECONDS
Only useful in scripts.  SECONDS can be fractional.
zoom
auto
in
initial
out
"initial" returns to configured initial fov and viewing direction
fov
FIELD_OF_VIEW in degrees
delta_fov
DELTA_DEGREES
duration
SECONDS Not used with delta_fov