StarChart

From OLPC
Revision as of 13:32, 8 August 2008 by Davewa (talk | contribs) (Undo revision 151176 by Davewa (Talk))
Jump to: navigation, search
Stars icon.svg
Translate-icon-55px.svg Localization
.POT file NEEDED



Whole Sky Star Chart Activity

Call for Suggestions

Now that I almost have a working program, I'm interested in suggestions as to what it will take, both in additional programming and in creating documentation to use it (e.g.: suggested lesson plans), to make this a world-class tool for teaching astronomy.

Help me take this activity to the next level! Please add comments on the "discussion" page associated with this article.


Where's the Source Code?

This activity is coded entirely in Python. Therefore, the source for the activity is distributed as part of the .XO file and can (with any tool that understands the compressed format of .XO files, e.g.: WinZip for the PC) be extracted directly from the bundle.


Description

Current version: 0.40, released 2008/07/18,13:30 UT

This activity will display a map of the sky showing the position of the visible stars, some of the larger and brighter deep-sky objects, planets, the sun and the moon. You may specify a location (longitude and latitude) and the time (including time zone offset from GMT) that you wish to have a plot for. Alternatively, you can get a plot which is updated once a minute showing the current sky. By editing a file (see below) in the activity's directory, you can set StarChart's default location for your own latitude and longitude.

Be sure your XO reports the correct time zone offset and the correct local time (the display will default to this)! The astronomical algorithms need to compute GMT (UT) and can't do that if "now" isn't the right time. This is only an issue if you don't use "specify time".

Additional options:

  • Select the brightness of the stars being plotted (mag = 0 to mag = 6);
  • Select whether or not to draw the IAU constellation figures;
  • Choose whether the plot has East on the left (default) or right;
  • Choose whether the stars plot as black or bright (default);
  • Set "night vision", which makes the bright color red instead of white(default);
  • Temporarilly change the location of the observer for the plot;
  • Temporarilly change the timestamp (and zone offset, if desired) for the plot

This is a beta release. It functions but does not have all the intended features and contains several cosmetic bugs. I have not tested this activity on builds newer than 703.


Installation

For best results, remove any previous version of StarChart you may have installed. Re-start X (hit Ctrl-Alt-Backspace). Then, simply follow the usual procedure for downloading and installing an Extra Activity.


Operating Instructions

First, you need to be SURE your XO knows the correct local time and is set to the correct time zone. To check this, simply start the StarChart activity. Click on "when" and look at the time and zone offset display. Is the time (YYYY/MM/DD,HH:MM) the correct year, month, day, hour and minute for your location (it's 24-hour time -- 1:00 PM is 13:00 in that system)? Is the zone offset showing the correct hours and minutes that your locale is offset from GMT? (Hint: Eastern Standard Time in the USA is "-5:00" with respect to GMT.)

If these values aren't right, you'll need to set your XO to the right timezone and set the date and time. See http://wiki.laptop.org/go/Support_FAQ#How_to_set_the_timezone_on_my_laptop and http://wiki.laptop.org/go/Support_FAQ#How_do_I_set_the_date_and_time_on_my_laptop.3F for instructions on how to do this.

If the time and date are correct, the chart will be displaying the sky for a location in Massachusetts, USA as of right now. If you don't happen to be in that location, you will need to enter your longitude and latitude. Click on "where" to display the controls for doing this. You should be able to get your coordinates from any good map, Google Earth or simply use the published coordinates for any relatively nearby city or town. Another possibility is from a site on the internet such as http://www.mapquest.com/atlas which provides a map with latitude and longitude information from which you can interpolate your specific coordinates.

Don't be obsessive about the precision for this: the star chart will not look noticibly different if you are wrong by one or two degrees either way in latitude or longitude. Being off 100 km won't make enough of a difference to show. But be sure you select East or West longitude and North or South latitude! Then click "Apply Location" so the program knows you really want to change these settings.

Now I'd recommend clicking "activity" and using the "Keep" button. And now whenever you want a chart for where you are and for the current time, just resume from the Journal.

Other things you can do:

"What" lets you change the color combinations of the map and decide how many stars you want to see and if you want the constellation figures. These settings get saved, too. So if you prefer black stars on white sky you can get that combination.

You can use "when" to get a map for some time in the future or past (don't forget to change the timezone offset if that date is/isn't daylight time). Begin by clicking the "Specify time" radio button, since "Now" isn't what you want anymore. And don't forget to click "Apply Time" when done. Time is entered as a four-digit year, a two-digit month and a two-digit day, separated by slash (/) characters, a comma (,) and then the hour and minute in 24-hour time separated by a colon (:). Example: 2008/02/20,22:00 would be 10 PM on the 20th of February, 2008.

You can also use "where" to get a map for another place. But to get a valid map for another place and that place's local time, you need to know that place's time zone offset as well. For example, to get a star chart for 8 PM on March 15th, 2008 for Hawaii, you would need to enter "156 degrees W longitude and 21 degrees N latitude" using the "where" tools and ALSO enter "Specify time; 2008/03/15,20:00; -10:00" using the "when" tools.

Advanced Features and Tricks

If you want to set your own latitude and longitude as the default location for your plots, edit the "observatory.py" file in the StarChart directory. This file presently contains one line of Python:

data = [-71.4, 42.6]

The first number represents longitude in degrees (negative for west; positive for east); the second number represents latitude in degrees (negative for south; positive for north). Change these numbers to correspond to your geographic coordinates. Be careful not to disturb the punctuation -- if StarChart reports your location as 0 longitude; 0 latitude (and you're not on a ship in the Atlantic), you probably messed up the data statement.


Revision History

NEW FEATURES ADDED IN VERSION 0.40:

D. About half of the Messier Catalog's deep-sky objects will be plotted. The program plots these objects somewhat larger than they would actually appear (with the smallest objects magnified the most). Each class of object is plotted with a distinctive pattern of shading, but the easiest thing to do is just remember that if it doesn't look like a star or a planet symbol then it's a deep-sky object of some kind. And that you'll probably need binoculars to see it.

E. The code has been reorganized such that the observer's coordinates, the star catalog, the Messier catalog and the constellation figures data have all been broken out into separate files. In addition to making program maintenence easier, this provides opportunities for an ambitious user to (a) add stars to the catalog; (b) include non-Messier deep-sky objects; (c) redefine the constellation figures; or (e) change the default observation location (as explained in "ADVANCED FEATURES", above).

F. Finally, there is one additional feature which can be activated by creating a file that currently does not exist when the activity is installed. I leave this feature as an "easter egg" for anybody who wishes to explore the code to discover. I'll give you one clue: the missing file is called "travel.py" and contains a data definition consisting of an array of three numbers.

NEW BUGS INTRODUCED IN THIS VERSION:

none known.

BUGS FIXED FROM PREVIOUS VERSION:

none.


NEW FEATURES ADDED IN VERSION 0.33:

C. The chart is now labeled with the cardinal directions.

NEW BUGS INTRODUCED IN THIS VERSION:

none known.

KNOWN BUGS FROM PREVIOUS VERSIONS REMAINING IN THIS ONE:

1. The text color on the toolbar buttons and labels is uncontrolled. (I don't understand PyGtk very well.)

work-around: after setting up the options, use Alt-Enter to hide the toolbar.

5. There is NO support for internationalization. All strings are hard-coded and time values are using US_eng separators (though the timestamp is specified yyyy/mm/dd rather than the natural order).

8. Rotating the screen causes the controls in the toolbars to be truncated/overlapped. (The map displays properly, though.)

9. Due to limitations of the algorithms, the accuracy suffers if you attempt to plot a chart for a timestamp more than +/- 50 years of the year 2000.

Note: the inaccuracy is greatest for the position of the moon, less for the planets and hardly detectable for the stars.

11. The "Share" option on the activity toolbar does not function and is therefore presently hidden.

BUGS FIXED FROM PREVIOUS VERSION:

3. The program will not complain (but will also mess up) if you make typos in coordinate or time fields.

The program will now display a message in the style of "xxx was not understood" and revert to the previous entry if you make typos in coordinate or time fields.

10. Even though you have selected "specify" for the time (and therefore the plot will be for the specified time), the update timer runs and causes the plot to be recomputed once per minute. This is a waste of system resources.

Now, when you select "specify time", the chart is not recomputed.


NEW FEATURES ADDED IN VERSION 0.27:

A. Latitude and longitude can now be specified as degree-and-fraction as well as degree/minute/seconds.

B. The controls which specify display options, position and time are now organized into tabbed menus ("Activity", "What", "Where" and "When"), more like other Sugar Applications.

NEW BUGS INTRODUCED IN THIS VERSION:

11. The "Share" option on the activity toolbar does not function and is therefore presently hidden.

KNOWN BUGS FROM PREVIOUS VERSIONS REMAINING IN THIS ONE:

1. The text color on the toolbar buttons and labels is uncontrolled. (I don't understand PyGtk very well.)

3. The program will not complain (but will also mess up) if you make typos in coordinate or time fields.

5. There is NO support for internationalization. All strings are hard-coded and time values are using US_eng separators (though the timestamp is specified yyyy/mm/dd rather than the natural order).

8. Rotating the screen causes the controls in the toolbars to be truncated/overlapped. (The map displays properly, though.)

9. Due to limitations of the algorithms, the accuracy suffers if you attempt to plot a chart for a timestamp more than +/- 50 years of the year 2000.

10. Even though you have selected "specify" for the time (and therefore the plot will be for the specified time), the update timer runs and causes the plot to be recomputed once per minute. This is a waste of system resources.

BUGS FIXED FROM PREVIOUS VERSION:

2. The default latitude and longitude are hard-coded into the program.

Given that you can now save and restore the position data between sessions, this is no longer a problem. You need simply enter your desired coordinates and then save the session. Next time, resume the session from the Journal to continue using the saved coordinates.

4. The chart defaults to E on the left but the "flip l/r" button is not checked.

I decided this is not a bug -- E on left is "normal" for a star chart.

6. The program icon is very bland.

Not anymore. (Thanks, Aunti Mame!)

7. Display preferences, position, time and offset settings are not saved.

Now they are.


Activity Summary

Icon: Sugar icon::Image:Stars_icon.svg
Genre: Activity genre::Math and Science
Activity group: ,|x|Activity group::x}}
Short description: Short description::Whole Sky Star Chart Activity
Description: Description::This activity will display a plot of the stars, planets and some deep-sky objects which are visible for a specified location on Earth at a specified time.
Maintainers: ,|x|Contact person::x}}
Repository URL: Source code::http://www.wa1gsf.net/downloads/XO/StarChart-4.xo
Available languages: ,|x|Available languages::x}}
Available languages (codes): ,|x|Language code::x}}
Pootle URL:
Related projects: Related projects,|x|Related projects::x}}
Contributors: ,|x|Team member::x}}
URL from which to download the latest .xo bundle Activity bundle::http://www.wa1gsf.net/downloads/XO/StarChart-4.xo
Last tested version number: Activity version::4
The releases with which this version of the activity has been tested. ,|x|Software release::x}}
Development status: Devel status::4. Beta
Ready for testing (development has progressed to the point where testers should try it out): ,|x|Ready for testing::x}}
smoke tested :
test plan available :
test plan executed :
developer response to testing :


URL from which to download the last .xo bundle that works with old releases Activity bundle::http://www.wa1gsf.net/downloads/XO/StarChart-3.xo
Activity version number: Activity version::3
The releases with which this version of the activity has been tested. ,|x|Software release::x}}
Development status: Devel status::4. Beta