The Unofficial Temma PC TheSky Driver for Takahashi Temma PC Goto Telescope Mounts
Copyright (c) 2001 Richard Lawler
Written by Richard Lawler (richardl@well.com)

Release Notes & Instructions: Nov. 5, 2001
-----------------------------------------------------------------------------------------------
Driver Version 0.2.0.1

Note: This is a preliminary release. This driver was developed using a Temma PC Jr EM-10 and a ThinkPad laptop running Windows 2000. 

At this point I have had positive reports from people using this driver with the following equipment.

Takahashi Mounts:
- EM-10 Temma PC Jr.,
- EM-200 Temma PC,
- NJP Temma PC and NJP Temma PC upgrades.

Windows Operating Systems:
- Windows 98,
- Windows 98SE,
- Windows ME,
- Windows 2000 Pro,
- Windows XP.

If you try this driver please drop me a note at richardl@well.com, and let me know if it works or not with your equipment. Please indicate what type of mount and computer you are running. 

Likewise report bugs or problems to richardl@well.com. 
Please include information on the model of Temma PC mount you are using (include the version number if possible), computer type, operating system and TheSky version.  (The Temma PC version number is displayed in the Telescope API settings dialog after you have connected and disconnected from the mount once.)

I will try to fix problems where possible. 

There is no charge for this software. It is free for anyone to use.  But please do not redistribute this driver. If anyone wants a copy of this driver they should obtain the current version directly from me at 
http://www.well.com/user/richardl/astro/temma

Thank you.

----------------------------------------------------------------------------------------------
IMPORTANT NOTICE: This software is provided as is. Use it at your own risk. 
No warranties are expressed or implied. 

Note: Safe operation of computer-driven telescopes is solely the responsibility of the telescope operator!  Richard Lawler provides the Unofficial Temma PC driver as a matter of convenience only.  Richard Lawler is not responsible for any accidents or damage that may occur while TheSky is linked to a Temma PC mount.  Always use extreme caution while operating expensive telescope equipment.

The Unofficial Temma PC TheSky driver software was independently developed to allow the TheSky to communicate with the Takahashi Temma PC telescope mounts. The Unofficial Temma PC TheSky driver was not developed by or for Takahashi Corp., Texas Nautical Repair or Software Bisque.  Neither Takahashi, Texas Nautical Repair nor Software Bisque is responsible to support this driver. 

----------------------------------------------------------------------------------------------
What is the Unofficial Temma PC TheSky Driver?

The Unofficial Temma PC TheSky Driver is a software plugin that allows TheSky planetarium software from Software Bisque to communicate with and to control the Temma PC and Temma PC Jr computer controlled telescope mounts from Takahashi. The Temma PC and Temma PC Jr connect to a PC via standard RS-232C serial Comm port. Once connected TheSky can be synchronized with the pointing position of the Temma PC mount. Then TheSky can direct the telescope to point to any object in its database of currently visible objects. TheSky also reads the current location of the telescope so you can still use the Temma PC's manual control paddle without losing synchronization.

If you release the clutches on most of the Temma PC mounts (models EM-10, EM-200 and NJP) TheSky will lose synchronization with the current pointing location of the scope. You will need to re-sync TheSky with the current telescope position.

----------------------------------------------------------------------------------------------
Requirements:

Requires TheSky Version 5.00.001 or later. (Updates to TheSky Version 5 are available from the Software Bisque web site http://www.bisque.com.)

This driver is not compatible with TheSky Pocket Edition for Windows CE or TheSky for Mac.

The Unofficial Temma PC TheSky Driver uses TheSky's Telescope API to communicate with the Temma PC mount. TheSky can only use one Telescope API driver at a time. This driver is always called TeleAPI.dll and should be located in the \Program Files\Common Files\System folder on your computer. TheSky comes with a dummy Telescope API driver that must be replaced by the Unofficial Temma PC driver.

----------------------------------------------------------------------------------------------
Installation Instructions:

- Make sure TheSky is not running.
- Open the folder \Program Files\Common Files\System.
- Find the existing TeleAPI.dll file, and rename it to something like TeleAPI.dll.bak.
- Copy the Unofficial Temma PC driver (also called TeleAPI.dll) to the \Program Files\Common Files\System folder.

----------------------------------------------------------------------------------------------
Operation Instructions:
- First setup the Temma PC or Temma PC Jr mount with an accurate polar alignment. (See the instructions that came with your mount. What? Your mount didn't come with instructions? <g>)
Note: The Temma PC goto system uses only a single celestial synchronization point for its goto calculations. Therefore Temma PC relies on accurate polar alignment for the accuracy of its goto slewing. A poor polar alignment will result in poor accuracy in goto slews. Re-syncing to a star near your target can help with the accuracy of slews to nearby targets if you haven't done a very precise polar alignment.  

- Start TheSky. 
- Open the Site Information dialog (Data->Site Information... menu). In the Location tab make sure the site latitude and longitude are correct and make a note of the values. Make sure the time zone setting is correct. In the Date and Time tab make sure "Use computer's clock" is checked. Make sure your computer's clock is correct.
- Choose the Telescope->Setup... menu. In the Telescope Setup dialog choose "Telescope API" for the Control System. 
- Click the Settings... button and confirm that the Unofficial Temma PC Driver is being used. 
- Enter the same site latitude and longitude values as you entered in TheSky's Site Information dialog. 
- Select the Comm Port that is connected to the Temma PC RS-232C cable.
- Choose an option for the "Initialize mount to:" option:
------------------------------------------------------
* Initialize mount to Western-Zenith option
In this mode you start out by positioning the mount with the scope on the west side of the mount and pointed straight up (just as in Telescope Tracer 2000). After you have connected to the scope move the scope to point to a known star east of the meridian then sync TheSky to the same star. 

* Initialize mount to Eastern-Zenith option
In this mode you start out by positioning the mount with the scope on the east side of the mount and pointed straight up.  After you have connected to the scope move the scope to point to a known star west of the meridian then sync TheSky to the same star.  

This mode is useful since many people like to image with the scope weight loaded on the east side of their mount.  It's also handy with some Takahashi mounts have to be positioned with the scope to the east in order to align the mount through the polar scope. So polar alignment and initial scope positioning can be done with one setup.

* Initialize mount to none (do not change sync) option
In this mode the telescope position will not be changed from the last synchronization since the Temma PC mount was turned on. For example from a previous use of TheSky or another Temma PC-compatible program like Telescope Tracer 2000 or Kagayaki III.  This allows you to connect, disconnect and re-connect without having to re-sync.

* Ask on connect option
You will be asked which initialization option you want from the above three choices when you connect to the Temma PC mount. (This is the default.)
------------------------------------------------------
- Choose OK to save your settings. The settings will be used for any future sessions. You only need to use the Settings dialog in the future if you want to change your Unofficial Temma PC Driver settings. For example if you enter a new site location. 
- In the Telescope Setup dialog set the other software options as you like. A value of 500ms works well for Cross hair update frequency, but other values may work fine.
- Click OK to accept your settings.
- Turn on the Temma PC mount before you attempt to connect. 
- Click the "Establish Link" icon or choose the Telescope->Link->Establish menu. 
- If you chose the "ask" option for "Initialize mount to" option you will be presented with a dialog asking you to choose "West-Zenith", "East-Zenith" or "none (do not change sync)". Chose an option as appropriate.
- TheSky will then indicate current synchronization with a white cross hair and circle indicator.

------------------------------------------------------
* If you chose the Initialize mount to Western-Zenith option:
- Position telescope with the scope on the west side of the mount and pointed straight up. 
- After you have connected to the scope move the scope to point to a known star in the east hemisphere of the actual sky (above the Celestial Pole). You can release the mount's clutches and position the scope by hand, use the Temma mount's hand paddle or within TheSky use the Slew (goto), or Jog (under Telescope->Motion Controls) to get approximately centered on the star. Then use the Temma mount's hand paddle to accurately center the known star in the scope eyepiece.
- With the star centered in your eyepiece select the same star within TheSky's virtual sky. Choose Sync in Telescope pane of the Object Information dialog. TheSky will now display a white cross hair with a circle around it to indicate the telescope's current synced position.

* If you chose the Initialize mount to Eastern-Zenith option:
- Position telescope with the scope on the east side of the mount and pointed straight up. 
- After you have connected to the scope move the scope to point to a known star in the west hemisphere of the actual sky (above the Celestial Pole). You can release the mount's clutches and position the scope by hand, use the Temma mount's hand paddle or within TheSky use the Slew (goto), or Jog (under Telescope->Motion Controls) to get approximately centered on the star. Then use the Temma mount's hand paddle to accurately center the known star in the scope eyepiece.
- With the star centered in your eyepiece select the same star within TheSky's virtual sky. Choose Sync in Telescope pane of the Object Information dialog. TheSky will now display a white cross hair with a circle around it to indicate the telescope's current synced position.

* If you chose the Initialize mount to none (do not change sync) option:
- The telescope position will not be changed from any previous synchronization. For example if you continue after a previous use of TheSky or another Temma PC compatible program like Telescope Tracer 2000 or Kagayaki III.
- If you need to re-synchronize or fine-tune the synchronization, move the scope to point to a known star in the actual sky. Use the Temma mount's hand paddle. Within TheSky you can also use Slew (goto), or Jog (under Telescope->Motion Controls) to get approximately centered on the star. 
- With the star centered in your eyepiece select the same star within TheSky's virtual sky. Choose Sync in Telescope pane of the Object Information dialog. TheSky will now display a white cross hair with a circle around it to indicate the telescope's current synced position.
Note: If the mount has not been previously initialized or synced to a known star since being turned on (either in TheSky, Telescope Tracer 2000 or Kagayaki III or some other Temma PC-compatible software) TheSky and Temma PC will think the scope is pointing to RA = 0 and Dec = 0 and that the scope is on the west side of the mount. Before proceeding make sure that you sync to an actual star with the scope on the west side of the mount or you will get unpredictable results.
Note: Do not flip the mount from one side to the other with the clutches released and then re-sync because the Temma PC mount won't know correctly on which side of the mount the scope is and it won't be able to manage mount flips properly.  If you do flip the mount with the clutches released you should re-connect with Eastern-Zenith or Western-Zenith initialization as appropriate.
------------------------------------------------------

Sync Operation:
You can update the sync of TheSky with the actual telescope position at any time by centering the target in the eyepiece, select the target in TheSky, then click the Sync button in the Telescope pane of the Object Information dialog for the target. TheSky will update the white cross-hair/circle to indicate the newly synchronized position of the scope. 
Note: You currently can not sync to a star on the other side of the mount from its current orientation. You must first either perform a goto slew to a star on the other side of the sky or reinitialize the Unofficial Temma PC driver by terminating the link to the mount and reconnecting using the Eastern-Zenith or Western-Zenith initialization options as appropriate. 

Goto Operation:
Choose a target in TheSky's virtual sky. The target must be above the horizon. In the Object Information dialog click the Slew icon near the bottom right. The scope will now slew to the target. TheSky will display a Slewing in progress indicator. This indicator will go away when the slew is complete. (If for some reason the Slewing progress indicator does not go away once the slew is clearly completed just click the Cancel button. There is no harm.) 

If you want to cancel a slew you have started just click the Cancel button on the Slewing in progress indicator. Your telescope will be positioned where the slew happens to stop. You can easily return to your original location with the Slew Prior button in the Telescope pane of the Object Information dialog.

------------------------------------------------------
Operation Notes:

------------------------------------------------------
TheSky's Telescope Motion Control panel only works in Jog mode with Telescope API drivers. 

------------------------------------------------------
The Temma PC mounts are designed not slew to targets below the current horizon. In practice the Temma PC will not slew to targets below about 1 degree in altitude above the horizon. The Temma PC mounts compute the horizon based on the Longitude and Latitude as entered into the Telescope->Setup...Settings dialog and the current time. For this calculation to be accurate the Longitude and Latitude must be correct and the computer's clock, time zone setting, daylight savings option and date must be set correctly. These are the only settings that affect the Temma PC mount. (TheSky has it's own settings that it uses to calculate the horizon as displayed in the "virtual sky". These are the computer's clock, and the Data->Site Information settings plus the Steller Screen Update Frequency in the Data->Options dialog.) 

If you want the Temma PC to be able to slew to a target at or very close to the horizon you may need to "fool" the Temma PC mount into thinking the horizon is lower than it actually is. This can be done most easily by changing the Longitude and/or Latitude settings in the Telescope->Setup...Settings dialog.  You must temporarily terminate the link with the Temma PC to make these changes. 

CAUTION: These limits are built into the Temma PC to prevent you for damaging your telescope. Always use caution when changing Latitude and Longitude values in the Unofficial Temma PC driver settings.

CAUTION: Changing the Longitude will cause what the Temma PC believes to be the meridian to move too. This meridian is used to determine when a mount flip will be needed to prevent a collision between your scope and accessories and the mount and tripod. Caution is advised when pointing near the meridian when you have entered an incorrect Longitude value.

Examples: To lower the Temma PC's western horizon limit by 5 degrees change the Longitude 5 degrees west. To lower the eastern horizon limit by 5 degrees change the Longitude 5 degrees east. To lower the southern horizon 5 degrees change the Latitude 5 degrees south. To lower the northern horizon 5 degrees change the Latitude 5 degrees north. 

------------------------------------------------------
By adjusting your site longitude east or west in the Unofficial Temma PC driver settings you can move the meridian that the Temma PC uses to calculate whether a mount flip will be required. This can facilitate work on targets that are located near the actual meridian. 

CAUTION: You must make sure your telescope or camera will not collide with the mount or tripod when moved the additional degrees past the true meridian.  Adjusting the longitude may also affect your ability to sync to or goto to targets near the East and West horizons.  

Adjusting the longitude east will move the meridian used in flip calculations east. Likewise adjusting the longitude west moves the meridian west.

------------------------------------------------------
The Local Sidereal Time that the Unofficial Temma PC driver uses to calculate the current meridian may be slightly different from what TheSky displays as LST and the meridian line. TheSky only updates its "virtual sky" display including the LST, the meridian and the horizon as often as is set in the Data->Options dialog. (The default Stellar Screen Update Frequency is 5 minutes.) Thus if TheSky has a Stellar Screen Update Frequency setting of 5 minutes then the meridian, LST and horizon displayed in TheSky can be off by as much as 5 minutes of Right Ascension. You can reduce the Stellar Screen Update Frequency and improve the accuracy of the display. Note that Screen Updates are computationally expensive. If you need to know exactly what the Unofficial Temma PC driver is using you can download and run this little LST clock utility. http://www.projectpluto.com/lst.htm

------------------------------------------------------
There currently isn't a way to tell the Temma PC mount that you have manually flipped the mount east/west. (I'm working on that for an update.) 

------------------------------------------------------
You can use the Unofficial Temma PC TheSky driver and TheSky in conjunction with other Temma PC compatible software. Because all software communicates with the Temma PC mount in the same way it is easy to use other Temma PC-compatible software to control your Temma PC mount then switch to TheSky without having to re-initialize or re-sync your telescope. When connecting to the Temma PC from TheSky be sure to choose the option to "Initialize to: None (do not change sync)". 

Since only one program can communicate with the Temma PC mount at a time it is important that only one program is connected to the mount. Telescope Tracer 2000 always attempts to be connected to the Temma PC mount whenever it is running. So if Telescope Tracer 2000 is already running you will not be able to initiate a new connection to the Temma PC from TheSky.

------------------------------------------------------
TheSky will follow the current telescope position if you have the "Always keep telescope cross hairs on screen" option checked in the Telescope->Settings dialog. This behavior can be disconcerting and can be turned on or off at any time.

------------------------------------------------------
Do not try to connect to the Temma PC mount using the Unofficial Temma PC driver if the mount is not physically connected to your computer. Due to a problem with the driver it may no be able to time out properly and may cause TheSky to lock up. (If this happens you should be able to recover by ending TheSky task in the Windows Task Manager (or using the Ctrl-Alt-Del dialog in Windows 95/98/Me), but any changes made in TheSky will be lost.)

