[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Observational session control
Here are a few ideas....
I had thought a little about the same problem. My idea was
to use a two step process. In the first step you create
a file like the one you describe that specifies what you
wouold LIKE to observe. You send this file to a program
that "compiles" this whish list into a set of lower level
commands, each paired with a time tag.
Next there is yet another program that reads the time tagged file
ad issures the commands directly to the real time controller.
The real-time controller only sees lower level stuff like
POINT_TO <ra, dec>
TRACK
EXPOSE_IMAGE
POINT_TO <ra, dec>
TRACK
EXPOSE_IMAGE
...
So there are two command formats "wish list" and "time tagged
primitives" with a compiler/optimizer that does the translation.
Technically speaking, I was going to use in interpeter to do the
translation. The interpeter and therefore the "wish list"
language would allow loops, if statements and full arithmatic
expressions, variable and so on. A lot of work? No, the
"wish list" language is TCL. All you need to do is define a
few functions in TCL like "park <time>" then if for some wierd
reason you want to park the telescope twice you could
write
foreach time ($firsttime $secondtime) park $time
are whatever the TCL syntax is, I forget.
but you get the point, "park $time" is executed twice with two
values of $time.
What "park" is access a model of the Mk IV and see if it is possible
for the "move_to_home_loc" command to execute at $time. Maybe
it can't because there is some other command active at $time.
Now if that other command is marked "movable" and has lower priority
then does "park" it gets moved.
What I found was that some people want to run ithe Mark IV in a scan
pattern while others want to hit specific feilds. Some will
want to do both. So I needed TCL's programability as part of
the.
Here is one possable control program that Tom might use.
(I don't like TCL much anymore as you can see) notice there
are no times.
while (ItIsDarkOutside())
{
point_relative (-30, 0) # full RA limit and dec=0
expose_dark(100) # Do a dark while mount moves
track # follow the stars
expose_image(100) # 100 second exposure
expose_image(100) # 100 second exposure
expose_image(100) # 100 second exposure
expose_image(100) # 100 second exposure
}
park
I might want to add this line to the above loop to catch so things
that happen to pass by while I'm scanning
If (distance( GetCurrentLoc(), SomeCoolObject) {
point_absolute(SomeCoolObject)
expose_image(100)
}
Loads of work how far did I get?
1) I built a TCL interface to the real-time controller's socket
interface
2) I have the program which reads the time tagged low level
file and spools it down the real-time controller's socket interface.
The reason is
1) Your "whish list" may not actually work. It is easy to over commit
the hardware. So you need to run the scheduler/optimizer in
advance so that the optimizer can "move" a command back in time if
it needs to.
2) IMO a real-time controler should NOT also be a scheduler. It
is just plain cleaner to make two programs. Connect them with
a pipe if you must.
3) Allows the possibility of multiple "wish list" formats. Give
others a chance to make a better verson. It also allows
say a GUI or web based from end so the "wish list TCL' format
becomes one of many ways to talk to a Mk IV.
--- "Creager, Robert S" <CreagRS@LOUISVILLE.STORTEK.COM> wrote:
>
> Hey folks,
>
> I'll be working on a program which will take a set of desired
> observational
> data and direct the Mark IV through a TAIT socket interface. The
> initial
> command set could be as follows:
>
> dark <count> # How many dark exposures to take through out the night
> bias <count> # How many bias exposures to take through out the
> night
> start <time> # The time in hours (fractional also) to delay
> after
> sunset before starting
> park <time> # The time in hours (fractional also) to park before
> sunrise
>
> field <location and count> # The location and number of exposures
> desired for a field.
> # exposures would be evenly spaced through
> out the night
> follow <location> # follow the
> scan # continually takes individual pictures at some configured
> degree intervals
> # these locations would be tracked so "equal" coverage would
> occur
>
> The priority would be <field>, <follow>, <scan>, with multiple
> entries in
> <field> and <follow> being first come, first seen and tracked. For
> simplicity, <follow> would track the first available location till it
> sets,
> with forays into <field> when appropriate. Once the locations sets,
> the
> next available <field> would be tracked.
>
> I figured this would be a good simple start, but what do you think?
> Since I
> have not written any software yet, I'd love to hear that there is a
> grammar
> that's already specked, or public software already written, or this
> is
> really bad and you should do the grammar like this, or you really
> should
> include this and that and the other thing...
>
> Future enhancements would include ability to set maximum
> airmass/zenith for
> the entire session and/or individual <field> and <follow>,
> pre-emptive
> control (like from an e-mail alert or something), priority
> assignments for
> <follow> to jump to a new <follow> location without waiting for the
> first to
> set, observation date ranges (which could be open ended on either
> start/stop) for <field> and <follow>, moon phase and distance
> specifications
> for session, <field> and <follow>. Anything else?
>
> First pass, the input commands would be file based, with
> interruptions
> handled by sockets. Support would likely be added for a dB at some
> point.
> Maybe even a graphical construction environment (yea, right).
>
> Cheers,
> Rob
>
> Robert Creager
> Senior Software Engineer
> ATS Library Engineering
> 303.673.2365 V
> 303.661.5379 F
> 888.912.4458 P
> StorageTek
> INFORMATION made POWERFUL
>
>
>
=====
Chris Albertson
Home: 310-376-1029 chrisalbertson90278@yahoo.com
Cell: 310-990-7550
Office: 310-336-5189 Christopher.J.Albertson@aero.org
__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/