Table of Contents

Class Wind

Namespace
SimpleWeather
Assembly
SimpleWeather.dll

Represents the wind section of the current weather response, including derived directions.

public class Wind
Inheritance
Wind
Inherited Members

Constructors

Wind(JToken?)

Initializes a new instance of the Wind class from JSON data.

public Wind(JToken? data)

Parameters

data JToken

The JSON token containing wind metrics.

Properties

Degree

Wind direction, degrees (meteorological)

public double? Degree { get; }

Property Value

double?

Gust

Wind gust. Default Unit: meter/sec

public double? Gust { get; }

Property Value

double?

Speed

Wind speed. Default Unit: meter/sec

public double? Speed { get; }

Property Value

double?

WindDirectionLong

Long wind direction represented by a string (North, East, South, West, etc.)

public string? WindDirectionLong { get; }

Property Value

string

WindDirectionShort

Short wind direction represented by a string (N, E, S, W, etc.)

public string? WindDirectionShort { get; }

Property Value

string

Methods

GetWindDirectionLong(double?)

Converts a numeric wind bearing into the corresponding long compass representation.

public static string GetWindDirectionLong(double? windDegree)

Parameters

windDegree double?

The meteorological wind degree.

Returns

string

The long direction token (e.g., North, Northwest).

GetWindDirectionShort(double?)

Converts a numeric wind bearing into the corresponding short compass representation.

public static string GetWindDirectionShort(double? windDegree)

Parameters

windDegree double?

The meteorological wind degree.

Returns

string

The short direction token (e.g., N, NW).