SiTechExe
ASCOM Extensions Help
as of Version 0.91Xe

ASCOM Standard Methods and properties have done a lot for the astronomical community. This makes it easy for manufacturers to make their software work with other software.
Many people don't know, but it's extremely easy to write a vbs script or a java script that can control your telescope, camera, focuser, dome, etc.

If you want to make scripts to do various things, you can take a look at the examples in the SiTech Data folder.  Sort your view by "type" and you'll see many *.vbs scripts.  
To view them, right-click, don't double click.  If you double click on them, it will try to run them.  If you right-click on them, you'll be able to edit them.

Since we do the telescope controls, here's a link to the ASCOM Telescope methods and properties.
http://www.ascom-standards.org/Help/Developer/html/T_ASCOM_DriverAccess_Telescope.htm
SiTechExe supports ALL of those methods and properties.

Over the years, folks (sometimes myself too) have wanted something in addition to these methods and properties.
What you'll find here, is inconsistent format, for instance, some angle are in radians, while others are in deg's, or hours.  Mostly this is due to making options to specific customers requests.  Some of it depends on the mood of the programmer (me!). Sorry about that! However, that should not keep you from using the extra tools provided in SiTechExe.

There are two different types of ASCOM extensions.  Some require that you use the SiTechDLL in your code in addition to the ASCOM references.   To explain this further, take a look at the first documented new method:
int OffsetSync(double RightAscension, double Declination);
RA is in Hours, Dec is in degs. Coordinates are in Epoch JNow.
If you're writing code in C#, VB, or other program, and you're using a shell provided by ASCOM, then, it will automatically have references to the Standard ASCOM methods and properties.
If you try to use one of the SiTechExe extensions listed here,  you may get an error. In this case you'll have to reference the SiTechDll.dll directly in your project.

If you simply make a VBS or Java script like the examples, you won't have to worry about this.

However, to help out, a lot of the extensions, and some are duplicates, are referenced with both an ASCOM extension, AND/OR we may also provide a way to do it with the Standard CommandString(String strg, bool Raw ) ASCOM method.

The first section of this document provides the documentation of the  ASCOM extensions that work with SiTechExe.
The second section provides the documentation of the standard ASCOM method "CommandString" extensions that work with SiTechExe.

International Decimal Point Convention.  Some countries use a period '.' for a decimal point, and others use a comma ','.
Normally we will use decimal points in SiTechExe.  So, we tried to make all comma's that separate values to have a space ' ' after them, so you can split a string with ", " and it won't split a floating point string, that uses a comma as a decimal point.

One more thing, this document is for version 0.91Xe or later.  Even 0.91Xd has mistakes I found when writing this document.

****************Section One***************************   
Here are the ASCOM extensions that don't require going through the "String CommandString(String str, bool raw)" command.
*******************************************

*******************    
SiTechExe has two forms of inits. One is a simple offset init, and the other is load a cal star (for the telescope mount model, PointXP by Dave Rowe).  There is an interface window that pops up when you perform a standard ASCOM sync.   If you do this many times a night under automation, it can slow down "production".
The following do instant syncs, one for each kind.  The interface window does not pop up.

int OffsetSync(double RightAscension, double Declination);
    RA is in Hours, Dec is in degs. Coordinates are in Epoch JNow.

int LoadStarSync(double RightAscension, double Declination);
    RA is in Hours, Dec is in degs. Coordinates are in Epoch JNow.
    The above two ASCOM extensions return the value of zero.

double CameraSolvedAngle()
        Returns the plate angle of the last PlateSolve done with the Script Window and camera.  Angle is in Radians


*******************DoPlateSolve*********************

String DoPlateSolve(String  FitsFileName, double StartRightAscensionHrs, double StartDeclinationDegs, double StartFOVXMins, double StartFOVYMins, int SecondsUp, int Priority, bool UpdateWCS);

    Have a look at the visual basic script file named "TestPlateSolve.vbs" in the SiTech Data folder for an example how to use the commandString or the ASCOM extension for PlateSolving an image.
    Use this to have SiTech manage Dave Rowe's PlateSolve3 to platesolve an image and possibly update it's WCS.
    Most parameters are self explanatory.  The follow are descriptions of the parameters that are not self explanatory:
        SecondsUp, is how many seconds to leave the PlateSolve3 window up AFTER the solve is finished.  If you send a '0', then it will remain up until you manually close it.
        Priority is the windows priority given to this instance of PlateSolve3, 0 is lowest, 4 is highest.
        UpdateWCS.  If true, SiTechExe will add the WorldCoordinateSystem coordinates to the Fits file of your image if it's successfully solved.

    SiTechDLL returns one string, to be split into 12 strings.  A comma space (", ") is what you should use to separate the strings and convert the strings to doubles in your code.  There are 11 double values and 1 string.
        String 1 is the Right Ascension in Hours, J2000.
        String 2 is the Declination in Degrees, J2000.
        String 3 is the Solved Field of view X axis, in arc minutes.
        String 4 is the Solved Field of view Y axis, in arc minutes.
        String 5 is the image rotation angle in Deg's.
        String 6 is the number of extracted stars in the image.
        String 7 is the number of matched stars in the image.
        String 8 is the image scale in arc seconds per pixel.
        String 9 is the Average star diameter in arc seconds.
        String 10 is the Elongation amount of the stars (arc seconds).
        String 11 is the time (seconds) it took to solve the image.
        String 12 is the result message.    
            Possible result messages are:    
                "PlateSolve3 Valid Plate Match";    
                "PlateSolve3 Valid Plate Match, Possible False Solve";    
                "PlateSolve3 Unknown Error";    
                "PlateSolve3 FileNotFound";    
                "PlateSolve3 Stopped while in process";    
                "PlateSolve3 Couldn't Match Image";    
                "Couldn't find the PlateSolve3 Catalogs";    
        If you get a "Possible False Solve" in the valid plate match, then either the starting coordinates are different than the solved coordinates, or the starting plate size is different than the solved plate size.
        To remedy this, make sure you're sending the proper starting coordinates and the proper platesize.  
        If you're sending the proper starting platesize and starting coordinates, then perhaps you have a false plate solve.  In this case, you shouldn't use it.  
        I've seen this happen when there are many, many stars, for instance, if your image is from the Milky Way.

*******************Satellite ASCOM Extensions*******************
For an example, take a look at the VBS Script file in the SiTechData Folder named SatelliteTestAscom.vbs

Satellite ASCOM Extensions
    int SatelliteOpenWindow()
You MUST have the Satellite Tracking window up to use any of the Satellite Commands.
This will open the satellite tracking window if it is not open.
Return Value:
1. Successful
0. No Answer from Scope

    int SatelliteLoadTLE(String Name, String TLEOne, String TLETwo)
            Name would normally be the first line of the standard 3 lines, but can be anything you want to appear in the TLE top line.
             TLEOne is a string that is the first string of the TLE.
             TLETwo is a string that is the second string of the TLE.
             Return Value
                   1 = Successful
                   0 = No Answer from Scope
                 -1 = Unsuccessful, maybe a bad TLE

    double SatelliteRightAscension()
            Returns a double with Right Ascension in 0-24.
            If return value = 0.0    = No Answer From Scope,  Not Tracking a Satellite, or Satellite window is not up.
           
    double SatelliteDeclination()
            Returns a double  with Declination -90.0 to 90.0
            If return value = 0.0    = No Answer From Scope,  Not Tracking a Satellite, or Satellite window is not up.

    double SatelliteAltitude()
            Returns a double  with Altitude -90.0 to 90.0
            If return value = 0.0    = No Answer From Scope,  Not Tracking a Satellite, or Satellite window is not up.

    double SatelliteAzimuth()
            Returns a double  with Altitude 0.0 to 360.0
            If return value = 0.0    = No Answer From Scope,  Not Tracking a Satellite, or Satellite window is not up.

    int SatelliteStartTrack()
Will start tracking the satellite of the currently loaded TLE, IF:
1. There is a valid TLE loaded
2. The telescope is initialized
3. The Satellite is above the horizon limit
4. If below the horizon limit, it will move to the place where the satellite will rise above the horizon limit, then start tracking when the satellite gets there.
Return value:
1. Successful (may be awaiting the satellite to appear above the horizon limit)
0. No Answer from Scope
-1. Is not tracking the satellite
Could be because:
a. Scope not initialized.
b. TLE is not valid.
c. Satellite is below horizon limit and not rising.

    int SatelliteStopTrack()
            This will stop a satellite tracking command, and the scope will not be tracking after this command (will be stopped)
                Return Value:
                    1. Successful
                    0. No Answer from Scope
           
    int SatelliteSetTrackingGain(int Gain)
This will set the satellite tracking Gain.  The gain should be between 0 and 100.
Higher gains will track more accurately (especially on LEO satellites) but could cause oscillations.
Return Value:
1. Successful
0. No Answer from Scope
           
    int SatelliteIsTracking()
                Return Value:
                    1. We're tracking the satellite of the loaded TLE.
                    0. Not tracking any satellite
                  -1. No Answer from Scope or Satellite window is not up.

    double SatelliteTrackingError()
                Return Value:
                    0.0  =  No Answer From Scope,  Not Tracking a Satellite, or Satellite window is not up.
                    Any other value = Highest tracking position error, Right Ascension or Declination, in Degrees.

    String SatelliteInformation(double JulDay)
        The return string is as follows:
            "JulDay=2456553.48340578, //'This is the current Julian Day
            GMT=9/17/2013 11:36 PM,
            Name=0 AMC-7 (GE-7),
            NORAD=26495,
            Epoch=8/7/2013 5:46:16 AM,
            Eccentricity=0.0003007,
            Inclination=0,
            Perigee Height=35773.6,
            Apogee Height=35799,
            RightAscension of Ascending Node=5.39,
            Argument of Perigee=2.912,
            Revs Per Day=1.0027283,
            Mean anomaly at epoch=2.6154,
            Orbit Number at Epoch=4705,
            IsDeep=True,
            Method=SGP4,
            Latitude=44.29889,
            Longitude=-120.1416,
            SiteElevation=1645.92,
            JD=2456553.48340578, //'This is the Julian Day passed to the Satellite Information if not 0.0
            RA=14.23971,
            Dec=-6.7817,
            dist=38040.1,
            Alt=36.5766,
            Az=201.6355,
            TrackingSat=False"

********************Section Two***********************   
Here are the Command String "commands" supported by SiTech.
*******************************************

String CommandString("RightAscensionJ2000")
    Returns a string with the current Right Ascension in Epoch J2000, hours.

String CommandString("DeclinationJ2000")
    Returns a string with the current Declination in Epoch J2000, degrees.

String CommandString("GetRightAscensionDeclinationJ2000")
    returns a string, with two values, "12.3456, 34.5678" which represent the current telescope coordinates in Epoch J2000, hours and deg's.  You should split the string with a ", " (comma, then space).


*******************DoAPhotoxxxInit*********************
The DoAPhotoxxxInit will make SiTech control the camera, make an image, plate solve it, and then perform the initialization or Synch.    
You MUST have a working camera controlled by SiTechExe, and you have PlateSolve2 or PlateSolve3 working properly.
Before you try this, you MUST use the Script window/PlateSolveStuff tab, and perform a successful "Do a single photo-init", and then save the settings.

     String CommandString ("DoAPhotoInit")
            Takes an image, tries a plateSolve, then brings up the Init Window,  where you can select the Init Type.

    String CommandString ("DoAPhotoOffsetInit")
            Takes an image, tries a plateSolve, and if successful, performs a photo offset init instantly

    String CommandString ("DoAPhotoCalibrationInit")
            Takes an image, tries a plateSolve, and if successful, performs a Load Calibration Star init instantly  
 
    The resultant strings are as follows:    
        "Finished Photo Init" OR "Error in Photo Init".
        "Finished Photo Offset Init" OR "Error in Photo Offset Init".
        "Finished Photo Calibration Init" OR "Error in Photo Calibration Init"
    If the platesolve takes more than 2 minutes, this will return with the error message.
   

*******************CommandString(DoAutoFocus)*********************
String CommandString("DoAutoFocus, 9.1")
If you have a working camera controlled by SiTechExe, and you have specified an ASCOM focuser in SiTechExe Setup, you can perform an AutoFocus from a script.
Before you do this, you MUST use the Script window/AutoFocus tab, perform a successful autofocus manually, and then save the settings.
It will use the last Exposure Length, unless you specify an exposure length, with (as an example) a ", 9.0" after the "DoAutoFocus"
You MUST have a space after the comma.
Returns a string with information about AutoFocus results.
Some possible returns are:
"Problem Connecting Focuser"
"AutoFocus is currently Running"
"Timeout in AutoFocus"
"AutoFocus Problem! Message=" Various reasons for the failure....
"AutoFocus Complete. Message= " Data about the autofocus as follows:
"Best Focus=12345 RMSDiamBestFocus=2.345 Tolerance=123 Temp=1.2"
Best Focus is in microns, or steps, according to your focuser, RMSDiamBestFocus will be the RMS diameter in pixels of the best focus image, Tolerance is how close in microns you should be for best focus, and Temp is temperature in Deg's C, if your focuser has temperature.
Please see example script in the SiTechExe Data Folder called TestAutoFocus.vbs

*******************CommandString(DoPlateSolve)*********************
String CommandString ("DoPlateSolve, FitsFilePathAndName, StartRightAscHours, StartDeclinationDegs, StartFOVX, StartFOVY, SecondsWinUp, Priority, UpdateWCS")
Have a look at the visual basic script file named "TestPlateSolve.vbs" in the SiTech Data folder for an example how to use the commandString or the ASCOM extension.
Here's an example:
String MyString Scope.CommandString("DoPlateSolve, C:\ProgramData\SiTech\SiTechExe\DefaultPS.fit, 10.1, 23.4, 26.6, 20.2, 10, 4, True");
SiTechDLL returns one string, to be split into 12 strings.  A comma space (", ") is what you should use to separate the strings, and convert the strings to doubles in your code.  There are 11 double values, and 1 string.
        String 1 is the Right Ascension in Hours, J2000.
        String 2 is the Declination in Degrees, J2000.
        String 3 is the Solved Field of view X axis, in arc minutes.
        String 4 is the Solved Field of view Y axis, in arc minutes.
        String 5 is the image rotation angle in Deg's.
        String 6 is the number of extracted stars in the image.
        String 7 is the number of matched stars in the image.
        String 8 is the image scale in arc seconds per pixel.
        String 9 is the Average star diameter in arc seconds.
        String 10 is the Elongation amount of the stars (arc seconds).
        String 11 is the time (seconds) it took to solve the image.
        String 12 is the result message.    
            Possible result messages are:    
                "PlateSolve3 Valid Plate Match";    
                "PlateSolve3 Valid Plate Match, Possible False Solve";    
                "PlateSolve3 Unknown Error";    
                "PlateSolve3 FileNotFound";    
                "PlateSolve3 Stopped while in process";    
                "PlateSolve3 Couldn't Match Image";    
                "Couldn't find the PlateSolve3 Catalogs";    
If you get a "Possible False Solve" in the valid plate match then either the starting coordinates are different than the solved coordinates, or the starting plate size is different than the solved plate size.
To remedy this make sure you're sending the proper starting coordinates and the proper platesize.  
If you're sending the proper starting platesize and starting coordinates, then perhaps you have a false plate solve.  In this case, you shouldn't use it.  
I've seen this happen when there are many, many stars, for instance, if your image is from the Milky Way.

*******************CommandString Satellite Control*********************
For an example, take a look at the VBS Script file in the SiTechData Folder named SatelliteTestCommandString.vbs

String CommandString("SatelliteOpenWindow")
You MUST have the Satellite Tracking window up to use any of the Satellite Commands.
This will open the satellite tracking window if it is not open.
If any other CommandString(Satellite...) commands are sent to SiTechExe, and the Satellite Tracking window is not up, the returned message will be:
"Satellite Window is not open, please open!"
Return Values:
if Satellite window is up, "Satellite Window is already up"
Success: "Opening Satellite Window"
No Communication with SiTechExe: ""

String CommandString("SatelliteLoadTLE,Line0,Line1,Line2")
Line0 is normally the name of the satellite.
Line1 is the first line of the TLE for the satellite.
Line2 is the second line of the TLE for the satellite.
Here's an example of use:
RS = Scope.CommandString ("SatelliteLoadTLE,0 ERS 15,1  2412U 66077C   16307.21903178 +.00000002 +00000-0 +00000-0 0  9995,2  2412 090.1772 243.5576 0015462 341.3327 018.6956 08.59068050088686", false)

On Success, returns "Satellite " + Line0 + " is Loaded"
On Failure, returns "Bad Two Line Element String"

String CommandString("SatelliteInformation")
        The return string is as follows:
            "JulDay=2456553.48340578, //'This is the current Julian Day
            GMT=9/17/2013 11:36 PM,
            Name=0 AMC-7 (GE-7),
            NORAD=26495,
            Epoch=8/7/2013 5:46:16 AM,
            Eccentricity=0.0003007,
            Inclination=0,
            Perigee Height=35773.6,
            Apogee Height=35799,
            RightAscension of Ascending Node=5.39,
            Argument of Perigee=2.912,
            Revs Per Day=1.0027283,
            Mean anomaly at epoch=2.6154,
            Orbit Number at Epoch=4705,
            IsDeep=True,
            Method=SGP4,
            Latitude=44.29889,
            Longitude=-120.1416,
            SiteElevation=1645.92,
            JD=2456553.48340578, //'This is the Julian Day passed to the Satellite Information if not 0.0
            RA=14.23971,
            Dec=-6.7817,
            dist=38040.1,
            Alt=36.5766,
            Az=201.6355,
            TrackingSat=False"

String CommandString("SatelliteAltitudeAzimuth")
If Satellite is not loaded, the return is "0.0, 0.0"
Otherwise, it is "34.1345, 92.012" as an example.  The first number is the altitude.  Both are in deg's.

String CommandString("SatelliteRightAscensionDeclination")
If Satellite is not loaded, the return is "0.0, 0.0"
Otherwise, it is "12.1345, 32.012" as an example.  The first number is the RightAscension Hours.  Second is Declination Degrees. Coordinates are Epoch JNow.

String
 CommandString("SatelliteStartTrack")
Will start tracking the satellite of the currently loaded TLE, IF:
1. There is a valid TLE loaded
2. The telescope is initialized
3. The Satellite is above the horizon limit
4. If below the horizon limit, it will move to the place where the satellite will rise above the horizon limit, and then start tracking when the satellite gets there.
Return value:
"StartTrack=True" Successful (may be awaiting the satellite to appear above the horizon limit)
"StartTrack=False"  Is not tracking the satellite
"No Satellite Loaded"
"Scope is not Initialized"
If returned False, it could be because:
a. Scope not initialized.
b. TLE is not valid.
c. Satellite is below horizon limit and not rising.

String
 CommandString("SatelliteStopTrack")
If you're currently tracking a satellite, this will stop the telescope.
returns "Stopped"

String
 CommandString("SatelliteIsTracking")
Returns "true" if the mount is currently tracking a satellite, otherwise returns "false"

String
 CommandString("SatelliteTrackingError")
Returns the highest axis position error (right ascension or declination) in Degrees.
If the return value is "0.0" or "0", then the mount is not currently tracking a satellite

String
 CommandString("SatelliteSetTrackingGain, 55")
This will set the satellite tracking Gain.  The gain should be between 0 and 100.
Higher gains will track more accurately (especially on LEO satellites) but could cause oscillations.
if there is no value, or the value is less than 0 or value is greater than 100, it will not set the gain, but will still return the gain.
Return Value:
Always returns the current gain (after the setting).  The above example will return "55"

*******************CommandString(SyncToCoordinates2000)*********************
String CommandString("SyncToCoordinates2000, 12.0, 34.0")
    This will perform an offset Sync to the coordinates you specify in Epoch J2000 (instead of JNow).     
    First number is Right Ascension Hours, 2nd is Declination degrees.    
    Result will be:    
"Sync2000OK"
"SyncToCoordinates2000 Error! Not enough CommaSpace separated Parameters."
"Can't sync below horizon!"
"Exception in CommandString: SyncToCoordinates2000. Err="    

*******************CommandString(SyncCalToCoordinates2000)*********************
String CommandString("SyncCalToCoordinates2000, 12.0, 34.0")
    This will perform a Load Calibration Sync to the coordinates you specify in Epoch J2000 (instead of JNow).     
    First number is Right Ascension Hours, 2nd is Declination degrees.    
    Result will be:    
        "SyncCal2000OK"
        "SyncCalToCoordinates2000 Error! Not enough CommaSpace separated Parameters."
        "Can't syncCal below horizon!"
        "Exception in CommandString: SyncCalToCoordinates2000. Err="    


*******************CommandString(GetAllData)*********************
String  CommandString("GetAllData")
        Returns a string with comma's separating the various data
String 1 = "S" or "s". An upper case indicates the the mount is slewing.    
String 2 = "T" or "t" An upper case indicates the the mount is tracking.
String 3 = "B" or "b" An upper case indicates the controller is in Blinky, followed by the error why it's in Blinky (if a brushless controller)
String 4 = "1.2345" Current Right Ascension in Radians
String 5 = "0.1234" Current Declination in Radians
String 6 "0.2345" Current Altitude in Radians
String 7 "1.23456" Current Azimuth in Radians
String 8 "1234567"  Primary Axis Motor Encoder location (Raw with offsets applied)
String 9 "2345678" Secondary Axis Motor Encoder location (Raw with offsets applied)
String 10 "4.2345" current Sidereal time in Radians
String 11 "2457722.49778034" Current Julian Day,
String 12 is "E" means "Looking East" and "W" means "Looking West"
String 13 is "0"  This is the error integer.  
bit0=LimitPlusPrimary
bit1=LimitMinusPrimary
bit2=LimitPlusSecondary
bit3=LimitMinusSecondary
bit4=At least one motor is in Manual (Blinky)
bit5=No Communication with controller

*******************Various CommandString commands*********************
String CommandString"SolvedAngle"    This returns the last solved angle from a platesolve.  Angle is in Radians.    

String   CommandString("GetFlipWillBe, 3.1415926")    I have pi as the example. The parameter is the right ascension in radians that you want to know if the mount will flip or not.    
                Returns a string of "E" or "W"    

String
   CommandString("Blinky") Returns a "1"if in blinky (motors in manual), and a "0" if in auto.

String
   CommandString("GetMotorEncoders")    Returns "45.0, 12.0, 567890"
            Where the first number is the primary axis angle in deg's, and the second number is the secondary angle in degs, the 3rd number is the Servo Controller millisecond count.
    
String   CommandString("PECIDX#") returns the RA Worm Angle, "34.0#" returns "-1.0#" if not synched.

String  CommandString("GetWormAnglePri")
                Returns the Primary axis worm angle in degrees, for the new Auto Pec (future).

String
  CommandString("GetWormAngleSec")  
                Returns the secondary axis worm angle in degrees, for the new Auto Pec (future).

String  CommandString("GetKeypad")
                Returns "KEnter", "KEscape", "KLeft", "KRight", "KUp", "KDown", "KSpeed", or "KNone"

String  CommandString("GoToPark, 1")
This command will move the mount to Park 1, Park 2, or Park 3 location, and stop the mount.  It will not officially Park the scope, only move it to the park location.
I use Park1 as the normal resting place of the mount.  I use Park2 as the flat field location, and Park3 as a Dark Field location.  You can use these locations any way you want.
In order to use these, the locations need to be set.  You Right Click on the SetPark button in SiTechExe, to set locations1, 2, or 3.
You can also move to these 3 locations by right clicking on the Park button in SiTechExe.
Return values:
"Not enough parameters, need which park to GoTo (1,2, or 3)"
"You selected a park number that is not 1, 2, or 3"
"You Didn't set up a Park 1 location!  Do this in SiTechExe" (or Park 2, or 3)
"Successfully Went To Park Location 1" (or 2 or 3)

String  CommandString("SiTechExeStatus")
Returns all of the of the following status strings that are currently active, separated by a ", ".
This is the same as the message(s) displayed in the Status Line of SiTechExe.
"Faking Servos, 
Reading Servo Parms, 
Bad Scope Commun,
Sec Axis Over Pole,
Tracking,
Slewing,
Move By HandPad,
Not Initialized,
Scope Parked,
Parking Scope,
Below Horizon Limit,
Supervisory Stop,
Al/Dec Encdr Track Err,
Az/RA Encdr Track Err,
PointXP Crashed!,
Stopped"

******************Searching with SiTechExe*********************

String  CommandString("SearchDatabase, NGC7331, False")
For an example, have a look at the script file in the SiTechDataFolder named "SearchDatabase.vbs"

Returns the current Right Ascension and Declination (Epoch JNow) of a successful search and optionally performs a GoTo the object.

Return Values.  For the above object it will return:
"22.6308592, 34.509199, Mag=9.7,  Type=Galaxy, NGC7331, C30, Size=10.5 x 3.7 ArcMins"
Another example return value, for instance, CommandString("SearchDatabase, HD209409, True") and if it's below the horizon will return:
"22.069629, -2.071884, Mag=4.74, HIP=108874, HD=209409, HR=8402, SpectralType=B7IVe, Constellation=Aqr, Distance=435.5L.Y., Slew failed! Object Below Horizon Limit"
Other return values are:
"-1, 0, Object ASDFASDF Not Found. Search failed!"
"-1, 0, Problem with SkyView, try your search later!"
"-1, 0, No Database Search String Specified!"

If there are multiple objects found, it will return this message, for instance if you search for "Ring":
"-1, 0, More than one object found, RING is not specific enough."


String  CommandString("SearchAsteroid, 2010 RJ43, true, true")
For an example, have a look at the script file in the SiTechDataFolder named "SearchAsteroid.vbs"
For SearchAsteroid to work, you MUST have downloaded the file "astorb.dat" to the SiTechExe Database folder, and it Must be loaded.  You can download it from the SiTechExe Skyview, under menu item "Orbits"

Returns the current Right Ascension and Declination (Epoch JNow) of a successful asteroid search and optionally performs a GoTo the asteroid, and optionally will track the asteroid.

Return Values.  It is one long string, but there are ", " (comma's followed by a space) separating the lines. For the above asteroid it will  perform a GoTo to the asteroid, track the asteroid, and return:
"
21.192037, 39.431763, Asteroid Mag=22.14, 2010 RJ43, EarthDist=0.14588, SunDist=0.99446, Inclination=6.88, Eccentricity=0.49592, PerihelDist=0.44561, RARate=-0.08657 , DecRate=-0.09143
"

Another example return value, for instance, CommandString("SearchAsteroid, Ceres, True, True") and if it's below the horizon will return:
"1.564265, -0.972467, Asteroid Mag=8.11, Ceres, EarthDist=2.11145, SunDist=2.85125, Inclination=10.59, Eccentricity=0.07571, PerihelDist=2.55857, RARate=-0.00331 , DecRate=0.00246 ,  Slew failed! Object Below Horizon Limit"

Other return values are:
"-1, 0, Asteroids not loaded into SkyView..."
"-1, 0, Search String not long enough."
"-1, 0, Asteroid Search Failed."
"-1, 0, Exception in Asteroid Search"
"-1, 0, Couldn't find Asteroid lksadjfkas"
"-1, 0, Problem with SkyView, try your search later!"
"-1, 0, No Asteroid Search String Specified!"

SearchAsteroid returns the first found object.  For instance, a search for "2016" will return Heinemann, because it's number 2016.
But "2016 A" will return 2016 AU1, and "2016 AA" will return 2016 AA45, so you need to be specific.


String  CommandString("SearchComet, C/2014 L5, true, true")
For an example, have a look at the script file in the SiTechDataFolder named "SearchComet.vbs"
For SearchComet to work, you MUST have downloaded the file "astorb.dat" to the SiTechExe Database folder, and it Must be loaded.  You can download it from the SiTechExe Skyview, under menu item "Orbits"

Returns the current Right Ascension and Declination (Epoch JNow) of a successful comet search and optionally performs a GoTo the comet, and optionally will track the comet.

Return Values.  It is one long string, but there are ", " (comma's followed by a space) separating the lines. For the above comet it will  perform a GoTo to the comet, track the comet, and return:
"18.439419, 27.547323, Comet Mag=21.64, C/2014 L5 (Lemmon) MPC 95731, EarthDist=8.45402, SunDist=7.95168, Inclination=122.82, Eccentricity=1.00224, PerihelDist=6.20241, RARate=0.00285 , DecRate=-0.00237 "

Another example return value, for instance, CommandString("SearchComet, atlas, True, True") and if it's below the horizon will return:
"11.169583, 16.946875, Comet Mag=17.72, C/2015 X7 (ATLAS) MPC 10028, EarthDist=3.75021, SunDist=3.8494, Inclination=57.58, Eccentricity=1.00161, PerihelDist=3.68459, RARate=0.00753 , DecRate=0.00596 , Slew failed! Object Below Horizon Limit"
Note: ATLAS was discovered by a SiTech Control system on Haleakala! http://blog.fallingstar.com/

Other return values are:
"-1, 0, Comets not loaded into SkyView..."
"-1, 0, Search String not long enough."
"-1, 0, Comet Search Failed."
"-1, 0, Exception in Comet Search"
"-1, 0, Couldn't find Comet lksadjfkas"
"-1, 0, Problem with SkyView, try your search later!"
"-1, 0, No Comet Search String Specified!"

SearchComet returns the first found object.  For instance, a search for "pan" will return P/2010 T2 (PANSTARRS) MPC 74248, but there are many more PanStarrs in the database, so you need to be specific.

Have FUN, and let me know if you have problems or find bugs.
grayarea
atSymbol
siderealtechnology.com