How can I save coordinate data for star over a time period?

Asked by Riad Havannik on 2013-12-07

Hi,

Newbie here.

I use Stellairum regularly (for over a year now), but now I want to be able to save coordinate data (along with timestamps preferably) for a celestial object over time.

For instance, to give a simple example: I want to find out the altitude and azimuth for Polaris for the first three months in 2014, or, find out the maximum and minimum altitude of Polaris, along with the date and time when these max and mins occurred for the first three months in 2014. I don't mind if the desired data (Celestial object, date, time, Alt, Az) can be dumped into some text file which I can later process in Excel.

I found a similar question by Igor at https://answers.launchpad.net/stellarium/+question/240119, but didn't what to hijack his question because mine isn't as detailed as his right now.

-RH

Question information

Language:
English Edit question
Status:
Solved
For:
Stellarium Edit question
Assignee:
No assignee Edit question
Solved by:
Alexander Wolf
Solved:
2013-12-09
Last query:
2013-12-09
Last reply:
2013-12-08
Riad Havannik (rk-2012) said : #1

I subscribed Igor to this post as any answers may also him help.

Best Alexander Wolf (alexwolf) said : #2

1) Press F12, copy text below and put in opened window...

core.wait(1);
core.clear("natural");
core.selectObjectByName("HIP 11767", false);
core.wait(1);
StelMovementMgr.setFlagTracking(true);
core.setDeltaTAlgorithm("WithoutCorrection");
core.setDate("2014:01:01T00:00:00", "utc", false);
core.debug("Info for Polaris (HIP 11767)");
for (i=0; i<2137; i++)
{
 info = core.getObjectInfo("HIP 11767");
 out = "Date:" + core.getDate("utc") + "\tAltitude:" + info["altitude"] + "\tAzimuth:" + info["azimuth"];
 core.debug(out);
 core.setDate("+1 hour");
}
core.debug("End of data");

2) Run script
3) After end of running look at results in log.txt file (Start -> Programs -> Stellarium -> Latest run log on Windows)

Thank you Riad for adding me in your question-answer.
The answer of Alexander is good enough for me to get the data into a file,
but rather than a tab i will use csv or just space, later i can clean and
format the rest of the log.txt with an excel Macro as you suggested.

Thanks too to Alexander Wolf and the Stellarium Team for the support,

Best Regards,
Igor Leiva.

2013/12/6 Riad Havannik <email address hidden>

> Question #240420 on Stellarium changed:
> https://answers.launchpad.net/stellarium/+question/240420
>
> Riad Havannik posted a new comment:
> I subscribed Igor to this post as any answers may also him help.
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

Riad Havannik (rk-2012) said : #4

Hi all,

Thanks so much for the responses! Sorry for the late reply but I only saw the notification in my email today.

The code looks elegant. I just tried it, but I got an error ""TypeError: Result of expression 'core.setDeltaTAlgorithm' [undefined] is not a function", but it seems like I got that because I am running v11.xx of Stellarium, not the latest version (according to this http://sourceforge.net/p/stellarium/discussion/278769/thread/f8f2dfae/).

I am downloading (the very large!) stellarium-0.12.4-win32.exe right now and would let you all know if I got it to work there as soon as I can.

-RH

Riad Havannik (rk-2012) said : #5

Oh sweet that did it! It took about 5 mins to run. Thanks a lot!

Where can I get more info on the code functions, syntax, and language used for scripts etc?

Riad Havannik (rk-2012) said : #6

Thanks Alexander Wolf, that solved my question.

Riad Havannik (rk-2012) said : #7

Where can I get more info on the code functions, syntax, and language used for scripts etc used in Stellarium?
I know *nothing* about it and I wanna know more about it... interested former-coder here.

Alexander Wolf (alexwolf) said : #8
Riad Havannik (rk-2012) said : #9

Thank you.