Package jmri.jmrix.rps
Class Ash1_0Algorithm
- java.lang.Object
-
- jmri.jmrix.rps.Ash1_0Algorithm
-
- All Implemented Interfaces:
Calculator
public class Ash1_0Algorithm extends java.lang.Object implements Calculator
Implementation of 1st algorithm for reducing ReadingsThis algorithm was provided by Robert Ashenfelter based in part on the work of Ralph Bucher in his paper "Exact Solution for Three Dimensional Hyperbolic Positioning Algorithm and Synthesizable VHDL Model for Hardware Implementation".
Neither Ashenfelter nor Bucher provide any guarantee as to the intellectual property status of this algorithm. Use it at your own risk.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
Ash1_0Algorithm.RetVal
Internal class to handle return value.
-
Field Summary
Fields Modifier and Type Field Description (package private) static int
NMAX
(package private) static int
OFFSET
The following is the original algorithm, as provided by Ash as a C routine(package private) double
ri
(package private) double
rj
(package private) double
rk
(package private) double
Rmax
(package private) javax.vecmath.Point3d[]
sensors
(package private) static int
TMAX
(package private) double
Vs
(package private) double
x
(package private) double
x0
(package private) double
x1
(package private) double
x2
(package private) double
xi
(package private) double
xj
(package private) double
xk
(package private) double
Xt
(package private) double
y
(package private) double
y0
(package private) double
y1
(package private) double
y2
(package private) double
yi
(package private) double
yj
(package private) double
yk
(package private) double
Yt
(package private) double
z
(package private) double
z0
(package private) double
z1
(package private) double
z2
(package private) double
zi
(package private) double
zj
(package private) double
zk
(package private) double
Zt
-
Constructor Summary
Constructors Constructor Description Ash1_0Algorithm(javax.vecmath.Point3d[] sensors, double vsound)
Ash1_0Algorithm(javax.vecmath.Point3d sensor1, javax.vecmath.Point3d sensor2, javax.vecmath.Point3d sensor3, double vsound)
Ash1_0Algorithm(javax.vecmath.Point3d sensor1, javax.vecmath.Point3d sensor2, javax.vecmath.Point3d sensor3, javax.vecmath.Point3d sensor4, double vsound)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Measurement
convert(Reading r)
Measurement
convert(Reading r, javax.vecmath.Point3d guess)
Seed the conversion using an estimated positionMeasurement
convert(Reading r, Measurement last)
Seed the conversion using a last measurement(package private) int
gps3()
(package private) Ash1_0Algorithm.RetVal
RPSpos(int nr, double[] Tr, double[] Xr, double[] Yr, double[] Zr, double Vs, double Xt, double Yt, double Zt)
(package private) double
wgt()
-
-
-
Field Detail
-
Vs
double Vs
-
Xt
double Xt
-
Yt
double Yt
-
Zt
double Zt
-
sensors
javax.vecmath.Point3d[] sensors
-
OFFSET
static int OFFSET
The following is the original algorithm, as provided by Ash as a C routine
-
TMAX
static int TMAX
-
NMAX
static final int NMAX
- See Also:
- Constant Field Values
-
x
double x
-
y
double y
-
z
double z
-
x0
double x0
-
y0
double y0
-
z0
double z0
-
x1
double x1
-
y1
double y1
-
z1
double z1
-
x2
double x2
-
y2
double y2
-
z2
double z2
-
Rmax
double Rmax
-
xi
double xi
-
yi
double yi
-
zi
double zi
-
ri
double ri
-
xj
double xj
-
yj
double yj
-
zj
double zj
-
rj
double rj
-
xk
double xk
-
yk
double yk
-
zk
double zk
-
rk
double rk
-
-
Constructor Detail
-
Ash1_0Algorithm
public Ash1_0Algorithm(javax.vecmath.Point3d[] sensors, double vsound)
-
Ash1_0Algorithm
public Ash1_0Algorithm(javax.vecmath.Point3d sensor1, javax.vecmath.Point3d sensor2, javax.vecmath.Point3d sensor3, double vsound)
-
Ash1_0Algorithm
public Ash1_0Algorithm(javax.vecmath.Point3d sensor1, javax.vecmath.Point3d sensor2, javax.vecmath.Point3d sensor3, javax.vecmath.Point3d sensor4, double vsound)
-
-
Method Detail
-
convert
public Measurement convert(Reading r)
- Specified by:
convert
in interfaceCalculator
-
convert
public Measurement convert(Reading r, javax.vecmath.Point3d guess)
Seed the conversion using an estimated position- Specified by:
convert
in interfaceCalculator
-
convert
public Measurement convert(Reading r, Measurement last)
Seed the conversion using a last measurement- Specified by:
convert
in interfaceCalculator
-
RPSpos
Ash1_0Algorithm.RetVal RPSpos(int nr, double[] Tr, double[] Xr, double[] Yr, double[] Zr, double Vs, double Xt, double Yt, double Zt)
-
wgt
double wgt()
-
gps3
int gps3()
-
-