[Kstars-devel] Predicting conjunctions

Jan Kotek opencoeli at gmail.com
Thu Mar 13 11:40:54 CET 2008


> I am rather unfamiliar with numerical methods. (Googling didn't
>  help). How does this work? Can it find the global and local minima on
>  a given interval?

Increase X by STEP. Calculate increment of distance from last X. If
increment changed sign(+-) from last time, it means you passed
minimum/maximum. So reverse STEP (STEP = -0.5* STEP) and continue.

Repeat until STEP is smaller then exactness you want.

Java implementation is here:
http://opencoeli.googlecode.com/svn/trunk/opencoeli/src/main/java/org/opencoeli/utils/Minimax.java

Jan


On 3/12/08, Akarsh Simha <akarshsimha at gmail.com> wrote:
> Hi,
>
>
>  > 1) function for calculating position of planet (already in KStars)
>  > 2) function which returns distance of two planets
>  > double getDistance(double time)
>  > 3) calculate minimum of this function for given time (thats conjunction)
>
>
> Hmmm...
>
>
>  > You can use interval division to find minimum...
>
>
>
>  Essentially I was looking for some _fast_ way to find the minimum
>  separation of a function that I can compute but cannot express
>  algebraically.
>
>  My trouble is in getting the seed point. How do I find out where to
>  start, i.e. get a first approximation to the time of conjunction?
>
>  Regards
>
> Akarsh.
>
>
> -----BEGIN PGP SIGNATURE-----
>  Version: GnuPG v1.4.6 (GNU/Linux)
>
>  iD8DBQFH2AgikAo+aFFLL8MRAjotAJ9O+yDX3mK7tib+TKoZ9f9DCXW5/wCfYE5v
>  8XNc+raaSGDxU2dYoqVYTRg=
>  =SfE6
>  -----END PGP SIGNATURE-----
>
> _______________________________________________
>  Kstars-devel mailing list
>  Kstars-devel at kde.org
>  https://mail.kde.org/mailman/listinfo/kstars-devel
>
>


More information about the Kstars-devel mailing list