Package jmri.jmrix.rps
Class InitialAlgorithm
- java.lang.Object
-
- jmri.jmrix.rps.InitialAlgorithm
-
- All Implemented Interfaces:
Calculator
public class InitialAlgorithm extends java.lang.Object implements Calculator
Implementation of 1st algorithm for reducing Readings.This 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.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intngps(package private) doubler0(package private) doubleri(package private) doublerj(package private) doublerk(package private) doublerl(package private) javax.vecmath.Point3dsensor1(package private) javax.vecmath.Point3dsensor2(package private) javax.vecmath.Point3dsensor3(package private) javax.vecmath.Point3dsensor4(package private) doublevsound(package private) doublexThe following is the original algorithm, as provided by Ash as a C routine(package private) doublex0(package private) doublexi(package private) doublexj(package private) doublexk(package private) doublexl(package private) doubleyThe following is the original algorithm, as provided by Ash as a C routine(package private) doubley0(package private) doubleyi(package private) doubleyj(package private) doubleyk(package private) doubleyl(package private) doublezThe following is the original algorithm, as provided by Ash as a C routine(package private) doublez0(package private) doublezi(package private) doublezj(package private) doublezk(package private) doublezl
-
Constructor Summary
Constructors Constructor Description InitialAlgorithm(javax.vecmath.Point3d[] sensors, double vsound)InitialAlgorithm(javax.vecmath.Point3d sensor1, javax.vecmath.Point3d sensor2, javax.vecmath.Point3d sensor3, double vsound)InitialAlgorithm(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) booleangps()
-
-
-
Field Detail
-
vsound
double vsound
-
sensor1
javax.vecmath.Point3d sensor1
-
sensor2
javax.vecmath.Point3d sensor2
-
sensor3
javax.vecmath.Point3d sensor3
-
sensor4
javax.vecmath.Point3d sensor4
-
x
double x
The following is the original algorithm, as provided by Ash as a C routine
-
y
double y
The following is the original algorithm, as provided by Ash as a C routine
-
z
double z
The following is the original algorithm, as provided by Ash as a C routine
-
x0
double x0
-
y0
double y0
-
z0
double z0
-
r0
double r0
-
ngps
int ngps
-
xi
double xi
-
yi
double yi
-
zi
double zi
-
xj
double xj
-
yj
double yj
-
zj
double zj
-
xk
double xk
-
yk
double yk
-
zk
double zk
-
xl
double xl
-
yl
double yl
-
zl
double zl
-
ri
double ri
-
rj
double rj
-
rk
double rk
-
rl
double rl
-
-
Constructor Detail
-
InitialAlgorithm
public InitialAlgorithm(javax.vecmath.Point3d[] sensors, double vsound)
-
InitialAlgorithm
public InitialAlgorithm(javax.vecmath.Point3d sensor1, javax.vecmath.Point3d sensor2, javax.vecmath.Point3d sensor3, double vsound)
-
InitialAlgorithm
public InitialAlgorithm(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
-
gps
boolean gps()
-
-