R/distseisnXY.R

Defines functions distseisnXY

Documented in distseisnXY

distseisnXY<-function(GH, sta=list(nam="", x=0 , y=0 , z=0) , LOC=list(x=0, y=0 , z=0)   )
{
  ###  given a RSEIS list get the distances to each station 
  m = match( GH$STNS,    sta$nam)
  X =  sta$x[m]
  Y =  sta$y[m]
  Z = sta$z[m]	
  dees =  sqrt((X-LOC$x)^2 + (Y-LOC$y)^2 +  (Z-LOC$z)^2 )

  return(dees)	
}

Try the RSEIS package in your browser

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

RSEIS documentation built on Sept. 13, 2024, 1:09 a.m.