Search notes:

Stellarium Script API

Some selected functions from the Stellarium script API.

ConstellationMgr

setFlagLines displays the lines between the constallations' stars

core

clear clears display options for a «standard view» (such as natural, starchart, deepspace, galactic).
debug writes text to the ScriptConsole output window
getDate returns the current simulation time in ISO 8601 format
getObjectInfo gets information about an object in the sky, see the dialog Configuration -> Information
getObjectPosition gets (positional) information about an object in the sky.
getScreenWidth and getScreenHeight
moveToAltAzi look at a pair of coordinates that are specified in the horizontal coordinate system.
moveToObject() look at a given object
moveToRaDec
moveToSelectedObject() look at selected object
output Write a message to a file
pauseScript
screenshot Make a screenshot from the scene
selectObjectByName
setDate go to a specific point in time. Can be specified absolutely (ISO 8601) or relatively "+ 4 days".
setDeltaTAlgorithm
setGuiVisible Toggles visiblity of (GUI-)toolbars that provide the public slot setGuiVisible().
setMilkyWayIntensity
setMilkyWayVisible
setSelectedObjectInfo controls the amount of information that is shown when an object is select.
setObserverLocation travels to a given location on Earth or a planet.
setTimeRate
wait Stop the presentation for a given period

GridLinesMgr

setFlagAzimuthalGrid shows or hides the grid for the horizontal coordinate system.
setFlagEquatorGrid
setFlagMeridianLine

LabelMgr

deleteAllLabels
deleteLabel
labelScreen adds text to the scene.

LandscapeMgr

getAllLandscapeNames
setCurrentLandscapeName
setFlagAtmosphere
setFlagCardinalsPoints
setFlagFog
setFlagLandscape

ScreenImageMgr

createScreenImage

SolarSystem

setFlagLabels toggles if Planets' and their Moons' names are shown next to them. This functionality seems to correspond to the alt-p keyboard shortcut.
setFlagPlanets
setFlagTrails
setMaxTrailPoints sets the maximum number of trail lines that each object draws behind itself if setFlagTrails(true) was called.

StelMovementMgr

setAutoMoveDuration Sets the duration for an auto-move operation (such as core.selectObjectByName() followed by StelMovementMgr.setFlagTracking()?)
setFlagTracking
setMaxFov Fov stands for field of view.
zoomTo Change the field of view.

Parameters that expect an angle

Some functions that are exposed through Stellarium's API (such as core.moveToAltAzi or core.moveToRaDec) have parameters that expect a value that represents an angle.
There are multiple formats with which these angles can be specified:
The D or d in the examples above is the degree separator. Instead of the degree separator, the real degree symbol (º, 0xBA, not to be confused with °, 0xB0) can be used instead.
See also double StelUtils::getDecAngle(const QString & str) which converts the angle to radians.

Index