Class PolynomialParser


  • public class PolynomialParser
    extends Object
    Parser for polynomials in IERS tables.

    IERS conventions tables display polynomial parts using several different formats, like the following ones:

    • 125.04455501° − 6962890.5431″t + 7.4722″t² + 0.007702″t³ − 0.00005939″t⁴
    • 0.02438175 × t + 0.00000538691 × t²
    • 0''.014506 + 4612''.15739966t + 1''.39667721t^2 - 0''.00009344t^3 + 0''.00001882t^4
    • -16616.99 + 2004191742.88 t - 427219.05 t^2 - 198620.54 t^3 - 46.05 t^4 + 5.98 t^5

    This class parses all these formats and returns the coefficients.

    Author:
    Luc Maisonobe
    See Also:
    SeriesTerm, PoissonSeries, BodiesElements
    • Constructor Detail

      • PolynomialParser

        public PolynomialParser​(char freeVariable,
                                PolynomialParser.Unit defaultUnit)
        Simple constructor.
        Parameters:
        freeVariable - name of the free variable
        defaultUnit - unit to use if no unit found while parsing
    • Method Detail

      • parse

        public double[] parse​(String expression)
        Parse a polynomial expression.
        Parameters:
        expression - polynomial expression to parse
        Returns:
        polynomial coefficients array in increasing degree order, or null if expression is not a recognized polynomial