pvgis

package
v0.0.0-...-86ba82f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Endpoint string
}

func New

func New() *Client

func (*Client) AverageMonthlyIrradiation

func (c *Client) AverageMonthlyIrradiation(latitude, longitude float64, angle int, useHorizon bool) (float64, error)

AverageMonthlyIrradiation returns a yearly irradiation average for the given location (latitude, longitude) and the given surface angle (0 = horizontal) pointing to the equator

func (*Client) MonthlyIrradiation

func (c *Client) MonthlyIrradiation(latitude, longitude float64, angle int, useHorizon bool) ([]ResponseOutputsMonthly, error)

MonthlyIrradiation fetches monthly irradiation averages for the time from 2005 to 2020 for the given location (latitude, longitude) and the given surface angle (0 = horizontal) pointing to the equator

type Response

type Response struct {
	Outputs ResponseOutputs `json:"outputs"`
}

type ResponseOutputs

type ResponseOutputs struct {
	Monthly []ResponseOutputsMonthly `json:"monthly"`
}

type ResponseOutputsMonthly

type ResponseOutputsMonthly struct {
	Year           int     `json:"year"`
	Month          int     `json:"month"`
	Irradiation    float64 `json:"H(i)_m,nullable"`
	IrradiationOpt float64 `json:"H(i_opt)_m,nullable"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL