insgen then uses a least cost insertion algorithm to make the decisions to generate a schedule of observations and publish the results in the Database.
You may want to also read about the insgen DETAILS or look at the Messier marathon.
Request.ReasonBad
to
NULL (unless nopublish)Schedule
table (unless nopublish)Request.Interval, Request.Twilight
etc to
be specified in the database rather than relying on internal default values.
Requests may be entered by:
Request.Count > Request.NumberDone
Request.Count == NULL
It then goes through the Log table and skips Requests that have either:
Log.Success==0
)
Request.Interval
hours (Log.Success==1
) The second part involving the Interval
is a bit complex
see the discussion below on short interval observations.
The success and failure checks mentioned above do not apply when using the reqid= command line option.
Request.ReasonBad
column set to non NULL value.
This is different than skipping them as Rejected requests can never be
scheduled.
Here are the reasons that a request may be rejected:
no request found
- specified RequestID not foundno Xxxx
- parameter Xxxx is NULL in the databasenorth limit
- declination too bigsouth limit
- declination too smallaltitude limit
- always below airmass or telescope alt limitno UTStart, SunStart or Coordinate
- can't find windowno obstime
- can't determine observing time UTStart not HMS
- non sexagesimal formatno RA found
- scheduled by Transit but RA missing no Dec found
- scheduled by Transit but Dec missing both UTStart and SunStart
- pick one or the otherRequest.ObsTime
is not NULL, it uses that figure (in seconds).
Otherwise it generates an estimate by taking the sum of the following:
ccd_status
command.
The constants in the program to calculate the above have been adjusted
to get reasonable agreement with reality.
The BlockTime in seconds is published in Schedule.BlockTime
.
Request.Airmass
and are with the telescope limits.Request.Twilight
value. The UTStart case occurs
if Request.UTStart
is not NULL,
The SunStart case occurs
if Request.SunStart
is not NULL,
Request.Interval
is shorter than the
the VISBILE window, the window is chopped into smaller
VISIBLE windows each with its own BEST spot.
insgen will use only the sub window that who's end time is soonest
after the present time.
When insgen is run at a later time, the later windows will be scheduled.
The interaction with telco will hopefull cause the target
to be observed every Request.Interval
seconds.
The observation will be skipped if either of the following are true:
Request.MoonPhase
Request.MoonDistance
If Request.UTStart
or Request.SunStart
are
used to schedule the request, or if insgen is run with
the nomoon option, the request will be scheduled regardless of the moon.
Request.Priority
(bigger is better) insgen attempts to generate a schedule where each object is
observed as close to its ideal time as possible.
The list is then generated by taking each request
and trying each of the following steps :
If the request cannot be scheduled with any of the three methods, it is
skipped.
Cost is defined as the sum of the squares of
the time displacement of the requests pushed.
SKIPPING
There are several reasons a request may not be scheduled on a
given night and will be skipped.
When this occurs Schedule.StartTime
will be NULL and
that Schedule.Reason
will have one of the following
values:
nospace
- too many observations in front of itwindow too short
-
the target is not up long enough to observenot up tonight
- never up during nighttimetoo close to the moon
- moon distance less than Request.Moondist
done recently
- if the request has been done in the
Request.Interval
(import only)failed x.x hours ago"
- recently failed (import only)PROGRAM OUTPUT
Used without debugging options, arguments the output is something like this:
2009-12-27T23:47:37Z insgen
reqid=00138 REJECTED altitude limit
reqid=00140 REJECTED altitude limit
...
reqid=00179 SKIPPED too close to moon 10
reqid=00164 SKIPPED not up tonight
reqid=00207 SKIPPED not up tonight
reqid=00206 SKIPPED not up tonight
...
reqid=00191 START=2009-12-28T02:03:10Z 340 M57
reqid=00190 START=2009-12-28T02:08:50Z 340 M56
reqid=00205 START=2009-12-28T02:14:30Z 340 M71
reqid=00161 START=2009-12-28T02:20:10Z 340 M27
The first is the ISO time that the schedule was created.
This is followed by three blocks:
The first block are the rejected requests.
The second block, the skipped and the final are the scheduled requests.
The reasons for rejection and skipping are stated after the request ID.
The last block is for the scheduled requests listing
the start time, block time and name respectively.
PUBLISHING RESULTS
Having generated a list, insgen
clear then writes the following information in the
Schedule table.
Schedule.UpStart
- the DateTime of the beginning of UP
windowSchedule.UpEnd
- the DateTime of the end of UP
windowSchedule.BestStart
- the DateTime of the beginning of BEST
windowSchedule.BestEnd
- the DateTime of the end of BEST
windowSchedule.NightStart
- the DateTime of the beginning of NIGHT
windowSchedule.NightEnd
- the DateTime of the end of NIGHT
windowSchedule.StartTime
- best starting time (NULL if not scheduled)Schedule.BlockTime
- calculated length of observation in secondsSchedule.Reason
- the reason for omitting observation from the schedule (NULL if scheduled)insgen is a bit erratic about scheduling objects that have two observing windows during the night.
No optimization of declination nor dome moves is made. Only hour angle positioning is treated.
When used with short intervals, only one observation will appear scheduled during the night.
debug= setting the value to the OR'ed combination of the following leads yields even more output. Repeating the statement may lead to even more debug output
#define DEBUG_REQUEST 0x01 #define DEBUG_GROUP 0x02 #define DEBUG_QUERY 0x04 #define DEBUG_COORD 0x08 #define DEBUG_LIST 0x10 #define DEBUG_CLOCK 0x20 #define DEBUG_SERVER 0x40You can preface the value with "0x" for hexadecimal.
debug - uses a debug value that varies depending on what I was attempting to inspect when it was last compiled.
import - queries the Request
table in the database
for active requests.
See above for definition.
iso= sets the clock to the ISO8601 time rather than the current time. ISO time is of the format YYYY-MM-DDTHH:MM:SSZ. For example: 2009-12-27T23:47:37Z.
nomoon- does not do the moon avoidance algorithm.
nogenerate - doesn't generate the list, just reads the requests.
nopublish - reads the requests, generates the list but doesn't update the database Window, Schedule and Skipped tables.
nosort - doesn't sort the input requests as discussed above.
Instead the order specified on the command line using reqid=
's or import
is used.
reqid= queries the Request
table as above but
only for the requests submitted by specified RequestID.
Multiple instances of this option can be put on the command line.
insgen importFor testing you might like to see the calls to the database and information about the group windows but not actually re-run them.
insgen nopublish debug=0x06 importFor testing some of the details of three requests.
insgen nopublish debug reqid=370 reqid=395 reqid=4444 nosort