I'm trying to make a table of Moon magnitude as a function of time using a
script, but I can't work out the incantation to gt Stellarium to print out the
magnitude. Adapted from a script I found which tracks Moon position, this is
basically what I want to do, but for the error on the
for (i=0; i<100; i++)
MoonData = core.getVMagnitude("Moon",true);
Additionally to this, are these values accurate within Stellarium? Does it
include correction for, eg, the opposition effect?
You seem to have CSS turned off.
Please don't fill out this field.
The "getVMagnitude" cannot be called as core.getVMagnitude because it is not
in the "StelMainScriptAPI" class. Not all functions are available to the
Currently the functions for classes listed in http://www.stellarium.org/doc/h
Interation with Stellarium-specific functionality is done by calling the
public slots of instances of a group of Stellarium's core classes.
The public slots in the class StelMainScriptAPI are available via an object
named core. For example, to access StelMainScriptAPI::wait() from a script,
use the scripting command:
The public slots for each of the following classes are available in the
scripting engine via an object with the same name as the corresponding class:
For example, to access LandscapeMgr::setFlagAtmosphere(), use the scripting
Note: All of these except for StelSkyDrawer are StelModule classes.
Thank you for your response. :)
I can't find getVMagnitude in any of those classes listed, so does that mean
that it's not available?
Is there any way to get a script to print out the Moon's magnitude as a
function of time?
I believe it is not available. Like you, I struggle to find my way in
scripting. Trial and errors helps. Examples from Experts like Matthew Gates
that can be found at: http://bazaar.launchpad.net/~stellarium/stellarium/trun
Qam1 scripts that can be found at: http://www.lowerwolfjaw.com/astro/Stellari
Check also Stellarium wiki: http://www.stellarium.org/wiki/index.php/Scripts_
This function is available in [http://www.astrosurf.com/c2a/english/index.htm]
Select: Tools - Ephemeris Generator - Moon. Enter dates. Set: Step.
getVMagnitude not implemented for script engine for all objects. But I can
implement this feature for Solar system bodies for version 0.11.4 (code for
0.11.3 is frozen).
hendrik_d: I just tried C2A, which does do it but doesn't seem to account for
atmospheric extinction? Thanks for the tip though!
alexvwolf: If that wouldn't be hugely difficult, that would be ace. It's
definitely most interesting for Solar system bodies… :) Cheers!
Added method for getting the V magnitude for Solar system bodies from scripts
Excellent! Thanks very much!
Sign up for the SourceForge newsletter: