Go Back   IceInSpace > Equipment > Software and Computers
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread
  #21  
Old 08-03-2012, 06:56 PM
Barrykgerdes
Registered User

Barrykgerdes is offline
 
Join Date: Feb 2007
Location: Beaumont Hills NSW
Posts: 2,900
Hi Peter
I did a little research on the script language and it is quite comprehensive. I have not tried but if you use "get" where "set" is in the command I think it will extract that data.

Here is the table of commands as far as I have progressed.

Barry
Attached Files
File Type: doc Scripting Commands.doc (35.0 KB, 9 views)

Last edited by Barrykgerdes; 08-03-2012 at 07:33 PM.
Reply With Quote
  #22  
Old 09-03-2012, 05:43 PM
hickny's Avatar
hickny (Peter)
Registered User

hickny is offline
 
Join Date: Jul 2005
Location: Sydney, Australia
Posts: 276
Hi Barry,
I looked at the Stellarium site and found this page...
http://stellarium.svn.sourceforge.ne...scripts/tests/
in this directory is a file called state.ssc. It is supposed to demonstrate how to save the current state. When I run it on my PC the script starts ok but after loading the starchart the script crashes and gives an error message

script error: "ReferenceError: Can't find variable: StelSkyImageMgr" @ line 145

I've looked right through the two .inc files and both appear normal to me so I cannot explain why it doesn't work.

I'm not sure how to declare a variable (text or array etc) within a script to capture the data returned by a call to "get".

Looks like I have to research lots more. Hopefully the .doc you posted will be of use.

The documentation on the Stellarium site is quite technical but I'm not convinced that its adequate. I sent the author an email but have not yet had a reply.

If you manage to learn anymore I'd be happy to learn from you.

Thanks.
Quote:
Originally Posted by Barrykgerdes View Post
Hi Peter
I did a little research on the script language and it is quite comprehensive. I have not tried but if you use "get" where "set" is in the command I think it will extract that data.

Here is the table of commands as far as I have progressed.

Barry
Reply With Quote
  #23  
Old 09-03-2012, 06:17 PM
daggerstab's Avatar
daggerstab
Registered User

daggerstab is offline
 
Join Date: Sep 2011
Location: Bulgaria
Posts: 4
Quote:
Originally Posted by hickny View Post
Hi Barry,
I looked at the Stellarium site and found this page...
http://stellarium.svn.sourceforge.ne...scripts/tests/
in this directory is a file called state.ssc. It is supposed to demonstrate how to save the current state. When I run it on my PC the script starts ok but after loading the starchart the script crashes and gives an error message
The SVN repository at SourceForge is no longer in use and it is available only for archive purposes. The new one is here:
http://bazaar.launchpad.net/~stellar...um/trunk/files
Reply With Quote
  #24  
Old 09-03-2012, 06:24 PM
Barrykgerdes
Registered User

Barrykgerdes is offline
 
Join Date: Feb 2007
Location: Beaumont Hills NSW
Posts: 2,900
Hi Peter

That list is a collection of "commands" that I have extracted from all the scripts that I have collected. Some of them I don't even know what they actually do. However I can probably write a simple shell script to test them one at a time.

I found some commands to be case sensitive
"StelSkyImageMgr" is only part of the command. it needs to know what to do StelSkyImageMgr.showImage("Image",t rue);
Maybe that is the reason.

Barry
Reply With Quote
  #25  
Old 09-03-2012, 07:12 PM
daggerstab's Avatar
daggerstab
Registered User

daggerstab is offline
 
Join Date: Sep 2011
Location: Bulgaria
Posts: 4
Quote:
Originally Posted by Barrykgerdes View Post
I found some commands to be case sensitive
"StelSkyImageMgr" is only part of the command. it needs to know what to do StelSkyImageMgr.showImage("Image",t rue);
Maybe that is the reason.
No, the reason is that the file he has found is out of date, because he took it from the old repository. The StelSkyImageMgr class is called ScreenImageMgr now, so using old scripts with the new code results in an error.
Reply With Quote
  #26  
Old 09-03-2012, 07:40 PM
Barrykgerdes
Registered User

Barrykgerdes is offline
 
Join Date: Feb 2007
Location: Beaumont Hills NSW
Posts: 2,900
Quote:
Originally Posted by daggerstab View Post
No, the reason is that the file he has found is out of date, because he took it from the old repository. The StelSkyImageMgr class is called ScreenImageMgr now, so using old scripts with the new code results in an error.
Thanks Bogdan

I have just been collecting comands from all the scripts to test. I will modify that one. ti try later.

Barry
Reply With Quote
  #27  
Old 10-03-2012, 01:17 AM
hickny's Avatar
hickny (Peter)
Registered User

hickny is offline
 
Join Date: Jul 2005
Location: Sydney, Australia
Posts: 276
Transit of Venus

Attached is a Stellarium Script to demonstrate the Transit of Venus June 6th 2012 from Sydney Australia. It highlights the four contacts. Users from other locations (i.e. not in Sydney) will need to reset their location after the script runs. I have been unable to code correctly the necessary statements to return the user to their pre script location.

Remove the .txt so that you can load the script tov.ssc
Attached Files
File Type: txt tov.ssc.txt (3.4 KB, 6 views)
Reply With Quote
  #28  
Old 10-03-2012, 01:56 AM
daggerstab's Avatar
daggerstab
Registered User

daggerstab is offline
 
Join Date: Sep 2011
Location: Bulgaria
Posts: 4
core.setObserverLocation() can also accept a single string argument for a location in Stellarium's default list (the one in the Location window). So for example, you can use this:

Code:
// Save the current location, if it's from the default list
location = core.getObserverLocation();

// Set the location to Sydney
core.setObserverLocation("Sydney, Australia");
And when you finish:

Code:
core.setObserverLocation(location); //Restore the original location
Reply With Quote
  #29  
Old 10-03-2012, 10:10 AM
hickny's Avatar
hickny (Peter)
Registered User

hickny is offline
 
Join Date: Jul 2005
Location: Sydney, Australia
Posts: 276
Thank you daggerstab.

I knew that somebody would know how to do it.

I'll post an updated script shortly. I have a few ideas for improvement.

Cheers


Quote:
Originally Posted by daggerstab View Post
core.setObserverLocation() can also accept a single string argument for a location in Stellarium's default list (the one in the Location window). So for example, you can use this:

Code:
// Save the current location, if it's from the default list
location = core.getObserverLocation();
 
// Set the location to Sydney
core.setObserverLocation("Sydney, Australia");
And when you finish:

Code:
core.setObserverLocation(location); //Restore the original location
Reply With Quote
  #30  
Old 10-03-2012, 02:13 PM
hickny's Avatar
hickny (Peter)
Registered User

hickny is offline
 
Join Date: Jul 2005
Location: Sydney, Australia
Posts: 276
TOV Final Script

Finally completed what I wanted to do.
Thanks to daggerstab and Barrykgerdes for their input.

Remove the the .txt from the filename.
Attached Files
File Type: txt tov_final.ssc.txt (5.8 KB, 10 views)
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time is now 08:35 AM.

Powered by vBulletin Version 3.8.7 | Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Advertisement
Astrophotography Prize
Advertisement
Bintel
Advertisement