[Kstars-devel] branches/kstars/summer/kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Fri Jul 11 17:52:19 CEST 2008
Hi Akarsh,
On Fri, Jul 11, 2008 at 7:43 AM, Akarsh Simha <akarshsimha at gmail.com> wrote:
> + // DEBUG Edit. For testing proper motion. TODO: Remove later
> + if( name == "Rigel Kentaurus" ) {
> + // Populate Trail with various positions
> + KSNumbers num( 2000.0 );
> + long double jd;
> + for( jd = 2000.0; jd <= 12000.0; jd += 500.0 ) {
> + num.updateValues( jd );
> + double ra, dec;
> + getIndexCoords( &num, &ra, &dec );
> + Trail.append( new SkyPoint( ra, dec ) );
> + }
> + }
This code isn't right. the argument of num.updateValues() needs to be
a julian day number, not a year. You want something like this:
KSNumbers num;
long double jdStart = 1.0 // 1752
long double jdEnd = 5.0e6 //around year 8000
deltaJD = 500.0*365.25 //500 years
for ( jd=jdStart; jd<jdEnd; jd += deltaJD ) {
num.updateValues( jd );
...
}
regards,
Jason
More information about the Kstars-devel
mailing list