jmri.jmrix.rps
Class Analytic_AAlgorithm

java.lang.Object
  extended by jmri.jmrix.rps.AbstractCalculator
      extended by 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 , ported to Java by Norris Weimer , and ported to JMRI/RPS by Bob Jacobsen. The original Pascal code and documentation is on these web pages There is also a link there to a C port of Sam's programs

Author:
Bob Jacobsen Copyright (C) 2008

Constructor Summary
Analytic_AAlgorithm(Point3d[] sensors, double vsound)
           
Analytic_AAlgorithm(Point3d[] sensors, double vsound, int offset)
           
Analytic_AAlgorithm(Point3d sensor1, Point3d sensor2, Point3d sensor3, double vsound)
           
Analytic_AAlgorithm(Point3d sensor1, Point3d sensor2, Point3d sensor3, Point3d sensor4, double vsound)
           
 
Method Summary
 Measurement convert(Reading r)
           
 Measurement convert(Reading r, Measurement last)
          Seed the conversion using a last measurement
 Measurement convert(Reading r, Point3d guess)
          Seed the conversion using an estimated position
 double[] solve(double[][] Xs, boolean[] SV, double[] P, double[] Xr)
           
 double sub(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Analytic_AAlgorithm

public Analytic_AAlgorithm(Point3d[] sensors,
                           double vsound,
                           int offset)

Analytic_AAlgorithm

public Analytic_AAlgorithm(Point3d[] sensors,
                           double vsound)

Analytic_AAlgorithm

public Analytic_AAlgorithm(Point3d sensor1,
                           Point3d sensor2,
                           Point3d sensor3,
                           double vsound)

Analytic_AAlgorithm

public Analytic_AAlgorithm(Point3d sensor1,
                           Point3d sensor2,
                           Point3d sensor3,
                           Point3d sensor4,
                           double vsound)
Method Detail

convert

public Measurement convert(Reading r)

convert

public Measurement convert(Reading r,
                           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's
SV - valid prn's
P - 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 array
r - the row to be deleted
c - the column to be deleted
Returns:
subdet determinant of the resulting 3 x 3 matrix


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads