home > observing > sky chart

…continued

How to Link to S&T's Interactive Sky Chart
by Richard Tresch Fienberg

Further Refinements (More Parameters)

Control Panel
Control panel without city, state, country.
If you specify only the latitude and longitude of your observing location, the sky chart opens with the control panel shown at left. You'll see the latitude and longitude, but not the name of the city, state/province (USA/Canada), or country. If you'd like to add these, you'll need to add the following parameters to your link:

  • city = name of city; use %20 for blank spaces (e.g., La%20Paz)

  • state = two-letter abbreviation for state/province (USA/Canada only)

  • country = two-letter abbreviation for country

Adding these parameters to our earlier link for Toledo, Ohio (you wrote them down as shown on the Choose Time Zone screen, didn't you?), results in the following HTML expression:

<a href="http://skychart.skytonight.com/observing/skychart/skychart.asp?
lat=+41.67&lng=-83.57&timezone=-5&dst=on&
city=Toledo&state=OH&country=US&">Tonight's Sky over Toledo, Ohio</a>

Try it! Here's the active hyperlink:

Tonight's Sky over Toledo, Ohio

Control Panel
Control panel with city, state, country.
(Again, the HTML shown above breaks onto multiple lines; make sure your own HTML contains no line breaks or extraneous spaces.) Now when the sky-chart applet launches, its control panel should show not only the latitude and longitude, but also the city, state, and country, as at right. Everything else should be exactly as before.

All-Sky Chart or Selected View

All-Sky View
All-sky view, maximized.
By default, the applet opens with the combined view, showing an all-sky chart on the right of the screen and a naked-eye view of a selected region (denoted by the green box in the all-sky chart) at upper left. By adding more parameters to your link, you can make the sky chart open with either the all-sky chart or the selected view alone:

  • allskyMax = true if you want the all-sky chart alone

  • selectedMax = true if you want the selected view alone

    Selected View
    Selected view, maximized.
    By default, the selected view opens facing due west. You can make it open facing any other direction by specifying two more parameters:

  • caz = azimuth of selected viewing direction, in degrees

  • calt = altitude of selected viewing direction, in degrees

Azimuth is measured around the horizon, from north (0°) to east (90°) to south (180°) to west (270°) and back to north. So, for example, to open the selected view facing toward the southwest, set selectedMax = 225.

Altitude is measured vertically, from straight ahead toward the horizon (0°) to straight overhead toward the zenith (90°). If you omit the calt parameter, the selected view opens in its default mode, which has the horizon at the bottom. To look higher in the sky, try setting calt to some value between 30 and 60.

Open the Sky Chart in a New Window

If you want the sky chart to open in a new browser window — so that your own site will remain open in the original window — just add the standard HTML "target" parameter to your link, naming the new window whatever you'd like (for example, target="new_window").

Putting it all together, here's a text link to open a new browser window showing Sky & Telescope's Interactive Sky Chart for tonight's sky over Toledo, Ohio, showing only the selected view facing southwest and looking halfway from straight ahead to straight up:

<a href="http://skychart.skytonight.com/observing/skychart/skychart.asp?
lat=+41.67&lng=-83.57&timezone=-5&dst=on&city=Toledo&
state=OH&country=US&selectedMax=true&caz=225&calt=45&"
target="new_window">Tonight's Sky over Toledo, Ohio</a>

Try it! Here's the active hyperlink:

Tonight's Sky over Toledo, Ohio, Looking High in the Southwest

The corresponding graphical link looks like this:

<a href="http://skychart.skytonight.com/observing/skychart/skychart.asp?
lat=+41.67&lng=-83.57&timezone=-5&dst=on&city=Toledo&
state=OH&country=US&selectedMax=true&caz=225&calt=45&" target="new_window">
<img src="http://media.skyandtelescope.com/images/smalllogo.gif" width="55" height="40"
border="0" alt="S&T's Interactive Sky Chart"></a>

Here's the real thing:

S&T's Interactive Sky Chart

Pretty neat, huh? If you're really ambitious, you can experiment with still more parameters. Here are a few of particular interest:

  • datetime = date and time at which sky chart opens, in this format: YYYY.MM.DDatHH:MMAP, where YYYY = year, MM = month, DD = day, HH = hour, MM = minute, and AP = AM or PM; if MM, DD, HH, and/or MM are less than 10, use a leading zero

    Example: datetime=2003.09.25at10:45PM& to open the applet showing the sky at 10:45 p.m. on September 25, 2003. Don't forget to include the ampersand (&) at the end.

  • setLocation = true if, rather than setting an observing location yourself, you want the applet to open with the Choose Location dialog box open so that the user can specify his or her own location

    Example: setLocation=true&

    You should omit any parameters you don't need, and if you run into any problems, you should double-check that all the necessary parameters are present, beginning with the four basic ones: latitude (lat), longitude (lng), time-zone offset (timezone), and DST toggle (dst).

    Good luck, have fun, and clear skies!



Sky Publishing, a New Track Media Company
Copyright © 2013 New Track Media. All rights reserved.
Sky & Telescope, Night Sky, and SkyandTelescope.com are registered trademarks of New Track Media