Package jmri.jmrix.rps
Class Analytic_AAlgorithm
- java.lang.Object
-
- jmri.jmrix.rps.AbstractCalculator
-
- jmri.jmrix.rps.Analytic_AAlgorithm
-
- All Implemented Interfaces:
Calculator
public class Analytic_AAlgorithm extends AbstractCalculator
Implementation of RPS location-finding using GPS equations from Sam Storm van Leeuwen <samsvl@nlr.nl>, ported to Java by Norris Weimer <norris.weimer@ualberta.ca>, and ported to JMRI/RPS by Bob Jacobsen. The original Pascal code and documentation is on these web pages http://callisto.worldonline.nl/~samsvl/stdalone.pas http://callisto.worldonline.nl/~samsvl/satpos.htm http://callisto.worldonline.nl/~samsvl/stdalone.htm There is also a link there to a C port of Sam's programs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classAnalytic_AAlgorithm.RetValInternal class to handle return value.
-
Constructor Summary
Constructors Constructor Description Analytic_AAlgorithm(javax.vecmath.Point3d[] sensors, double vsound)Analytic_AAlgorithm(javax.vecmath.Point3d[] sensors, double vsound, int offset)Analytic_AAlgorithm(javax.vecmath.Point3d sensor1, javax.vecmath.Point3d sensor2, javax.vecmath.Point3d sensor3, double vsound)Analytic_AAlgorithm(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 measurementdouble[]solve(double[][] Xs, boolean[] SV, double[] P, double[] Xr)*************************************************************************doublesub(double[][] A, int r, int c)************************************************************************* finds the determinant of a minor of a 4 x 4 matrix-
Methods inherited from class jmri.jmrix.rps.AbstractCalculator
prep, summarize
-
-
-
-
Constructor Detail
-
Analytic_AAlgorithm
public Analytic_AAlgorithm(javax.vecmath.Point3d[] sensors, double vsound, int offset)
-
Analytic_AAlgorithm
public Analytic_AAlgorithm(javax.vecmath.Point3d[] sensors, double vsound)
-
Analytic_AAlgorithm
public Analytic_AAlgorithm(javax.vecmath.Point3d sensor1, javax.vecmath.Point3d sensor2, javax.vecmath.Point3d sensor3, double vsound)
-
Analytic_AAlgorithm
public Analytic_AAlgorithm(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)
-
convert
public Measurement convert(Reading r, javax.vecmath.Point3d guess)
Seed the conversion using an estimated position
-
convert
public Measurement convert(Reading r, Measurement last)
Seed the conversion using a last measurement
-
solve
public double[] solve(double[][] Xs, boolean[] SV, double[] P, double[] Xr)
*************************************************************************- Parameters:
Xs- array with 3 columns and 32 rows, for the coordinates of the sat'sSV- valid prn'sP- pseudoranges (note: arrays actually have 33 rows, but row 0 is unused, in order to index by actual prn number)Xr- input of initial guess ( user position in ECEF)- Returns:
- [X, X, X, Cr] output of final position and receiver clock error return null if calculation failed //do: throw exception instead
-
sub
public double sub(double[][] A, int r, int c)
************************************************************************* finds the determinant of a minor of a 4 x 4 matrix- Parameters:
A- input 4 x 4 arrayr- the row to be deletedc- the column to be deleted- Returns:
- subdet determinant of the resulting 3 x 3 matrix
-
-