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 the sun
10-17-2022, 07:46 PM
Post: #1
Creating a Chebyshev ephemeris of the sun
This HP Prime program can be used to create a Chebyshev representation of the geocentric position vector of the sun. 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 solar 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 the sun nfit = 18-21 is usually adequate.

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 the sun, 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

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

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

rsun_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 sun repeatedly. This is useful because the Chebyshev approach is faster than evaluating an analytic algorithm for the sun'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_sun.zip (Size: 16.31 KB / Downloads: 2)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Creating a Chebyshev ephemeris of the sun - cdeaglejr - 10-17-2022 07:46 PM



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