Inaccurate elevations
begiljen opened this issue · 4 comments
begiljen commented
Hi,
I'm trying to calculate a graph from Moon elevations, but when using CelestialUtil with for example 50 sample points from one day, I get a "jagged" graph. It looks like the time tolerance is too rough.
Here is a sample:
startOfDay = [self dateAtBeginningOfDayForDate:startOfDay];
int stepSize=(86400/kNROfSamples);
for(int i=0; i<kNROfSamples; i++)
{
elev=[[CMMoon new] elevationAtDate:startOfDay inLocation:loc];
NSLog(@"%f", elev);
startOfDay = [startOfDay dateByAddingTimeInterval:stepSize];
}
This will create equal values of elevation from several steps in the for-loop.
shukob commented
Hi,
thanks for reporting!
It may because CMCelestialUtitlity#pastJulianYearOfDate do not use minutes/seconds to calculate JY. I'll check this by this weekend.
shukob commented
Hi,
it seems to become smoothed.
Please check it when you have time?
Thank you.
begiljen commented
Working great now! Thanks :)
shukob commented
Good to here that ; )