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

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Wissensc...', 1758201368, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Wissenschaft/Astronomie/tools/Stellarium/script/API/core/setObserverLocation(74): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78