Package org.orekit.data
Class PolynomialParser
- java.lang.Object
-
- org.orekit.data.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PolynomialParser.Unit
Unit for the coefficients.
-
Constructor Summary
Constructors Constructor Description PolynomialParser(char freeVariable, PolynomialParser.Unit defaultUnit)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
parse(String expression)
Parse a polynomial expression.
-
-
-
Constructor Detail
-
PolynomialParser
public PolynomialParser(char freeVariable, PolynomialParser.Unit defaultUnit)
Simple constructor.- Parameters:
freeVariable
- name of the free variabledefaultUnit
- 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
-
-