Search notes:

Stellarium API: core.setObserverLocation

core.setObserverLocation() makes Stellarium travel to a given location on Earth or a planet.
core.setObserverLocation(
   longitude    ,
   latitude     ,
   altitude     ,
   duration     , // optional   , default = 1
   name         , // optional   , default = ""
   planet         // optional(?), default = ""
);
Although the documentation specifies planet to be optional, it seems that at least when core.setObserverLocation is called for the first time, it needs to be set to a value.

Example

//  vim: ft=javascript
//
//  ..\..\runScript.bat setObserverLocation.ssc
//  

//
// Go to Irchelturm
//
core.setObserverLocation(
    8 + 36/60 + 25.85/60/60, // core.dmsToRad( 8, 36, 25.85 ), // longitude
   47 + 32/60 + 21.48/60/60, // core.dmsToRad(47, 32, 21.48 ), // latitude
    0,                       // Altitude
    0,                       // Time to travel
   "",                       // or "Irchelturm",
   "Earth"                   // This parameter seems necessary
);
Github repository about-Stellarium, path: /API/core/setObserverLocation.ssc

See also

Stellarium Script API

Index