Piced and Moon Phase

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by RogerB, Nov 15, 2011.

  1. RogerB

    RogerB

    Joined:
    Nov 15, 2011
    Messages:
    10
    Likes Received:
    0
    Location:
    Auckland, New Zealand
    I was interested to try the Moon Phase IO
    Page 140 of the Programmers Guide refers to a file \PICED\Image Library\Frames\Moon Phase.bmp
    This file is not installed in my system. I also tried a completely new install on another PC - still no file.
    I would appreciate any advice on how to get this bmp (or that I have overlooked something), and anything else that may be relevant!

    Many thanks
     
    RogerB, Nov 15, 2011
    #1
  2. RogerB

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Unzip the attached files into the frames folder.
     

    Attached Files:

    Darren, Nov 16, 2011
    #2
  3. RogerB

    RogerB

    Joined:
    Nov 15, 2011
    Messages:
    10
    Likes Received:
    0
    Location:
    Auckland, New Zealand
    That's awesome thanks Darren

    But I don't think it's quite there yet.
    I'm showing 20.4 moon phase day and moon phase 6.
    According to the net, new moon is on the 25th November - so days and phase looking good.
    Moon phase name showing "last quarter". I can't see the moon at the moment - but seems OK!!

    However the graphic that comes up with the bitmap shows a half moon.

    Any ideas??
    Many thanks
    Roger
     
    RogerB, Nov 16, 2011
    #3
  4. RogerB

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    At the moment, about half of the moon is visible, and it is heading towards the new moon. This is called the "Last Quarter". The word "quarter" here refers to a quarter of the moon's cycle, not a quarter of it being visible.

    See http://www.enchantedlearning.com/subjects/astronomy/moon/Phases.shtml for details of the naming of the moon's cycles.
     
    Darren, Nov 16, 2011
    #4
  5. RogerB

    RogerB

    Joined:
    Nov 15, 2011
    Messages:
    10
    Likes Received:
    0
    Location:
    Auckland, New Zealand
    More questions!

    I am playing around with the moon phase display.

    The graphics that Darren has made available are a great start - but there are only 8 frames. And also I think the frame order v the frame displayed are wrong. For example we are now Moon Phase 7, Waning Crescent. But graphic frame actually shows a new moon "Waxing Crescent". Darren has provided a web reference - but I think the following is better / more informative. http://en.wikipedia.org/wiki/Lunar_phase. This also has a lovely 56 frame animated gif.
    So I want to use this 56 frame graphic!! I have resized it, deleted the text at the top, and converted it to the required BMP. All wonderfully seamless & easy. The graphic works perfectly with a Slider control - so now to make it work properly. I am happy to post this if anyone wants!

    Now to use the SystemIO "Moon Phase Day" with some simple arithmetic to convert it from 29.75 days to 56 frames. But... I can't get any logic associated with this to work.
    In Logic (I have declared the various variables as Global Variables)
    MoonPhase56Real := GetRealBSystemIO("Moon Phase Day"); does not work
    "Moon Phase Day" is not mentioned in the 4.17.3 In-Built System IO Variables in the logic manual - so perhaps it's not there yet??
    I tried another SystemIO variable that was Real. No luck. So tried a simpler Int. Still nothing - so now it must be me - but I just can't see what I'm doing wrong??!!
    The Int version I tried
    MoonPhase56Int := GetIntBSystemIO("Scene Component Count");
    3 Errors
    Error C104 at line 838:19 - Identifier is not declared
    Error C059 at line 838:34 - Error in variable
    Error C261 at line 838:35 - Tag Error

    My user SystemIO has no problems - MoonPhase56 := getrealsystemio("MoonPhase 56"); I used this User System IO as part of the slider control & frame display on my original trials

    I would appreciate someone putting me back on the straight & narrow!!
    Thanks in advance
     
    RogerB, Nov 20, 2011
    #5
  6. RogerB

    tobex

    Joined:
    Nov 3, 2006
    Messages:
    728
    Likes Received:
    0
    Location:
    Sydney, Australia
    You should see the startdate function with captains log.
     
    tobex, Nov 20, 2011
    #6
  7. RogerB

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    In the Wikipedia article you referenced, under the diagram of the moon phases it says "Phases of the Moon, as seen looking southward from the Northern Hemisphere. The Southern Hemisphere will see each phase rotated through 180?"

    The images I provided are for the Southern Hemisphere (which is where New Zealand was last time I checked ;) )


    You left an "I" out of GetRealIBSystemIO

    If you double clicked on the error message in the logic editor, it would have placed the cursor at the start of the word "GetRealBSystemIO" indicating that this was where the error was, not with the System IO Variable name.
     
    Darren, Nov 20, 2011
    #7
  8. RogerB

    Ambro

    Joined:
    Nov 23, 2010
    Messages:
    110
    Likes Received:
    3
    Location:
    Adelaide
    Moon Image

    I too couldn't find the moon image; so I knocked this up myself. It's a bit prettier than the stock standard (I think anyway).

    Being that I've got a lot of help/ideas from this forum I thought I'd give back something to the community. :)
     

    Attached Files:

    • Moon.zip
      File size:
      10.1 KB
      Views:
      288
    Ambro, Nov 21, 2011
    #8
  9. RogerB

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Very nice. Thanks for sharing that.
     
    Darren, Nov 22, 2011
    #9
  10. RogerB

    RogerB

    Joined:
    Nov 15, 2011
    Messages:
    10
    Likes Received:
    0
    Location:
    Auckland, New Zealand
    Thanks to all

    Thanks especially to Darren who has pointed out flaws - twice in one post!!! :)
    Think I have it sussed now - seems to work OK. Project files attached
    If anyone has any suggestions or comments - then they would be gratefully received.
    Thanks again
    Roger
     

    Attached Files:

    RogerB, Nov 22, 2011
    #10
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.