---
name: "BIS_fnc_interpolateWeather"
type: function
status: ok
groups: ["Environment"]
arma3_since: "1.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_interpolateWeather
revid: 309835
updated: 2022-05-05T12:09:52Z
---

# BIS_fnc_interpolateWeather

*Function · Environment · Arma 3 v1.00*

## Description

Interpolate weather (overcast and fog) according to 2 boundry dates and their weather conditions.

## Syntax

*syntax inferred from the function header*

```sqf
[param0, param1, param2, param3, param4] call BIS_fnc_interpolateWeather
```

**Parameters:**

- `param0` — 0: array    - _date1     [_year1,_month1,_day1,_hour1,_min1]
- `param1` — 1: array    - _weather1    [_overcast1,_fog1]
- `param2` — 2: array    - _date2     [_year2,_month2,_day2,_hour2,_min2]
- `param3` — 3: array    - _weather2    [_overcast2,_fog2]
- `param4` — 4: array    - _subjectDate     [_year,_month,_day,_hour,_min] (default: current date)

**Returns:** [_interpolatedOvercast,_interpolatedFog]

## Examples

### Example 1

```sqf
[_overcast,_fog] = [[2035,1,5,24,00],[0.1,0.5],[2035,1,10,24,00],[0.3,0.2],[2035,1,7,24,00]] call BIS_fnc_interpolateWeather;
```

## Function header

The comment at the top of the function's file in the game; this page's description, params, syntax, returns, examples come from it.

```sqf
/*
Description:
Interpolate weather (overcast and fog) according to 2 boundry dates and their weather conditions.

Parameter(s):
_this select 0: array    - _date1     [_year1,_month1,_day1,_hour1,_min1]
_this select 1: array    - _weather1    [_overcast1,_fog1]
_this select 2: array    - _date2     [_year2,_month2,_day2,_hour2,_min2]
_this select 3: array    - _weather2    [_overcast2,_fog2]
_this select 4: array    - _subjectDate     [_year,_month,_day,_hour,_min] (default: current date)

Returns:
[_interpolatedOvercast,_interpolatedFog]

Example:
[_overcast,_fog] = [[2035,1,5,24,00],[0.1,0.5],[2035,1,10,24,00],[0.3,0.2],[2035,1,7,24,00]] call BIS_fnc_interpolateWeather;
*/
```

<sub>Source: [BI Community Wiki — BIS fnc interpolateWeather](https://community.bistudio.com/wiki/BIS_fnc_interpolateWeather) (revision 309835).</sub>
