ELBRUS: COMMUNICATION WITH OTHER PROGRAMS.
( 1 ) SENDING COMMAND TEXT FILES
Elbrus can communicate with other programs by exchanging plain text files.
You can also execute it from a VB script file or launch it from a MS-DOS command line.
When in "Wait for message" automatic mode, the program will look, every second, at the 'images' mailbox folder and see if there is a new 'command' file. Command file must be named elbrus.txt and must obey special rules in order to be understood.
To inform the outer world about the actual status, Elbrus writes files elbrus.sta into the same 'images' mailbox folder.
Launch the automatic 'Wait for message' mode
Sending to Elbrus a command file
Command codes
(2)Receiving from Elbrus the status file
(3)Executing Elbrus with command line arguments
(4)Executing Elbrus from VB script files
(obs)Obsolete file formats
Launch the automatic 'Wait for message' mode:
For that, launch the 'Wait for message' working mode.

Now, once per second, the program will look at the "Images" folder and see if there is a new 'command' file.
Sending to Elbrus a command file:
You have to put a text file named elbrus.txt into the "Images" folder (menu 'Others / Edit parameters / Folders / Images').
This file must obey special rules in order to be understood.
You can see bellow a description of the elbrus.txt command file format.
This elbrus.txt file must have at least 4 text lines.
The first line of the file must contain the text "1.- Elbrus command file".
The second line of the file must begin with the text "2.-" followed by some descriptive comment.
The following lines of the file are divided in groups of two lines:
The first line of each group is the code line: contains the name of the command to be executed.
The second line of the group is the value line: contains the value used by the command.
In other words, each command occupies two lines, one with the name of the command and another for the parameter value.
Here are two examples of elbrus.txt command file


IMPORTANT NOTES:
While the command file is read:
--if the command sets a parameter's value (**SET ...), then the parameter is updated immediately.
--if the command is for executing an action ( **EXE..... ), this action is executed only after the file is fully read.
--if there are more than one **EXE... action in the file, only the last one is executed.
--if an error occurs while reading the file, the reading of the file is abandoned.
--You need to set only the parameters whose value you want to modify. For example if you send a file with an unique **EXE analyze command, the image will be analyzed with the actual parameters values and the actual program configuration.
--The word 'space' in the value line after some **EXE commands, means " put some text here, no matter what", but don't leave this line empty.
Bellow we give the complete list of the commands you can use. In this listing the first line is just a reference number not used anywhere else. The second line is the code name of the command plus some explanatory text. You must use this code name with no modification if you want Elbrus to understand it.
The third line is the value type you must use for the parameter value.
Commands to execute something:
a Commands
a01
**EXE analyze
space
a02
**EXE synchronize
space
a03
**EXE loadParamFile
The full path and name of the file
a04
**EXE saveParamFile
The full path and name of the file
a05
**EXE saveSearchSummary
The full path and name of the file
a06
**EXE fineAdjustAngle
space
a07
**EXE referenceImage
space
a08
**EXE mode
long 0,1,2,...7 image origin
Mode code values:
-- mode = 0: manual mode. Selected image path.
-- mode = 1: manual mode. Image from last message in the 'images' folder.
-- mode = 2: manual mode. Most recent image in the 'images' folder.
-- mode = 3: not used.
-- mode = 4: not used.
-- mode = 5: automatic mode. Wait for message.
-- mode = 6: automatic mode. Wait for image.
Use this command with care.
a09
**EXE exitElbrus
space
Ends the program.
Commands to set a parameter value:
b General organisation:
b01
**SET distancesFolder
non null string
b02
**SET starsFolder
non null string
b03
**SET mailBoxFolder
non null string
b04
**SET language
long 0,1,2
0 = english, 1 = spanish, 2 = french
b05
**SET showErrorMessages
long 0,1
0 = don't show
d Optics:
d01
**SET imageAngle
double 0...360
d02
**SET arcSecPerPixel
double
d03
**SET focalInPixels
double
d04
**SET reversedImage
long 0,1
0 = not reversed, 1 = reversed
e Image properties
e01
**SET imagePath
The full path and name of the image file
f Image scanning
f01
**SET imageArea
long 0,1,2
0 = the full image, 1 = inside the box, 2 = outside the box
f02
**SET xMin
long > 0
The xMin of the rectangle box
f03
**SET xMax
long > 0
The xMan of the rectangle box
f04
**SET yMin
long > 0
The yMin of the rectangle box
f05
**SET yMax
long > 0
The yMax of the rectangle box
f06
**SET automaticThreshold
long 0,1
0 = No, 1 = Yes
f07
**SET threshold
double 0.000 ... 1.000
f08
**SET minPerimeter
long 0,... 20
f09
**SET maxPerimeter
long 10,...100
f10
**SET selectedStars
long 5,...10
g Sky searching
g01
**SET skyZone
long 1,... 9
Sky area code values:
-- skyArea = 1: the elementary sky window (typically 5 x 5 degrees). See also searchWindowType.
-- skyArea = 2: spherical ring.
-- skyArea = 3: the full sky.
-- skyArea = 4: 30 x 30 degrees field.
-- skyArea = 5: not used.
-- skyArea = 6: not used.
-- skyArea = 7: not used.
-- skyArea = 8: along the parallel of latitude.
-- skyArea = 9: along the meridian.
g02
**SET objectCoordinatesFrom
long 1,... 5
0= from combos
1= from fits header
2= from Cartes Du Ciel
3= from DDE
4= from the message
5= from ASCOM telescope
The supposed coordinates of the image. The searching center coordinates.
g03
**SET RAsearchingCentreInMessage
double 0,... 360
used when **SET objectCoordinatesFrom = 4
g04
**SET DECsearchingCentreInMessage
double -90...+90
used when **SET objectCoordinatesFrom = 4
g05
**SET searchWindowType
long 0,... 3
0 = 5x5 degrees window fixed angle
1 = 2x2 degrees window any angle
2 = 40x40 minutes window any angle
3 = 5x5 degrees window dual angle
Used only when skyZone = 1.
g06
**SET skyRingFromDec
long -90,... 89
Used when skyZone = 2: spherical ring.
g07
**SET skyRingToDec
long -89,... 90
Used when skyZone = 2: spherical ring.
g08
**SET stopSearchingWhenSides
long 10,... 45
h When successfully solved
h01
**SET ASCOMtelescope
non null string
h02
**SET telescopeToSynchronize
long 0,... 3
0= none, 1= ASCOM, 2= Cartes du Ciel, 3= by DDE
h03
**SET autoSynchronize
long 0, 1
0 = No, 1 = Yes
h04
**SET sidesForAutoSync
long 10,... 45
h05
**SET synchronizeUsingCurrentEquinox
long 0, 1
0 = No, 1 = Yes
h06
**SET autoAddWCStoHeader
long 0, 1
0 = No, 1 = Yes
h07
**SET sidesForAutoAddWCStoHeader
long 10,... 45
i Internal working parameters
i01
**SET mainWindowTop
long >= 0
i02
**SET mainWindowLeft
long >= 0
i03
**SET mainWindowWidth
long > 0
i04
**SET mainWindowHeight
long > 0
i05
**SET RAsearchingCentreInCombos
double 0,... 360
i06
**SET DECsearchingCentreInCombos
double -90...+90
You can go to the next page:
( 2 ) Receiving from Elbrus the status file.
(Updated November 23, 2008 Alfonso Pulido)