Tinyac: A Tiny Almanac Program for Windows

Introduction

Tinyac ("tiny almanac") is a small (124 k .exe + 28 k DLL) Windows program for computing the positions of the Sun, Moon, planets, and stars. It will duplicate the precise planetary and stellar reduction examples in The Astronomical Almanac to full accuracy. Program output is purely numeric; there are no graphics. The download is free and no registration is required.

The program (more precisely, a DLL on which it depends) is not compatible with Windows 8. See the bugs section on my SofaJpl DLL page for an explanation.

For high accuracy solar system body positions, Tinyac can use the Jet Propulsion Laboratory ephemerides (e.g., DE405). I don't include any files in the Tinyac installation package, but they may be downloaded for free from JPL. In addition, the IAU SOFA PLAN94 (planets) and EPV00 (Earth and Sun) almanacs are built into the program. They're less accurate than the JPL ephemerides but more convenient.

There's no built-in star catalog in this release. You have to manually input the catalog data: right ascension, declination, proper motions, parallax, and radial velocity. These data are available on the Internet. For example, the entire Hipparcos catalog is online at their Web site.

Tinyac has a comprehensive set of coordinate output options. You can select place, origin, frame, and angle format. To the greatest possible extent, these parameters are independently selectable. For example, there's no mathematical reason why a geocentric origin can't be combined with a frame oriented to the observer's horizontal, so it's allowed.

Time input is also flexible. Tinyac accepts Julian or Gregorian calendar date and time, Julian date, Besselian year, and Julian year. The time scale may be UTC, UT1, TT, Greenwich apparent time, local apparent time, or local mean time. You can manually input ∆T (or ∆UT for UTC). In addition, an "auto ∆T" feature interpolates an internal table of ∆T from 1620 to 2010.

Program Operation

Main Window

main window at startup

Here is the main window at program startup. There's no menu bar; everything is done with text boxes, buttons, and dialog boxes, interlocked to prevent illegal operations. For example, the OK button is disabled at startup because you haven't made any settings yet. In general, the controls should be visited in top to bottom, left to right order. So we'll click the Planet button first.

Solar System Body Selection

planet selection dialog

By default, the internal SOFA ephemeris is selected since it doesn't require any file to be loaded. To open a JPL ephemeris (it must be a binary ephemeris; more on that later), click the File button.

The set of bodies in the drop-down list depends on the ephemeris. The SOFA ephemeris doesn't have the Moon or Pluto. With either ephemeris the Sun is the default body.

Another dialog box appears when you click the JPL File Tools button:

JPL File Tools

JPL tools dialog

Converting ASCII to binary is the most important function. The binary ephemerides online at the FTP site are incompatible with the JPL routines in Windows. However, the ephemerides are available in ASCII format too. If you download an ASCII ephemeris and convert it to binary on a Windows system, there's no problem.

Suppose you need the DE406 ephemeris segment that spans 2000 to 2099. At the JPL ephemeris FTP site download ascp2000.406 and header.406. (The header contains data common to all DE406 ephemerides.) In the above dialog box, use the buttons to set the filenames of the header, ASCII ephemeris, and output file, then click OK.

In addition to converting from ASCII to binary, there are two other functions. Concatenation combines two binaries into a third file, leaving the input files unchanged. For example, suppose you have DE406 binaries for 1900 - 1999 and 2000 - 2099. These can be concatenated into one file for 1900 - 2099. Of course there must not be a time gap between the input files, but a time overlap is OK.

Finally, another function generates a "time slice": a binary with a shorter time span than the input file. (The input file itself does not change). For example, from a 1900 - 2099 binary, you could create one for 1950 - 2050.

Star Data Entry

star data dialog box

Here you enter the catalog coordinates for a star. You cannot open this dialog box until you OK out of the planet dialog box, because star computations use the planetary ephemeris. (Earth position affects parallax, Earth velocity affects aberration, and Sun position affects the gravitational deflection of light.) In addition, the boxes for entering data are disabled until you visit the Coord Frame dialog box. With that dialog and the Coord Epoch dialog you inform Tinyac of the reference frame of the coordinates, their epoch (the time when the star was at the coordinates), and unit of measure. For example, the Hipparcos catalog uses the ICRS coordinate frame, the coordinate epoch is J1991.25, and right ascension is in degrees, not hours. The frame and epoch dialog boxes give you the flexibility to set up that configuration. (All the text boxes accept decimal values, so to enter decimal degrees, put the entire coordinate in the degrees box and put zero in the minutes and seconds boxes.)

The Coord Frame and Coord Epoch defaults are set up for the conventions of the CDS SIMBAD online database: epoch 2000.0, ICRS frame, and right ascension in hours. But even if no changes are necessary, you must always visit those dialog boxes and click OK. Until you do, the star data OK button is disabled as shown in the picture.

The two proper motion check boxes need to be explained. Sometimes right ascension proper motion is expressed in coordinate units, i.e., proper motions tend to be greater for stars near the poles. In other cases, great circle units are used. In addition, the unit of measure may be milliarcseconds (mas) or milliseconds of time. For example, the stellar reduction example in the 2006 Almanac uses milliseconds of time and coordinate units. But the 2009 example uses mas and great circle units.

Back in the main window, the Obs button leads to the dialog for entering the observer's position.

Observer Position

observer position dialog

The text boxes for latitude and longitude are oversized to accept all coordinate formats. For example, to enter decimal degrees, enter the entire value in the degrees box and put zeros in the minutes and second boxes. Don't leave unused boxes blank; the program will exit with an error message.

Air temperature and pressure affect refraction. You can enter values, or use ICAO standard atmosphere defaults. In the latter case, temperature depends on altitude. The displayed value doesn't update while the dialog box is displayed, but if you OK out of the dialog then re-enter it, the text box will show the computed temperature.

Pressure at the observer is a function of altitude and altimeter setting. The latter is the so-called "barometric pressure" in weather reports, at least in the U.S. If you manually input a value, do not enter the sea level pressure ("SLP") from an aviation METAR report. It's computed differently from altimeter setting, and is not what the program expects.

The value in the height above ellipsoid box is interpreted as exactly that for purposes of computing parallax. But for computing the atmospheric pressure at the observer, it's assumed to be the geopotential height above the geoid (sea level). You could adjust altimeter setting to compensate for the discrepancy with this formula:

P = P0 * (1 + h * .00011856)

where P = corrected altimeter setting, P0 = actual altimeter setting (inches Hg or millibars), and h = height of geoid above ellipsoid (meters). For example, altimeter setting is 29.90 inches and geoid height with respect to the ellipsoid is -70 meters. Then the corrected altimeter setting from the formula is 29.65 inches. Enter that value instead of the actual altimeter setting. However, unless extreme accuracy is necessary, it's sufficient to simply enter height above sea level and actual altimeter setting.

The inputs for deflection of the vertical have no effect unless you request output in the horizontal coordinate reference system.

Date and Time

time dialog

The dialog above appears when you click the Time button in the main window. You can enter time as a Gregorian or Julian calendar date and time, a Julian date, Besselian year (e.g., B1950.0), or Julian year. Six different time scales are available, but some may be disabled if the necessary data haven't been supplied yet. In this case, UTC is disabled because a leap second file isn't open, but local apparent time and local mean time are enabled because we OKed out of the observer position dialog. The apparent time buttons (Greenwich and local) are disabled until you OK out of the solar system body dialog box (it doesn't matter which body is selected), since apparent time depends on the ephemeris.

Selecting a time scale can also disable some entry formats. The B and J buttons are disabled unless you select TT, and the JD button is disabled if you select either form of local time. In general, the program attempts to interlock the buttons to prevent you from making an illegal selection, even momentarily.

When UTC is the time scale, the ∆UT box is enabled. This lets you enter UT1-UTC, which is always between -1 and +1 second. (It tends to slowly decrease until a leap second occurs, at which time it abruptly increases by exactly one second.) For all other time scales, the program needs ∆T (TT-UT1).

For your convenience, Tinyac has an internal table with the annual ∆T values listed in The Astronomical Almanac. This table runs from the beginning of 1620 to the end of 2010. If you select auto ∆T, a value is interpolated from the table. To view the actual value used, OK out of the time dialog and re-enter it. Unfortunately, the automatic delta T feature fails beyond 2010. The table is embedded in the program and cannot be updated by the user. This inconvenience is one clue that Tinyac was originally a prototype and not intended for public release.

To use UTC you must open a leap second table. It's just a text file, easy to update by hand when a leap second occurs. A copy is in the same directory as the Tinyac executable, and the Leap Second File button looks for it by default. The combination of UTC and Julian calendar is perfectly legal and will cause no trouble with the timing of the step adjustments.

If the year is zero or negative, Tinyac ignores the BC check box and interprets the year as 0 = 1 BC, -1 = 2 BC, etc. In accordance with astronomical practice, Tinyac doesn't restrict the day of month to the normal range, e.g., Jan -1 = Dec 30 of the previous year. The range of the calendar algorithms (Gregorian and Julian) exceeds 5 million BC to 5 million AD.

The local apparent time (LAT) scale in Tinyac is simply Greenwich apparent time (GAT) plus an offset for the observer's longitude. Both GAT and LAT are based on the geoocentric apparent place of the Sun on the celestial sphere, relative to the geodetic meridian on the same sphere.

Polar motion values correct for the fact that Earth's rotation axis doesn't coincide with the geodetic north and south poles. The discrepancy is a few tenths of an arc second and varies slowly, the main period being somewhat more than a year. The values entered here have an effect only if you request the topocentric or geographic (geodetic latitude and longitude) coordinates of the body, or if the GAT or LAT time scale is selected.

Coordinate Reference System

coordinate reference system dialog

These are the options for Tinyac's output. In theory, three "place" buttons and four "origin" buttons have 12 possible combinations. In practice, selecting heliocentric or barycentric origin restricts you to geometric place (see the picture), so there are eight possible combinations. Each of these may have any of 12 different coordinate frame orientations:

The J2000.0 and ICRS frames are fixed, but the others vary with time. The default is the "of date" orientation: the orientation at the time of the body's position. However, the "other" button lets you orient the frame to an arbitrary time, controlled by the Set button.

A second dialog box has additional options. Open it with the Coord Sense button.

Coordinate Sense

coordinate sense dialog

For every coordinate reference system you have several options:

Tinyac tries to automatically make reasonable settings in this dialog box. For example, if you select an equatorial frame, the default theta sense is RA/lon.

Other Controls

main window with results

Back at the main window, here are results of a sample computation. Calendar date and time are displayed in the ISO format. The G prefix means the Gregorian calendar is in effect. The refract check box is disabled because the coordinate origin is geocentric. For topocentric origins you have the option to apply refraction to all coordinate frames, not just the horizontal.

The accuracy setting (.1 arc second here) affects several aspects of the program, including computation of the equation of time (if an apparent time scale is selected), light time, and refraction. These are all iterative, and adjust automatically to deliver the requested accuracy. So do the angle and time displays. For example, note that time (including right ascension) is displayed to a precision compatible with the angular accuracy. At low accuracy, the displayed rounded-off time can be noticeably different from what you entered, and the rounding increment may be puzzling unless you understand that Tinyac is attempting to use an increment equivalent to the angular accuracy.

Installation

The current Tinyac version is 1.0.1.0. Previous versions had a subtle difference in the implementation of the local apparent time scale. It was intentionally based on the topocentric apparent place of the Sun. But on further thought I believe geocentric apparent place should be the basis for local apparent time. It's consistent with LAT obtained by celestial observation, since normal practice is to correct for parallax in altitude.

Everything you need to run Tinyac is free:

1. Install Microsoft's .NET Framework version 2.0 or higher. This is by far the largest item. With a low speed connection, it would be wise to do the download when you won't need to do anything else on the Internet for a couple hours. As far as I know (but I don't have the latest version), the .NET Framework leaves no obvious signs of its presence, such as icons or Start menu items, so you may already have it. Go to Control Panel, Add or Remove Programs, and check the list.

2. Install my SofaJpl DLL for the .NET Framework.

3. Download Tinyac Setup.msi (512 k). When launched, it automatically installs Tinyac and its documentation (this file). By default, SofaJpl and Tinyac install into Program Files\HirosePS, directories SofaJpl and Tinyac 1.0.1.0 respectively. There will be a Start menu shortcut in Programs, HirosePS, but no shortcut on your desktop.

A clean uninstall of all components is easy via the Windows Control Panel. To prevent error messages, uninstall them in reverse order, because #3 is dependent on #2, and #2 on #1.

Bugs

Notes

Time Input

Solar System Ephemerides

Stars

Coordinate Conversion

To convert coordinates from one reference frame to another, enter the input coordinates as if they were a star, then request the position of the "star" in the desired output frame. For example, at 2009 Jan 1 08:20:47 UT1, from 30°S 60°W, a body is observed at azimuth 147°20'50", altitude 43°19'29". What is its celestial intermediate right ascension and declination?

Usually the most convenient sequence is to click the Tinyac main window buttons from top to bottom and left to right. But in this case we visited the observer position and time dialog boxes first. Otherwise, it would have been impossible to select the horizontal frame of date for the star coordinates. The button would have been disabled.

Remember, the "star" you create is handled like a real star. That means aberration is applied if you request apparent coordinates in the output.

The rectangular format for star coordinate input is intended strictly for coordinate conversion. The proper motion, parallax, and radial velocity boxes are disabled and zero is used for these values.

Accuracy

I checked Tinyac against some values from the 2009 Astronomical Almanac:

In addition, I checked the positions of the Moon and a star with the USNO MICA program in these reference systems:

In every test Tinyac was correct, plus or minus one digit in the least significant place of the Almanac or MICA data.

When you change the contents of the accuracy box, Tinyac does not see the change until that box loses the Windows "focus". For example, if you change the value, then press Enter without moving the cursor from the accuracy text box, results are displayed with the old accuracy. This happens because focus (indicated by the blinking vertical line) is still on the accuracy box. On the other hand, when you change the accuracy, then click OK, that changes the focus to the OK button, so the new accuracy is used.

When apparent or astrometric place is selected, the distance to a solar system body may not have the same accuracy as the direction. This is true for both angular and rectangular coordinates. The reason is that light time is computed iteratively, stopping when the direction to the body has converged to the desired accuracy. I now believe it's best to continue until convergence of the 3-dimensional position. Nevertheless, distances in the examples in the 2006 and 2009 Almanac are computed correctly to the last digit. Although I'm unable to provide an example, I still believe the distance computation does not quite match the performance of the rest of the program.

Copyright

Tinyac is © 2010 Paul S. Hirose. You may re-distribute the executable, documentation, and the .msi installer, but not for profit.

[up one level in the site]

[validate at W3C]

Last modified 2014-06-10