Results 1 to 6 of 6

Thread: If Sun Calculations

  1. #1
    New User
    Join Date
    May 2016
    Location
    Austin, TX
    Posts
    12

    If Sun Calculations

    I am playing with my if sun calculations... and wanted to check if this was correct.

    Assuming a Sunrise of 6:30 and a Sunset of 8:30 in my season table for simplicity

    My apex programming is:
    Set OFF
    If Sun 060/-360 Then SunUp
    If Sun 240/-120 Then SunDown
    If Sun 360/060 Then Midday


    I would assume the following behavior:

    SunUp 7:30 2:30
    Midday 10:30 6:30
    SunDown 12:30 9:30


    If I switch my programming to:
    Set OFF
    If Sun 060/-360 Then SunUp
    If Sun 480/060 Then SunDown
    If Sun 360/-240 Then Midday


    Then, I should expect the following behavior:

    SunUp 7:30 2:30
    Midday 12:30 4:30
    SunDown 2:30 9:30


    I am trying to shorten the Midday exposure to 4 hours... Is this correct or am I just misunderstand the whole concept? Thank you.

  2. #2
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Midday will vary depending on the time of year.

    Do you want midday 0 hours in winter, 2 hours in spring/fall, and 4 hours in summer? Do you want 2 hours in winter, 4 hours in spring/fall and 6 hours in summer

    You might be an engineer if...You have no life and can prove it mathematically.

  3. #3
    New User
    Join Date
    May 2016
    Location
    Austin, TX
    Posts
    12
    Yes it will definitely vary... for example, Winter (Jan) has a Sunrise of 7:30 and a Sunset of 6:00 in my season table, so with:

    Set OFF
    If Sun 060/-360 Then SunUp
    If Sun 480/060 Then SunDown
    If Sun 360/-240 Then Midday

    Then, I should expect the following behavior:

    SunUp 8:30 12:00
    Midday 1:30 2:00
    SunDown 3:30 7:00

    So with this programming I would only get 30 minutes of Midday in the Winter. Is there a way to do 2 hours in winter, 4 hours in spring/fall and 6 hours in summer regardless of sunrise and sunset in the season table?


  4. #4
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Not without some crazy complicated logic with VOs. The way I did it when I used the season table was I adjusted the season table itself because 18 hours was giving me algae problems so I changed it manually to get 10 hours in winter and 14 hours on summer. I had forgotten that I changed mine when I mentioned 2 in winter 6 in summer.

    You might be an engineer if...You have no life and can prove it mathematically.

  5. #5
    New User
    Join Date
    May 2016
    Location
    Austin, TX
    Posts
    12
    Right... I was trying to do it with logic... but altering the season table would be easier... at that point, why use it. Did you switch away from season table? I have been thinking about it too to get more granular control.

  6. #6
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    I used it when I had a larger tank to see if I could get coral to spawn and was unsuccessful after 2 years. When I sold my big tank and downgraded to a 29 biocube I stuck with the wizard to simplify the code and maintain more consistency in the tank.

    You might be an engineer if...You have no life and can prove it mathematically.

Similar Threads

  1. Flo Tank Size calculations
    By ExUser20200804 in forum WAV Powerheads
    Replies: 6
    Last Post: 06-23-2016, 12:05
  2. Rise-Fall Rate Calculations
    By Ontheway in forum Misc Apex Usage & Programming
    Replies: 8
    Last Post: 06-17-2016, 08:32
  3. Rise-Fall Rate Calculations
    By Ontheway in forum APEX Fusion
    Replies: 0
    Last Post: 06-05-2016, 02:42
  4. Review My Program If Sun possible causing sun up issue
    By dbelben2556 in forum Apex Programming for Lighting
    Replies: 2
    Last Post: 02-19-2016, 06:41
  5. Read This First! Changed If Sun & If Moon behavior - anyone using If Sun or If Moon - READ THIS!
    By RussM in forum Apex Programming for Lighting
    Replies: 0
    Last Post: 12-18-2013, 05:53

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •