Script usage of setUseTopocentricCoordinates()

Asked by Phil Shepherd

I am trying to set/unset the configuration setting "Topocentric Coordinates" within a script, but keep getting an error.

example :


In the console, I get the error :

script error: "TypeError: Result of expression 'core.setUseTopocentricCoordinates' [undefined] is not a function." @ line 1

The docs indicate
        void setUseTopocentricCoordinates (bool use)

Am I just being a bit thick or am I missing something?


Question information

English Edit question
Stellarium Edit question
No assignee Edit question
Solved by:
Phil Shepherd
Last query:
Last reply:
Revision history for this message
Alexander Wolf (alexwolf) said :

But this method is not available for scripting:

Are you really want to see some new methods in scripting "core"?

Revision history for this message
Phil Shepherd (psjshep) said :

I struggle sometimes to deduce which methods are & are not available for scripting; I think I now get it : StelMainScriptAPI public slots, along with the named classes in the scripting API..

Thanks for clearing up my confusion.

It's not a problem, as I was trying to debug a situation which happens when FishEye projection is on AND Topocentric Coords is NOT enabled... I was merely ensuring the switch was on

As for your question: It would be easier as a scripting programmer to be able to use all the methods documented, but it hasn't been a big problem so far as these sorts of options can always be set in the GUI & saved.



Revision history for this message
gzotti (georg-zotti) said :

It's actually StelMainScriptAPI public slots as "core", and public slots of subclasses of StelModule, plus StelSkyDrawer. StelCore itself is not a StelModule, so its slots are not available for scripting.


Revision history for this message
Phil Shepherd (psjshep) said :

Thanks, Georg.. that's what I meant in a clumsy mannor.

Appreciate resposnes, guys