Menu

It's not the size...

Feedback
qam1
2014-11-02
2014-11-03
  • qam1

    qam1 - 2014-11-02

    There seems to be a bug with the core.getObjectPosition / core.getObjectInfo commands when you try to get the size of an object.

    ie

    MoonData = core.getObjectInfo("Sun");
    s = MoonData["size"];

    The size returned is not right and doesn't match the size listed in the displayed fields

    For example if I run this simple script to check the size of the moon

    // Name: Check Size // License: Public Domain // Author: Qam1 // Description: Size Check // core.setDate("2014-11-02T00:00:00"); core.setTimeRate(0); p1 = "Moon"; core.selectObjectByName(p1, pointer = true); StelMovementMgr.setFlagTracking(true); MoonData = core.getObjectPosition(p1); s = MoonData["size"]; txt1 = LabelMgr.labelScreen("Size " + p1 +": =" + s, 10, 500, false, 35, "#FF0010"); LabelMgr.setLabelShow(txt1, true); core.wait(100);

    -

    The size returned comes back as 0.2737°, yet the angle size listed says its Apparent Diameter is +0°32'48.9" which works out to 0.5469°

    Looking at the moon and using the angle measurement tool confirms that the moon is about 0.5 degrees across and the script is wrong.

    It's not just the moon from earth, where ever you use core.getObjectPosition / core.getObjectInfo the size returned is always wrong.

    Two observations

    1) It seems when you get the size from an inner planet the size value is always too small, when you get the size from an outer planet the size value is too big

    2) Even if you set the script to run at the same time, the size value returned is always different every time you run the script.

    I just want to make sure I am not doing something wrong before I open a bug report

     

    Last edit: qam1 2014-11-02
    • Alexander Wolf

      Alexander Wolf - 2014-11-02

      It was my stupid bug. I'm fixed it at revision 7112 (http://bazaar.launchpad.net/~stellarium/stellarium/trunk/revision/7112) and add new output strings.

      Now:
      size - angular size in radians
      size-dd - angular size in decimal degrees
      size-deg - angular size in decimal degrees (formatted string)
      size-dms - angular size in DMS format

      Hint: core.getObjectPosition is deprecated

       
  • qam1

    qam1 - 2014-11-02

    Thanks.

    But hey, while you are there fixing getObjectInfo, could you add Distance to the information you can get?

    Phase/Illumination would be nice also