Making a table of Moon magnitude

Feedback
statto
2012-05-07
2012-10-09
  • statto

    statto - 2012-05-07

    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

    getVMagnitude
    

    line…

    core.setTimeRate(0);
    core.selectObjectByName("Moon", true);
    StelMovementMgr.setFlagTracking(true);
    
    for (i=0; i<100; i++)
    {
     core.wait(0.1);
     MoonData = core.getVMagnitude("Moon",true);
     core.debug(MoonData);
     core.setDate("+30 seconds")
    }
    

    Additionally to this, are these values accurate within Stellarium? Does it
    include correction for, eg, the opposition effect?

    Cheers!

     
  • Kajaji

    Kajaji - 2012-05-08

    The "getVMagnitude" cannot be called as core.getVMagnitude because it is not
    in the "StelMainScriptAPI" class. Not all functions are available to the
    scripting engine.

    Currently the functions for classes listed in http://www.stellarium.org/doc/h
    ead/scripting.html
    are
    supported

    Scripting API

    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:
    core.wait(...);
    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:
    ConstellationMgr
    GridLinesMgr
    LabelMgr
    LandscapeMgr
    MeteorMgr
    NebulaMgr
    ScreenImageMgr
    SolarSystem
    StarMgr
    StelAudioMgr
    StelMovementMgr
    StelSkyDrawer
    StelSkyLayerMgr
    For example, to access LandscapeMgr::setFlagAtmosphere(), use the scripting
    command:
    LandscapeMgr.setFlagAtmosphere(true);
    Note: All of these except for StelSkyDrawer are StelModule classes.

     
  • statto

    statto - 2012-05-08

    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?

    Thanks!

     
  • Kird

    Kird - 2012-05-08

    This function is available in [http://www.astrosurf.com/c2a/english/index.htm]
    (http://www.astrosurf.com/c2a/english/index.htm)
    Select: Tools - Ephemeris Generator - Moon. Enter dates. Set: Step.

     
  • Alexander Wolf

    Alexander Wolf - 2012-05-08

    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).

     
  • statto

    statto - 2012-05-08

    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!

     
  • statto

    statto - 2012-05-09

    Excellent! Thanks very much!

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks