Class: WindDataProvider

WindDataProvider

new WindDataProvider(json)

Provides Wind Data Vectors from JSON file
Parameters:
Name Type Description
json String The wind data file.
Source:

Members

(readonly) ready :Boolean

Gets a value indicating whether or not the provider is ready for use.
Type:
  • Boolean
Source:

(readonly) readyPromise :Promise.<Boolean>

Gets a promise that resolves to true when the provider is ready for use.
Type:
  • Promise.<Boolean>
Source:

Methods

(private) bilinearInterpolateVector()

Interpolates vector bilinear for accessing wind data (Ref: https://github.com/cambecc/earth)
Source:
Returns:
wind in u, v direction and length of (u,v)

(private) createBuilder()

Loads json for wind data
Source:

(private) createGrid(builder)

creates the grid and adds interpolate function
Parameters:
Name Type Description
builder Object Builder of a json file
Source:

dataSource(header) → {String}

Returns the data source of a given header (Ref: https://github.com/cambecc/earth)
Parameters:
Name Type Description
header Object header of json file
Source:
Returns:
data source as String
Type
String

(private) floorMod(a, n)

Modulo calculation, that makes sure the returned value is between [0, n) (Ref: https://github.com/cambecc/earth)
Parameters:
Name Type Description
a number number to be calculated
n number number for modulo calculation
Source:

interpolate(λ, φ) → {list}

Returns the wind data for a given point (including interpolation) (Ref: https://github.com/cambecc/earth)
Parameters:
Name Type Description
λ number longitude in degree
φ number latitude in degree (-90,90)
Source:
Returns:
list with u, v and length
Type
list

(private) isValue(x)

Checks whether x is valid (not null and not undefined)
Parameters:
Name Type Description
x value to be checked
Source: