|
From: | Byerly, Mike M (DFG) |
Subject: | modulo-360 issue with compass heading data |
Date: | Wed, 08 Oct 2014 23:14:24 +0000 |
Please disregard my last post. I figured it out. sec <- c(61290,61305,61320,61335) deg <- c(345,353,20,8) h <- data.frame(sec,deg) h$uw <- unwrap(h$deg*pi/180) d.int <- interp1(h$sec, h$uw, min(h$sec):max(h$sec), 'linear', extrap = FALSE) d.int <- ifelse(d.int>2*pi, d.int - 2*pi, d.int)*180/pi s.int <- min(h$sec):max(h$sec) h.int <- data.frame(s.int,d.int) h.int Mike |
[Prev in Thread] | Current Thread | [Next in Thread] |