简体   繁体   中英

How to visualize 3d sun position (for solar power monitoring software)?

Im working on little hobby Raspberry Pi project. I'm measuring power and energy that comes from solar panel.

Im looking for better way of sun position visualisation.

My best idea so far that is easy to implement is something like this:

在此处输入图片说明

I found something really good:

在此处输入图片说明

(image source: link )

but I feel this is a bit too hard to implement.

Im looking for some kind of compromise between these two - easy to read for user and not so hard in implementation.

A bit lacking in requirements, but I like your first approach. I'm assuming the requirement includes a terminal-based interface, so I think you should use ASCII to render it. ;-)

     *
      \
       \
    50˚(\
---------+---------
E        N        W

Seriously, perhaps a graph with an X/Y axis showing the altitude and azimuth, combined with the first approach? Perhaps a graph similar to one of the ones on this page showing the progression of the sun today?

PS I'm marking this community wiki since I think this is, sadly, off-topic. =( You won't get MY close vote though!

Have you tried MatPlotLib in combination with PySolar?! With Pysolar you could easily get Azimuth and Zenith of Sun. With Matplotlib you can then draw an image to such.

This is how I would do it..

    latitude, longitude = 53.280223, 12.236105
    tilt_pv = 36.16 #tilt of PV panel.
    azimuth_pv = 180. #North-South alignment of your PV panel. In this case 180° depicts that panel is facing South
    baseDateTime = datetime(2015, 6, 9, 12, 0, 0) #Timestamp for 9 June 2015 12 UTC

    zenith = Pysolar.GetAltitude(latitude, longitude, baseDateTime)
    azimuth = Pysolar.GetAzimuth(latitude, longitude, baseDateTime)

That will give you the solar position.. That should go into your MatPlotLib configuration to plot this:

from mpl_toolkits.axes_grid.axislines import SubplotZero
import matplotlib.pyplot as plt
import numpy as np

if 1:
    fig = plt.figure(1)
    ax = SubplotZero(fig, 111)
    fig.add_subplot(ax)

    for direction in ["xzero", "yzero"]:
        ax.axis[direction].set_axisline_style("-|>")
        ax.axis[direction].set_visible(True)

    for direction in ["left", "right", "bottom", "top"]:
        ax.axis[direction].set_visible(False)

    x = np.linspace(0., zenith, 1000) #straight line in 1000 steps
    ax.plot(x, azimuth)

    plt.show()

And while we are add it. I have written a Python program to forecast solar energy from GFS weather model (I use: Global Radiation, Wind Speed and Temperature) which is freely available. Would you be interested to run and test this?! I want to see if it is any good or where I need to rune the performance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM