+ Reply to Thread
Results 1 to 3 of 3

Sunrise angle

  1. #1
    Registered User
    Join Date
    07-14-2013
    Location
    N/A
    MS-Off Ver
    Excel 2021 - 64 bit on Win11
    Posts
    42

    Sunrise angle

    Hello all,

    I found this code on internet after long searching created by Nicholas Hebb and want make animation off a sunrise for solar panels.
    I try to positioning the sun from 0° to angle A (when click on But1)
    But the sun don’t want listen to me

    Do you know how do it?

    I made example about what i mean

    Thank you to read this!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Sunrise angle

    I would not approach this problem using "shapes" like he has. I probably would not even use any VBA at all.

    I would use a scatter plot and geometry for this. If needed, I would start with this review of basic trig: http://www.mathsisfun.com/algebra/trigonometry.html Some have suggested that getting the trig right is the hardest part of this sort of thing, especially if it has been a while since you learned these basics in secondary school.

    the basic idea is that, given the angle and an assumed length (radius, if you will, I would probably use a value of 1, so that the math will be easier), you can locate the sun on an XY scatter chart using the basic sine and cosine trig ratios. Then simply connect that point to the origin (0,0), and you have your elevation line drawn. The spreadsheet section would look something like:
    Please Login or Register  to view this content.
    Then select these four cells and insert a scatter chart (with marker and line). You may need to execute a "switch row column" if Excel decides to use the top row for the x data.

    To add the "sun" shape as the marker, follow these directions http://www.techrepublic.com/blog/mic...g-excel-chart/

    See how far that gets you.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    07-14-2013
    Location
    N/A
    MS-Off Ver
    Excel 2021 - 64 bit on Win11
    Posts
    42

    Re: Sunrise angle

    Hello MrShorty,

    The problem is that all my code is made in VBA (image example in xls file).

    On this moment all is static but will like to make it in animation to have better idea what is happening.
    Aniway I will take a look on the links!

    Thank you very much

    Sunrise.xls
    Attached Images Attached Images
    Last edited by Giake; 07-14-2015 at 01:11 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Trying to Calculate day and night hours based on sunset and sunrise
    By davidhale87 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-27-2023, 05:33 PM
  2. Sunrise / Sunset
    By Peter Barrett in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-16-2014, 10:20 AM
  3. Trying to solve for an angle using VBA!
    By bmoon171 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-17-2014, 11:15 AM
  4. help with time after sunrise - tracking bats leaving a roost
    By jopedder in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-04-2013, 04:19 PM
  5. [SOLVED] Working out if a date/time occurs between sunset and sunrise?
    By Trottlips in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-14-2013, 05:00 AM
  6. [SOLVED] Setting an angle
    By ohaganli in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-29-2012, 11:29 AM
  7. Help with right angle triangle
    By robjamell in forum Excel General
    Replies: 4
    Last Post: 04-28-2011, 11:58 PM
  8. Angle addition
    By g40 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-18-2009, 11:43 AM

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1