The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Creating a Chebyshev ephemeris of an inner planet
10-18-2022, 03:29 PM
Post: #1
Creating a Chebyshev ephemeris of an inner planet
This HP Prime program can be used to create a Chebyshev representation of the geocentric and heliocentric position vectors of an inner planet of our solar system. The first part of the software demonstrates how to create the coefficients and the second part illustrates how to evaluate the coefficients and produce a planetary position vector.

The "fit" or degree of the representation is defined in the software with the following

// define order of "fit" or approximation

EXPORT nfit := 18;

For an inner planet, nfit = 18-21 is usually adequate.

The type of ephemeris to create (geocentric or heliocentric) is defined in the source code by

// define ephemeris type (1 = geocentric, 2 = heliocentric)

EXPORT iephtype := 2;

The planet of interest is specified by setting the value of iplanet as follows

// define planet of interest (1 = Mercury, 2 = Venus, 3 = Earth, 4 = Mars)

EXPORT iplanet := 4;

The initial date and length of the approximation is defined in the software with

// define initial utc calendar date of the Chebyshev ephemeris

month := 8;

day := 12;

year := 2023;

For the motion of an inner planet, a fit interval of 90-120 days is recommended.

// create 90 day Chebyshev ephemeris

deltat := 90.0;

Once the coefficients have been created, they can be evaluated for any time within the fit interval with the following source code

// select a valid tdt julian day within the span
// of the chebyshev ephemeris

delta_days := 40.56788;

jdtdt := jdtdt1 + delta_days;

x := (jdtdt - 2451545.0) / 36525.0;

// evaluate Chebyshev ephemeris at user-defined x

rplanet_cheby(1) := cheby_eval(ta, tb, nfit, rx_poly, x);

rplanet_cheby(2) := cheby_eval(ta, tb, nfit, ry_poly, x);

rplanet_cheby(3) := cheby_eval(ta, tb, nfit, rz_poly, x);

The coefficients need only be created once. They can then be used to compute different positions of the planet repeatedly. This is useful because the Chebyshev approach is faster than evaluating an analytic algorithm for the planet's position.

The final part of the software displays the differences between the Chebyshev and analytic ephemeris for a single time within the approximation interval.


Attached File(s)
.zip  cheby_planet.zip (Size: 22.29 KB / Downloads: 3)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Creating a Chebyshev ephemeris of an inner planet - cdeaglejr - 10-18-2022 03:29 PM



User(s) browsing this thread: 2 Guest(s)