Green Community Info Green Community Info - General Store Store sign

VB-2012 Sun Position – High accuracy solar position algorithms – a resource for programmers and solar energy engineers (VB-2012 Programming by Example)

Pinned on December 19, 2012 at 8:48 pm by James Donnell

Repin
VB-2012 Sun Position – High accuracy solar position algorithms – a resource for programmers and solar energy engineers (VB-2012 Programming by Example)

Updated for VB-2012

Knowing how to calculate the sun’s position in the sky with very high accuracy is at the core of just about all solar energy research, whether for site planning, or real time aiming of the most sophisticated concentrating receivers, heliostats, and photovoltaic tracking systems. Sun Position’s Visual Basic algorithms meet that core need.

The author, John Clark Craig, programmed all the field control and data acquisition for several of the world’s largest solar energy projects in the 1980′s. Projects included the square-mile two-axis concentrating photovoltaic trackers at Carrissa Plains, California, the large Hesperia, California field of flat two-axis photovoltaic trackers, an enhanced oil recovery project using a field of heliostats and a central thermal receiver tower near Taft, California, and a variety of research and development projects at Sandia Labs, Solar 1 at Barstow, the Weizmann Institute, Tennessee Valley Authority, and elsewhere around the world. While developing software systems for these projects, John was constantly looking for the best algorithms and improved code for determining accurate sun position. Most of the available documentation was not easy to use, with bits and pieces of algorithms here and there, mixed in with poorly explained terminology, and with very little guidance for translating to programming languages he was required to use. Sun Position is the book he wishes he had when he really needed it!

Two algorithms are presented for calculating sun position. The first algorithm is of “low accuracy”, determining the sun’s position with a maximum error of about 0.02 degrees. The second algorithm is much more involved, but it provides a “high accuracy” sun position with a maximum error of about 0.00003 degrees. This is the code to use if you need the absolute best accuracy for heliostats and critically aimed solar concentrators of all types.

All of the Visual Basic source code in this book provides working example results for variables at every step of the way. This is the critical piece that makes this book a valuable resource for translating to any other programming language.


Comments

Bruce Rohr says:

Sun Position review “This book is an important addition to the literature on calculating the position of the sun at any position on earth at any time. Mr. Craig gives much credit to Jean Meeus’s book “Astronomical Algorithms”, a well known text on the subject. The two books are complementary in many ways, and I recommend both to anyone who needs to calculate sun position to any degree of accuracy. Essentially, Mr. Craig has simplified the rather complex sun position algorithms in Meeus’s book into a set of Visual Basic programs. The book’s simpler but lower accuracy algorithm is adequate for almost all solar energy applications and the higher accuracy algorithm is state of the art. When I wrote the sun position algorithm for my company five years ago, I used several reference sources, and certainly would have saved many hours if this book had been available. Bruce Rohr, President, Practical Solar, Inc., Boston, MA”

Jay Leopold says:

A Little Mistake is a Big Problem John’s book is crazy detailed … and crazy important. If you are building a solar array, it’s pretty important to point it at the Sun. However, the Sun is a moving target and that movement is insanely complex. You can figure it out for yourself … and be wrong or let John Craig tell you how to do it. It’s your choice. By the way, he gives you two choices … the easy way that is incredibly accurate or the hard way which is so accurate that it’s fun just to see how he does it. In either case, this is the definitive work on solar tracking software. Bravo to John and now … go get a life!

Vi Brown says:

“Sun Position” Demystifies Tracking the Sun Whether you are a new comer or an experienced professional, if you are interested in tracking the sun, John Clark Craig provides the basics and the programming for doing so in his new book, “Sun Position”. What I especially like about this short book is that it includes the actual code for two algorithms in the text: high accuracy (3 x 10-5) and low accuracy (2 x 10-2) degrees for determining sun positions. Internet references for the codes are also provided and make it easy to copy onto a screen or document thereby reducing the potential for typing error.Craig follows up by providing step by step examples of each calculation into a Visual Basic program. Additional information is provided on setting up Visual Basic Express, and some common debugging tips are also included. This book is a sun-tracker’s resource! It is a must-have for anyone working in solar energy, meteorology, atmospheric sciences or other related fields.Vi Brown, Principal & CEO, Prophecy Consulting Group, LLC, Mesa, AZ


Write a comment