forecast
forecast
#
Generate potential future capture sessions.
Candidate sessions for the scheduler to choose from: times / times_of_day
lay out the instants, daylight the stretch of a day the sun is up, and
locations_area / locations_perimeter the places; then solar_position,
hourly_weather and nearest_weather add the conditions each slot would be
captured under, composed with the cg.Array broadcasting pattern.
Example
from datetime import timedelta
import capturegraph as cg
import capturegraph_recipes as cgr
potential = cg.Array()
potential.date = cgr.scheduling.forecast.times(span=timedelta(hours=24))
potential.location = my_location
potential.solar_angle = cgr.scheduling.forecast.solar_position(my_location, potential.date)
weather_data = cgr.scheduling.forecast.hourly_weather(my_location, days=3)
potential.weather = cgr.scheduling.forecast.nearest_weather(weather_data, potential.date)