R/xyz2ll.R

Defines functions xyz2ll

Documented in xyz2ll

xyz2ll<-function(x)
{
###  lat here is lattitude (not co-lat)
  RADDEG = 180/pi
  y<-x/sqrt(sum(x*x))
  lat <- asin(y[3])*RADDEG  ;
  lon <- atan2(y[2], y[1])*RADDEG   ;
  return(c(lat,lon))

}

Try the GEOmap package in your browser

Any scripts or data that you put into this service are public.

GEOmap documentation built on Sept. 1, 2023, 5:09 p.m.