Class Analytic_AAlgorithm

java.lang.Object
jmri.jmrix.rps.AbstractCalculator
jmri.jmrix.rps.Analytic_AAlgorithm
All Implemented Interfaces:
Calculator

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 class 
    Internal class to handle return value.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) int
     
    (package private) double
     
    (package private) double
     
    (package private) double
     
    (package private) double
     

    Fields inherited from class jmri.jmrix.rps.AbstractCalculator

    nr, sensors, Tr, Xr, Yr, Zr
  • 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

    Modifier and Type
    Method
    Description
     
    convert(Reading r, javax.vecmath.Point3d guess)
    Seed the conversion using an estimated position
    Seed the conversion using a last measurement
    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, summarize

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • Vs

      double Vs
    • Xt

      double Xt
    • Yt

      double Yt
    • Zt

      double Zt
    • offset

      int offset
  • Constructor Details

    • 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 Details

    • convert

    • convert

      public Measurement convert(Reading r, javax.vecmath.Point3d guess)
      Seed the conversion using an estimated position
    • convert

      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