StarChart: Difference between revisions

From OLPC
Jump to navigation Jump to search
Line 245: Line 245:


== Advanced features and tricks ==
== Advanced features and tricks ==
=== Customize it ===
<p>
<p>
Here are some customizations you can make if you are comfortable using the Terminal, can find your way around the linux file-system and can use one of the pre-installed linux text editor programs.
Here are some changes you can make if you are comfortable using the Terminal, can find your way around the linux file-system and can use one of the pre-installed text editor programs.
</p>
</p>
<b>Set your longitude and latitude as the default location</b>
<p>
<p>
<b>Set your longitude and latitude as the default location</b>
<br>
Instead of simply setting your location and keeping that instance of the activity, you could edit the file which specifies the default coordinates for the location. This will make your home location the default longitude and latitude for all future StarChart instances.
Instead of simply setting your location and keeping that instance of the activity, you could edit the file which specifies the default coordinates for the location. This will make your home location the default longitude and latitude for all future StarChart instances.
</p>
</p>
Line 277: Line 279:
</p>
</p>
<p>
<p>
The first number is the longitude of the place you are traveling to. The second number is the latitude of the place you are traveling to. The third number is the number of hours different between your home time-zone and the time-zone of the place you are traveling to. Again, be careful not to mess up the punctuation marks or this file will be rejected and your home location and time-zone offset will be used instead.
The first number is the longitude of the place you are traveling to. The second number is the latitude of the place you are traveling to. The third number is the number of hours <em>different</em> between your home time-zone and the time-zone of the place you are traveling to. Again, be careful not to mess up the punctuation marks or this file will be rejected and your home location and time-zone offset will be used instead.
</p>
</p>
<br>
<br>
<p>
<p>
When you return home, simply delete the travel.py file and StarChart will go back to its usual default location and time-zone offset.
And here are some tricks to make using StarChart easier:
</p>
=== Tips ===
<p>
And here are some tips that will make using StarChart easier:
</p>
</p>
* Use Alt+Enter to switch to full-screen mode after you have set up "What", "Where" and "When". This will hide the menus and make the chart somewhat larger. It's especially helpful when you want to use the Night Vision color scheme as the menus are still being drawn in the white-on-black default colors.
* Use Alt+Enter to switch to full-screen mode after you have set up "What", "Where" and "When". This will hide the menus and make the chart somewhat larger. It's especially helpful when you want to use the Night Vision color scheme as the menus are still being drawn in the white-on-black default colors.

Revision as of 18:15, 3 October 2008

Stars icon.svg
Translate-icon-55px.svg Localization
.POT file NEEDED



Whole Sky Star Chart Activity

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, the "classical" 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.

StarChartActivity


Preface

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.

Disclaimer: there will be bugs
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 711, though I received a report that it works fine on the 8.2.0 release candidate joyride. Please see the bug tracking page for the list of known bugs or to report a bug.

Introduction

StarChart was created by a professional programmer and amateur astronomer who likes to vacation in places far removed from his home location and appreciates the opportunity to view the sky from these places. The XO is a wonderful travel accessory for supporting this sort of thing since it is light, compact and frugal of battery power while providing a reasonably large, reasonably high resolution color display.

This Activity is intended to support the star-gazer who has no instrument better than his own eyes. It can be used as a guide to the sky overhead, as a tool for planning future observations (including observations from a different location) or as a way to reprise the look of the sky as it was at some time in the past.

The current version of this activity is Beta-5, which can be confirmed by the string "0.54, released 2008/09/24,22:10 UT" in a comment near the start of the StarChart.py source file. See the change log page for revision history.

Before you begin

Be sure your XO has been set to the correct time-zone offset and the correct local time! 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 plan to always use "specify time". But it's still an untidy way to operate your computer.)

Installation and set-up

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.

Once you have installed StarChart, start it and select the "When" menu tab.

StarChartActivity -- Time


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 not, stop the activity and correct your time and time-zone using the procedure explained in 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 before proceeding.

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.

How to read the plot

Stars are drawn (with default settings of the "What" menu tab controls) as white dots of different sizes. The brightest stars are drawn as the biggest dots; the dimmest stars are drawn as the smallest dots.

The constellations are drawn as white lines forming the stick-figures defined by the International Astronomical Union.

The sun, moon and "classical" planets are drawn as their astrological symbols and plotted much larger than they actually appear. (I need to provide a picture that identifies each of these symbols.)

Deep sky objects are plotted as areas of gray, with different "decorations", depending on the type of the object.

  1. A diffuse nebula (such as the one in Orion) is plotted as a gray rectangle.
  2. A galaxy is plotted as a gray ellipse or circle with a white border.
  3. A planetary nebula is plotted as a gray circle with a central white dot.
  4. An open cluster is plotted as a gray circle with no border.
  5. A globular cluster is plotted as a gray circle with a white border and a central dot.

All deep-sky objects are drawn larger (often much larger) than they actually are. Also, though the ellipse representing a galaxy is roughly the correct eccentricity, the orientation of the ellipse on the chart is arbitrary and does not reflect the galaxy's actual position angle.

Operating instructions

The initial display for StarChart will show the sky for your locale and the current time. (This assumes you have done the steps described above in "Installation and set-up".)

StarChart



Note that there are four menu tabs: "Activity", "What", "Where" and "When". "Activity" is pretty much the same as any other activity's "Activity" tab except that StarChart does not yet support collaboration so the "Share" control is missing. Let's look at each of the other tabs in order...

The "What" menu controls


"What": Set display options



"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. Let's walk through each option and see what it does to the appearance of the map.

Night Vision ON



The "Night Vision" option makes the activity's display mostly red on black. Red light doesn't affect your night vision so using this mode lets your eyes read the map and still remain sensitive enough to see the dim stars. Hint: it also helps to set the brightness of the back-light as low as you can and still read the chart to minimize the effect on your night vision.

But sometimes you will find it easier to work with a chart that's black on white like a page in a book. This mode is not good for use at night but it's fine in a classroom or in daylight. To get a black chart on a white background, set "Invert Display".

Invert Display ON



Normally, StarChart shows its map with east on the left. This may seem odd to you because a terrestrial map would show east on the right. But if you face east and hold the map so that east is near the ground, you'll discover that with a terrestrial map, north on the map is now to your south! With StarChart's mirrored map, north is north and south is south when east is down. That means what you see on your XO's screen will match what you see in the sky.

But if you find it confusing to have east on the left and west on the right, you can set "Flip L/R" and get the map to be like a terrestrial map.

Flip L/R ON



Stars are grouped in imaginary figures called constellations. These represented everyday objects, gods and goddesses, mythical and real animals and other patterns that people saw in the sky. Since drawing detailed pictures would make the chart too confusing, astronomers usually draw simple stick-figures. StarChart normally plots these standard figures. But you can turn that off and just see the stars themselves if you want -- after all, there are no lines drawn in the sky!

Plot Constellations OFF



Stars come in different brightnesses. Astronomers call these levels of brightness "magnitudes". The brightest stars are magnitude zero (well, in a couple of cases, brighter than that); the dimmest stars that you can see without a telescope or binoculars on a really dark night will be about magnitude 6.

There are a lot more dim stars than bright ones. So if StarChart always plotted all the stars you could see, there would be so many (over 1,000!) that it would be hard for you to read the map. So there's a control (actually seven of them) that lets you select how dim the stars the activity should bother to plot. StarChart defaults to plotting stars of magnitude 4 or brighter. This is a good compromise between having not enough stars to appreciate what the sky looks like and having so many that it's confusing. This brightness is about what you would see on an average night in suburban locations.

Here is what the plot looks like when you have asked for only the brightest of the stars. This is what the sky might look like from the middle of a large city.

Magnitude Zero Stars



And this is what the sky might look like from a mountain a long way from cities or towns on a moonless night.

All the Stars You could See



The "Where" meun tab controls

This is the menu tab that lets you tell StarChart from what place on earth you would like to see the sky plotted. Usually, this would be where you are, but sometimes you might want to see what the sky looks like to someone living elsewhere.

"Where": Set location



A location on earth is specified by longitude and latitude. Longitudes go from zero to 180 degrees east or from zero to 180 degrees west. Latitudes go from zero to 90 degrees north or zero to 90 degrees south.

The StarChart activity will accept an angle as a number of degrees, including fractional degrees (like "123.45") or an angle as degrees, minutes and seconds. In this second type of angle, you must use a form like "123d27m33s". Enter longitude (be sure to select east or west) and latitude (be sure to select north or south) and click on the "Apply location" button. If the new location is substantially distant from the old, the star map will look very different.

Change location to Hawaii




The "When" menu tab controls

These controls let you specify the time for which you want the chart plotted.

"When": change time and time-zone offset


Normally, "Now" is selected and the current year, month, day, hour and minute and the number of hours that your time-zone differes from GMT by is shown in the time and offset fields. Additionally, the time field will automatically be updated to track the current local time and the plot will automatically be recomputed once a minute. In this mode, the plot will match the current sky and will move over time the way the sky does. But you can also use these controls to specify that you want a chart for a particular time in the future or past.

Note: Due to a software bug (#15 -see the bug tracking page), using this menu is presently a bit complicated. If you want to specify a particular time (and/or change the time-zone offset), you must first perform two actions:

  1. select "Specify Time".
  2. click "Apply Time".

This stops the display from automatically being updated. Otherwise the program will "argue" with you over what is in the time and zone offset text fields. Sorry about that.

Click the "Specify time" radio button, since "Now" isn't what you want anymore. Now specify the new time, beginning with the year. 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. Next, if your location observes daylight time, you may need to add or subtract an hour from the time-zone offset value if the time you entered is on the "other side of the daylight time boundary". Finally, click "Apply Time" to get the new plot.

set a new time



Another time you have to use the "When" controls is to get a valid map for another place expressed in that place's local time. When you specify some place at a different longitude from your home location, you often will also need to know that place's time zone offset and set that 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.

set Hawaii time and zone offset



Error messages

StarChart will detect errors if you make a mistake when specifying a location on the "Where" tab or a time on the "When" tab. If you enter something in the longitude or latitude that StarChart doesn't understand and click the "Apply Location" button, StarChart will display a message:

Location input error


StarChart will restore the longitude and latitude settings to the last good values. You may try again or simply click "Apply Location" again to confirm that you want to keep the good settings after all.

StarChart will also detect errors with the time and time-zone offset settings. But due to bugs #13 and #14 (see the bug tracking page for details), StarChart will just silently reset the time to the current time and the time-zone offset to the offset value for your local time-zone and go into "Now" mode, updating the plot (and time display) once a minute.

Advanced features and tricks

Customize it

Here are some changes you can make if you are comfortable using the Terminal, can find your way around the linux file-system and can use one of the pre-installed text editor programs.

Set your longitude and latitude as the default location
Instead of simply setting your location and keeping that instance of the activity, you could edit the file which specifies the default coordinates for the location. This will make your home location the default longitude and latitude for all future StarChart instances.

To do this, 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.

Prevent the plotting of the deep sky objects
If you find that having deep sky objects plotted is unnecessary for your purposes, you may disable this feature. Simply rename the file dso1.py in the StarChart directory to something else (e.g.: dso1.bak). To restore the functionality, simply name the file back to dso1.py and start the activity again.

For the traveler
You may temporarilly override observatory location and time-zone offset by creating a file named travel.py in the StarChart directory. This file should contain one line of Python similar to this:

data = [-123.45, -67.89, +14.5]

The first number is the longitude of the place you are traveling to. The second number is the latitude of the place you are traveling to. The third number is the number of hours different between your home time-zone and the time-zone of the place you are traveling to. Again, be careful not to mess up the punctuation marks or this file will be rejected and your home location and time-zone offset will be used instead.

When you return home, simply delete the travel.py file and StarChart will go back to its usual default location and time-zone offset.

Tips

And here are some tips that will make using StarChart easier:

  • Use Alt+Enter to switch to full-screen mode after you have set up "What", "Where" and "When". This will hide the menus and make the chart somewhat larger. It's especially helpful when you want to use the Night Vision color scheme as the menus are still being drawn in the white-on-black default colors.

Revision history

Plese see the change-log page.

Reporting bugs

To report a bug or to see what bugs have been reported and/or fixed, please go to the bug tracking page.


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-5.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-5.xo
Last tested version number: Activity version::5
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


URL from which to download the last .xo bundle that works with old releases Activity bundle::http://www.wa1gsf.net/downloads/XO/StarChart-4.xo
Activity 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