hyperbolaFit | R Documentation |
Fit hyperbola to data points \mathbf{x}, \mathbf{t}
, where
\mathbf{x} = (x_1, x_2, \ldots)
is the horizontal point position
and \mathbf{t} = (t_1, t_2, \ldots)
is the vertical (time) point
position.
The parameters a
and b
in
\frac{\mathbf{t}^2}{4} = a \mathbf{x}^2 + b \mathbf{x} + c
are
estimated with the lm
function.
The position of the vertex is given by:
x_0 = -\frac{b}{2} v_{RMS}
and
t_0 = 2 \sqrt{c - (\frac{x_0}{v_{RMS}})^2}
where v_{RMS} = \sqrt{\frac{1}{a}}
Note that the antenna separation distance is not accounted for.
hyperbolaFit(x, y = NULL)
x |
[ |
y |
[ |
[list
] A list with class hyperbola
containing the
following elements:
The regression output of the function lm
The estimated root-mean-square velocity
The horizontal position of the hyperbola vertex
The vertical position (time) of the hyperbola vertex
The input point positions x
The input point positions y
hyperbolaPlot
, hyperbolaSim
data("frenkeLine00")
x <- frenkeLine00
x <- estimateTime0(x, w = 5, method = "MER", FUN = mean)
x <- time0Cor(x, method = "pchip")
x <- gainAGC(fFilter(x, f = c(180, 250), type = "low"), w = 20)
plot(x)
# xy <- locator(type = "l")
xy <- list( x = c( 11.8, 15.0, 17.7, 20.3, 24.4, 27.4, 30.9, 35.2),
y = c(142.2, 119.8, 107.7, 99.5, 97.5, 105.6, 120.9, 138.1))
hyp <- hyperbolaFit(xy)
hyperbolaPlot(hyp, x = seq(5, 50, by = 0.01), col = "green",
lwd = 4, ann = TRUE)
points(xy, pch = 20, col = "blue")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.