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 classAsh1_0Algorithm.RetValInternal class to handle return value.
-
Field Summary
Fields Modifier and Type Field Description (package private) static intNMAX(package private) static intOFFSETThe following is the original algorithm, as provided by Ash as a C routine(package private) doubleri(package private) doublerj(package private) doublerk(package private) doubleRmax(package private) javax.vecmath.Point3d[]sensors(package private) static intTMAX(package private) doubleVs(package private) doublex(package private) doublex0(package private) doublex1(package private) doublex2(package private) doublexi(package private) doublexj(package private) doublexk(package private) doubleXt(package private) doubley(package private) doubley0(package private) doubley1(package private) doubley2(package private) doubleyi(package private) doubleyj(package private) doubleyk(package private) doubleYt(package private) doublez(package private) doublez0(package private) doublez1(package private) doublez2(package private) doublezi(package private) doublezj(package private) doublezk(package private) doubleZt
-
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 Measurementconvert(Reading r)Measurementconvert(Reading r, javax.vecmath.Point3d guess)Seed the conversion using an estimated positionMeasurementconvert(Reading r, Measurement last)Seed the conversion using a last measurement(package private) intgps3()(package private) Ash1_0Algorithm.RetValRPSpos(int nr, double[] Tr, double[] Xr, double[] Yr, double[] Zr, double Vs, double Xt, double Yt, double Zt)(package private) doublewgt()
-
-
-
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:
convertin interfaceCalculator
-
convert
public Measurement convert(Reading r, javax.vecmath.Point3d guess)
Seed the conversion using an estimated position- Specified by:
convertin interfaceCalculator
-
convert
public Measurement convert(Reading r, Measurement last)
Seed the conversion using a last measurement- Specified by:
convertin 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()
-
-