@nexgen-os/pvgis 0.4.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +7 -4
- package/dist/index.js +7 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { azimuthFromSouth, type CollectedSeries, type Point } from '@nexgen-os/core';
|
|
1
|
+
import { azimuthFromSouth, type CollectedSeries, type Fetch, type Point } from '@nexgen-os/connector';
|
|
3
2
|
export declare const SOURCE_CODE = "pvgis";
|
|
4
3
|
export interface PvgisSystem {
|
|
5
4
|
/** Peak power, kWp. 1 gives yields per kWp. */
|
|
@@ -45,8 +44,12 @@ export declare function pvgis(options?: {
|
|
|
45
44
|
fetch?: Fetch;
|
|
46
45
|
}): {
|
|
47
46
|
source_code: string;
|
|
48
|
-
/**
|
|
49
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Hourly series of a system over whole years: what a yield estimate of
|
|
49
|
+
* the `pvgis_like` profile stores. Without years, every year the radiation
|
|
50
|
+
* database covers, as PVGIS's PV calculator averages them; `meta` says which.
|
|
51
|
+
*/
|
|
52
|
+
hourly(where: Point, system: PvgisSystem, years?: {
|
|
50
53
|
from: number;
|
|
51
54
|
to: number;
|
|
52
55
|
}, extra?: {
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// `YYYYMMDD:HHMM` in UTC at the minute of the satellite image, and the core
|
|
10
10
|
// dates an hour at its start; PVGIS gives power in watts, the core keeps
|
|
11
11
|
// kilowatts and kilowatt-hours.
|
|
12
|
-
import { azimuthFromSouth } from '@nexgen-os/
|
|
12
|
+
import { azimuthFromSouth } from '@nexgen-os/connector';
|
|
13
13
|
export const SOURCE_CODE = 'pvgis';
|
|
14
14
|
export function pvgis(options = {}) {
|
|
15
15
|
const base = (options.baseUrl ?? 'https://re.jrc.ec.europa.eu/api/v5_3').replace(/\/+$/, '');
|
|
@@ -25,11 +25,15 @@ export function pvgis(options = {}) {
|
|
|
25
25
|
});
|
|
26
26
|
return {
|
|
27
27
|
source_code: SOURCE_CODE,
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Hourly series of a system over whole years: what a yield estimate of
|
|
30
|
+
* the `pvgis_like` profile stores. Without years, every year the radiation
|
|
31
|
+
* database covers, as PVGIS's PV calculator averages them; `meta` says which.
|
|
32
|
+
*/
|
|
29
33
|
async hourly(where, system, years, extra = {}) {
|
|
30
34
|
const params = new URLSearchParams({
|
|
31
35
|
lat: String(where.lat), lon: String(where.lon),
|
|
32
|
-
startyear: String(years.from), endyear: String(years.to),
|
|
36
|
+
...(years ? { startyear: String(years.from), endyear: String(years.to) } : {}),
|
|
33
37
|
pvcalculation: '1', ...systemParams(system), outputformat: 'json',
|
|
34
38
|
});
|
|
35
39
|
if (extra.raddatabase)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexgen-os/pvgis",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "PVGIS hourly PV energy and irradiance as a Nexgen OS connector.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,6 +32,6 @@
|
|
|
32
32
|
"build": "tsc -p tsconfig.build.json"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@nexgen-os/
|
|
35
|
+
"@nexgen-os/connector": "^0.6.0"
|
|
36
36
|
}
|
|
37
37
|
}
|