Rho_loc: Gives the air density for a certain location.

Description Usage Arguments Details Value Author(s) References Examples

Description

Returns air density, of a given location, by using the package "darksky."

Usage

1
Rho_loc(Ta, La, date)

Arguments

Ta

Latitude of a given location.

La

Longitude of a given location.

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

b

The air density in kg/m^3 of a given location.

Author(s)

Natan Freitas Leite.

References

https://www.gribble.org/cycling/air_density.html

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, date)
{
    clim = climate(Ta, La, date)
    t = clim[1]
    t.dew = clim[2]
    hpa = clim[3]
    b = ((P.d(hpa, t.dew)/(287.0531 * (t + 273.15))) + (P.v(t.dew)/(461.4964 *
        (t + 273.15))))
    return(b)
  }

##latitude (T) and longitude (L) for S<c3><a3>o Francisco, Niter<c3><b3>i, Brazil
##cycling circuit:
Ta=-22.915396
La=-43.095511
date="2018-04-12T19:00:00"
rho=Rho_loc(Ta,La,date)
rho

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