Description Usage Arguments Details Value Author(s) References See Also Examples
Calculates a unit vector in the direction of the sun from the observer position.
1 |
jd |
Julian Day and decimal fraction. |
latitude |
Latitude of observer in degrees and decimal fraction. |
longitude |
Longitude of observer in degrees and decimal fraction. |
timezone |
Time zone, west is negative. |
To calculate the sunvector to the nearest hour, give the Julian Day with a precission better than 1/24; to approximate it to the nearest minute use decimal fractions smaller than 1/(24*60), and so on.
3 column matrix with the x, y , z coordinates of the sun vector.
Javier G. Corripio
Corripio, J. G.: 2003, Vectorial algebra algorithms for calculating terrain parameters from DEMs and the position of the sun for solar radiation modelling in mountainous terrain, International Journal of Geographical Information Science 17(1), 1-23.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Current solar vector at Greenwich observatory
sunvector(JD(Sys.time()),51.4778,-0.0017,0)
juneday = JD(seq(ISOdate(2019,6,21,0),ISOdate(2019,6,21,23,30),by='30 min'))
## Not run:
# Path of the sun over Greenwich in summer
require(scatterplot3d)
scatterplot3d(sunvector(juneday,51.4778,-0.0017,0),
ylim=c(-1,1),zlim=c(0,1),pch=8,color='orange')
## End(Not run)
# print values
options(digits=12) # make sure decimals are printed
sunvector(juneday,51.4778,-0.0017,0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.