Phi: Calculates the angle, in degrees, that the wind affects the...

Description Usage Arguments Details Value Author(s) Examples

Description

By evaluating the direction that a certain cyclist is going, and getting the wind bearing, it's possible to calculate this angle phi.

Usage

1
Phi(Ta, La, Tb, Lb, date)

Arguments

Ta

Latitude of the origin point.

La

Longitude of the origin point.

Tb

Latitude of the destination point.

Lb

Longitude of the destination point.

date

Date and time to get the weather report. Check example for input format.

Details

To use the package "darksky" to collect weather report, you must activate the API with your key. Check https://darksky.net/dev for more info.

Value

phi

The angle at which the wind affects the cyclist, in degrees.

Author(s)

Natan Freitas Leite

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## The function is currently defined as
function (Ta, La, Tb, Lb, date)
{
    phi = abs(ang_head(Ta, La, Tb, Lb) - climate(Ta, La, date)[4])
    return(phi)
  }

##latitude (T) and longitude (L) for S<c3><a3>o Francisco, Niter<c3><b3>i, Brazil
##cycling circuit:
Ta=-22.915396
La=-43.095511
Tb=-22.934862
Lb=-43.101902
##date to get the wind direction in relation to the cyclist
##"AAAA-MM-DDThh:mm:ss"
date="2017-04-02T07:00:00"
##result
phi=Phi(Ta,La,Tb,Lb,date)
phi

Bolshom/optimumtt documentation built on May 24, 2019, 8:56 a.m.