Jan Kotek | 6 Mar 11:38
Picon

dataimport

Hi guys,

I have program which can read about 60 star catalogues and put them to
mysql database. You can limit magnitude, number of stars etc.

I thing it can be usefull for you to expand catalogs supported by KStars.

More at:
http://www.kotek.net/opencoeli

Regards,
Jan Kotek
Akarsh Simha | 11 Mar 20:10
Picon
Gravatar

Predicting conjunctions

Hi

I was trying to see if we could predict conjunctions of planets, so
that it could be incorporated into KStars.

What I thought was that we could first roughly calculate when the
occultation will happen next using circular orbits and such
approximations and then look around that point in time to find the
least separation.

However I found the trigonometry very tedious, so I tried some
approximation saying that the difference in the heliocentric
longitudes between the planets should go to zero. It happened to work
(mostly a coincidence!) for Mars and Jupiter. I was all excited, but
it failed for Saturn and Pluto - and it is a wrong algorithm.

Can someone suggest a better way of getting this?

Regards
Akarsh.
James Bowlin | 11 Mar 20:15
Picon

Re: Predicting conjunctions

On Tue March 11 2008, Akarsh Simha wrote:
> Can someone suggest a better way of getting this?

How about using KStars to march forward (and back) in time and write out
the conjunctions to a file?   Even if it takes a few days (or weeks?), 
it is done.  Distribute the data file as part of KStars.

--

-- 
Peace, James
Jason Harris | 11 Mar 22:14

Re: Predicting conjunctions

It didn't work for Saturn and Pluto because Pluto has a very inclined
orbit, meaning it is usually far from the ecliptic.  Most other
planets are always near the ecliptic (but not the Moon).

I think you had the right approach, but it was only the first step:
you need to identify times when the two planets have the same
heliocentric longitude, and then check to see whether they have the
same latitude as well.

One question: what angular separation would you use to define a
"conjunction"?  Is there a standard definition for this?

The positions of the planets are computed using a sinusoidal expansion
series with hundreds of terms.  It should be possible to use only the
first ten or 20 terms in these series to get a quick estimate of where
a planet will be at a given time, then when you find a close
separation, you can go to the full solution to get the final answer.

regards,
Jason

On 3/11/08, Akarsh Simha <akarshsimha <at> gmail.com> wrote:
> Hi
>
>  I was trying to see if we could predict conjunctions of planets, so
>  that it could be incorporated into KStars.
>
>  What I thought was that we could first roughly calculate when the
>  occultation will happen next using circular orbits and such
>  approximations and then look around that point in time to find the
(Continue reading)

Akarsh Simha | 12 Mar 06:16
Picon
Gravatar

Re: Predicting conjunctions

Hi

> How about using KStars to march forward (and back) in time and write out
> the conjunctions to a file?   Even if it takes a few days (or weeks?), 
> it is done.  Distribute the data file as part of KStars.

That is a good idea too... but I was thinking on the lines of being
able to predict close approaches between any two objects - not
necessarily planets. For example, the user selects a comet and some
Messier galaxy and asks when they will be less than 1 degree apart,
and we compute the time of the next such occurance.

@Jason:
I don't know if there's a standard definition for "close
conjunction". I thought we could ask the user to input the minimum
separation he wants (for instance, if I want to see both of them
simultaneously in my telescope, I can use the FOV of my telescope)

Could you tell me where I can find this sinusoidal series expansion?
Does it work for any orbits? IMO, it would be very helpful if it could
be extended to comets as well. What are the .vsop files that we have
for planets?

I think my earlier approach is fundamentally wrong because I think it
is the geocentric longitude that needs to be equal and not the
heliocentric longitude. I tried to grossly approximate the former
condition with the latter.

Regards
Akarsh.
(Continue reading)

Jan Kotek | 12 Mar 14:42
Picon

Re: Predicting conjunctions

Hi,

Sounds like good example for derivations.

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)

You can use interval division to find minimum...

This works for any orbit which have algorithm for position (planets,
comets, asteroid...).

Regards,

Jan Kotek
http://kotek.net/opencoeli

On 3/12/08, Akarsh Simha <akarshsimha <at> gmail.com> wrote:
> Hi
>
>
>  > How about using KStars to march forward (and back) in time and write out
>  > the conjunctions to a file?   Even if it takes a few days (or weeks?),
>  > it is done.  Distribute the data file as part of KStars.
>
>
> That is a good idea too... but I was thinking on the lines of being
>  able to predict close approaches between any two objects - not
(Continue reading)

Akarsh Simha | 12 Mar 17:43
Picon
Gravatar

Re: Predicting conjunctions

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...

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?

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.

_______________________________________________
Kstars-devel mailing list
Kstars-devel <at> kde.org
(Continue reading)

Jan Kotek | 13 Mar 11:40
Picon

Re: Predicting conjunctions

> 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...
>
(Continue reading)

James Bowlin | 13 Mar 18:58
Picon

Re: Predicting conjunctions

On Thu March 13 2008, Jan Kotek wrote:
> 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.

There is a C implementation in SkyMap::ClipLine() starting on line 61
of skymapdraw.cpp.  It finds where lines cross the celestial horizon.

--

-- 
Peace, James
Akarsh Simha | 18 Mar 13:14
Picon
Gravatar

Re: Predicting conjunctions

Dear Jan,

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

When we change the direction of step2 (as in step2 = -step2 / 10) in
the above implementation, is it not required to change lastSignum to
-lastSignum, because now the direction of step is opposite, which
means that (value - lastValue) will change sign even though we don't
cross an extremum?

I implemented the algorithm with the lastSignum = -lastSignum;
statement for finding the extrema of some simple cubic as a test
function, and it seems to work pretty well. However, the same
algorithm, without making the change goes off track.
I've pastebin'd the code here: http://pastebin.com/m297d1bc4
And the sample output is here: http://pastebin.com/m66aceab7
The function used was x * (1 - x) * (1 + x).

Regards
Akarsh.
_______________________________________________
Kstars-devel mailing list
Kstars-devel <at> kde.org
https://mail.kde.org/mailman/listinfo/kstars-devel

Gmane