GCN
                INTERNET  SOCKET  PACKET  DEFINITION  DOC
            Scott Barthelmy       05 Dec 94  (revised 07 Mar 09)


MODS:  The material in this document on KONUS_Lightcurve and SNEWS notices
       is not quite settled.                                      31jul04
       The watchdog timeout flag bit in SWIFT_FOM_OBS
       moved from 2^25 to 2^29 (to be like all the others).       06apr06
       The MILAGRO notice has been finalized.                     12may06
       The material for GLAST is nearly stable at this time,
       and should be used for guidance as to what things
       will look like for launch/operations.                      16oct06
       Added the catnum to BAT_POS packet.                        12apr07
       Change the definition of the TRIG_ID 2^11 bit
       in the Swift/BAT_POS (and LC, FOM, SLEW, TRANS  packets
       (from 0.0 to 6.5 sigma).                                   04may07
       Added GLAST_LAT_GRB_POS_TEST.                              12may07
       Finished the GLAST OBS_REQUEST and REQUEST_REPONSE.        13may07
       More stuff in the GLAST_LAT_INI/UPD/FIN.                   15may07
       Start the AGILE stuff.                                     16may07
       Added 'misc' field to SWIFT_POINTDIR.
       Added the near_brt_star flagbit to Swift, AGILE, and GLAST.30may07
       Tweaked the GLAST_LAT types.                               02jun07
       Added the Gnd-generated bit to the Swift_PointDir Misc.    13jun07
       Added the Swift-BAT_SUBTHRESHOLD type.                     21jun07
       Added the galaxy coincidence flag bits to Sift-BAT_POS/_TRANS/_TEST
       and XRT_POS/_IMAGE.                                        27jun07
       Added the galaxy coincidence flag bits to Sift-BAT_LC and _SM
       and FOM_OBS and SC_SLEW.                                   30jun07
       Added the Swift-BAT_SLEW_GRB_POSITION type.                30sep07
       Added the 2^14 bit to SolnStatus in SWIFT_BAT_GRB_POS and
       SWIFT_XRT_POS.                                             11jan08
       Move GLAST_GBM_LC from 112 to 113; added POS_UPD as 112.   19jan08
       Added the 2^5, 2^14, 2^15 and 2^30 bit fields to PKT_MISC
       in XRT_POS_CENTROID.                                       26jan05
       Added the 2^29 bit field to the PKT_MISC in XRT_POS_CENTROID.
                                                                  13feb08
       Several changes to the GLAST_LAT_INI/UPD/FIN/TRANS/TEST.   18feb08
       Added the 3 e_range bits to the MISC field in BAT_SLEW_POS.24feb08
       Added the 'far_away' bit to MISC in XRT_IMAGE and _POS.    03apr08
       Added 'rmvd_catalog' bit to 'soln_status' in BAT_POS/LC/SM/FOM/SLEW.
                                                                  12apr08
       Added XRT-BAT_position distance to XRT_POSITION.
       Added UVOT-XRT_position distance to UVOT_POSITION.         14apr08
       Added AGILE_POINTDIR.                                      20apr08
       Added SIMBAD/NED Results.                                  11jun08
       Added many flagbits toTRIG_ID and MISC for the AGILE and
       GLAST packets.                                             06jul08
       Added the IPN_RAW definition.                              18jul08
       About a dozen changes/additions to the GLAST-GBM pkts.     03aug08
       Changed all GLAST to FERMI.                                27aug08
       Added internal/scratch field to slot 38 in IPN_RAW.        18sep08
       Added hi-precission error to XRT_POS and UVOT_POS.
       Fixed the defintion of "burst_error" in UVOT_POS.          19sep08
       Added Trig_Signif and Lon,Lat to Fermi-GBM_ALERT.          04oct08
       Added Trigger_Duration to Fermi-GBM_FLT_POS.               04oct08
       Added missing definition for bit 22 in MISC in SWIFT_FOM.  27oct08
       Added the TOO-initiated forms of SWIFT_FOM and _SLEW.      08nov08
       Improved IPN_POS description.                              11jan09
       Changed XTE-PCA_Alert and XTE_ASM_TRANS to NLA.            21jan09
       Added the spatial and temporal coincidence bits to the IPN_POS,
       KONUS_LC, INTEGRAL_SPIACS/_WAKEUP/_REFINED/_OFFLINE, SWIFT_BAT_GRB_ALERT,
       SWIFT_BAT_GRB_POS, SWIFT_XRT_POS, SWIFT_UVOT_POS, SWIFT_BAT_SUBTHRESHOLD,
       SWIFT_BAT_TRANS, SWIFT_BAT_SLEW_GRB_POS, AGILE_GRB_WAKEUP/_GROUND/_REFINED,
       FERMI_GBM_ALERT, FERMI_GBM_FLT_POS, FERMI_GBM_GND_POS,
       FERMI_LAT_GRB_POS_INI/_UPD/_DIAG, FERMI_LAT_GND_REF/_TRIG. 24jan09
       Improved the definition of the Fermi-LAT "temp_stat" and
       "image_stat" fields.                                       18feb09



TABLE OF CONTENTS:
      INTRODUCTION:
            Scope
            Variations in Packeting Format
            Integer vs Floating Point
            Byte and Word Order
            Obtaining an e-copy
      PACKET NAME vs TYPE NUMBER
      COMPARING THE TYPE=1,2,3,4,11,21,22,24-45,51-55,58-59,60-99,110-113,118-130 CONTENTS/FORMATS
      PACKET ITEM MACROS
      TYPE=1 PACKET CONTENTS (BATSE_ORIGINAL)              [NO LONGER AVAILABLE]
            Packet Item Descriptions
      TYPE=2 PACKET CONTENTS (Test coords)
            Packet Item Descriptions
      TYPE=3 PACKET CONTENTS (Imalive)
            Packet Item Descriptions
      TYPE=4 PACKET CONTENTS (Kill)
      TYPE=11 PACKET CONTENTS (BATSE_MAXBC)                [NO LONGER AVAILABLE]
            Packet Item Descriptions (only those unique to type=11)
      TYPE=21 PACKET CONTENTS/DESCRIPTION (Bradford Test)  [NO LONGER AVAILABLE]
      TYPE=22 PACKET CONTENTS/DESCRIPTION (BATSE_FINAL)    [NO LONGER AVAILABLE]
      TYPE=24 PACKET CONTENTS/DESCRIPTION (BATSE_LOCBURST) [NO LONGER AVAILABLE]
      TYPE=25 PACKET CONTENTS (ALEXIS)                     [NO LONGER AVAILABLE]
            Packet Item Descriptions (only those unique to type=25)
      TYPE=26 PACKET CONTENTS (XTE-PCA Alert)              [NO LONGER AVAILABLE]
            Packet Item Descriptions (only those unique to type=26)
      TYPE=27 PACKET CONTENTS (XTE-PCA Source)
            Packet Item Descriptions (only those unique to type=27)
      TYPE=28 PACKET CONTENTS (XTE-ASM Alert)              [NOT YET AVAILABLE]
      TYPE=29 PACKET CONTENTS (XTE-ASM Source)
            Packet Item Descriptions (only those unique to type=29)
      TYPE=30 PACKET CONTENTS (COMPTEL)                    [NO LONGER AVAILABLE]
      TYPE=31 PACKET CONTENTS (IPN_Raw)
            Packet Item Descriptions
      TYPE=32 PACKET CONTENTS (IPN_Segment)                [WILL BE RE-AVAILABLE]
            Packet Item Descriptions (only those unique to type=32)
      TYPE=33 PACKET CONTENTS (SAX-WFC Alert)              [NOT AVAILABLE]
      TYPE=34 PACKET CONTENTS (SAX-WFC Source)             [NO LONGER AVAILABLE]
            Packet Item Descriptions (only those unique to type=34)
      TYPE=35 PACKET CONTENTS (SAX-NFI Alert)              [NOT AVAILABLE]
      TYPE=36 PACKET CONTENTS (SAX-NFI Source)             [NO LONGER AVAILABLE]
            Packet Item Descriptions (only those unique to type=36)
      TYPE=37 PACKET CONTENTS (RXTE-ASM_XTRANS)            [NO LONGER AVAILABLE]
            Packet Item Descriptions (only those unique to type=37)
      TYPE=38 PACKET CONTENTS (spare for development testing)
      TYPE=39 PACKET CONTENTS (IPN_Position)
            Packet Item Descriptions (only those unique to type=39)
      TYPE=40 PACKET CONTENTS (HETE_S/C_ALERT Source)      [NO LONGER AVAILABLE]
            Packet Item Descriptions
      TYPE=41 PACKET CONTENTS (HETE_S/C_UPDATE Source)     [NO LONGER AVAILABLE]
            Packet Item Descriptions (only those unique to type=41)
      TYPE=42 PACKET CONTENTS (HETE_S/C_LAST Source)       [NO LONGER AVAILABLE]
            Packet Item Descriptions (only those unique to type=42)
      TYPE=43 PACKET CONTENTS (HETE_GROUND_ANALYSIS Source)[NO LONGER AVAILABLE]
            Packet Item Descriptions (only those unique to type=43)
      HETE FLAG BITS  VS  NOTICE TYPE
      TYPE=44 PACKET CONTENTS (HETE_Test Source)
      HETE-BASED PACKET ITEM MACROS
      TYPE=45 PACKET CONTENTS (GRB_COUNTERPART Source)
            Packet Item Descriptions
      TYPE=46 PACKET CONTENTS (SWIFT_TOO_FOM_OBSERVE)
            Packet Item Descriptions
      TYPE=47 PACKET CONTENTS (SWIFT_TOO_SC_SLEW)
            Packet Item Descriptions
      TYPE=51 PACKET CONTENTS (INTEGRAL_POINTDIR)
            Packet Item Descriptions
      TYPE=52 PACKET CONTENTS (INTEGRAL_SPIACS)
            Packet Item Descriptions
      TYPE=53 PACKET CONTENTS (INTEGRAL_WAKEUP Source)
            Packet Item Descriptions
      TYPE=54 PACKET CONTENTS (INTEGRAL_REFINED Source)
            Packet Item Descriptions
      TYPE=55 PACKET CONTENTS (INTEGRAL_OFFLINE Source)
            Packet Item Descriptions
      TYPE=56 PACKET CONTENTS (OGLE Source)                [NOT YET AVAILABLE]
            Packet Item Descriptions
      TYPE=57 PACKET CONTENTS (SNEWS Source)               [NOT YET AVAILABLE]
            Packet Item Descriptions
      TYPE=58 PACKET CONTENTS (MILAGRO Source)             [NO LONGER AVAILABLE]
            Packet Item Descriptions
      TYPE=59 PACKET CONTENTS (KONUS_Lightcurve)           [NOT YET AVAILABLE]
            Packet Item Descriptions
      TYPE=60 PACKET CONTENTS (SWIFT_BAT_GRB_ALERT)
            Packet Item Descriptions
      TYPE=61 PACKET CONTENTS (SWIFT_BAT_GRB_POSITION Source)
            Packet Item Descriptions
      TYPE=62 PACKET CONTENTS (SWIFT_BAT_GRB_NACK_POSITION)
            Packet Item Descriptions
      TYPE=63 PACKET CONTENTS (SWIFT_BAT_GRB_LIGHTCURVE)
            Packet Item Descriptions
      TYPE=64 PACKET CONTENTS (SWIFT_BAT_SCALED_MAP)       [NOT AVAILABLE TO THE PUBLIC]
            Packet Item Descriptions
      TYPE=65 PACKET CONTENTS (SWIFT_FOM_OBSERVE)
            Packet Item Descriptions
      TYPE=66 PACKET CONTENTS (SWIFT_SC_SLEW)
            Packet Item Descriptions
      TYPE=67 PACKET CONTENTS (SWIFT_XRT_POSITION Source)
            Packet Item Descriptions
      TYPE=68 PACKET CONTENTS (SWIFT_XRT_SPECTRUM)
            Packet Item Descriptions
      TYPE=69 PACKET CONTENTS (SWIFT_XRT_IMAGE)
            Packet Item Descriptions
      TYPE=70 PACKET CONTENTS (SWIFT_XRT_LIGHTCURVE)
            Packet Item Descriptions
      TYPE=71 PACKET CONTENTS (SWIFT_XRT_NACK_POSITION)
            Packet Item Descriptions
      TYPE=72 PACKET CONTENTS (SWIFT_UVOT_IMAGE)
            Packet Item Descriptions
      TYPE=73 PACKET CONTENTS (SWIFT_UVOT_SRC_LIST)
            Packet Item Descriptions
      TYPE=74 PACKET CONTENTS (SWIFT_FULL_DATA_INIT)          [NOT YET AVAILABLE]
            Packet Item Descriptions
      TYPE=75 PACKET CONTENTS (SWIFT_FULL_DATA_UPDATE)        [NOT YET AVAILABLE]
            Packet Item Descriptions
      TYPE=76 PACKET CONTENTS (SWIFT_BAT_GRB_LIGHTCURVE_PROC) [NOT YET AVAILABLE]
            Packet Item Descriptions
      TYPE=77 PACKET CONTENTS (SWIFT_XRT_SPECTRUM_PROC)
            Packet Item Descriptions
      TYPE=78 PACKET CONTENTS (SWIFT_XRT_IMAGE_PROC)
            Packet Item Descriptions
      TYPE=79 PACKET CONTENTS (SWIFT_UVOT_IMAGE_PROC)
            Packet Item Descriptions
      TYPE=80 PACKET CONTENTS (SWIFT_UVOT_SRC_LIST_PROC)
            Packet Item Descriptions
      TYPE=81 PACKET CONTENTS (SWIFT_UVOT_POSITION Source)
            Packet Item Descriptions
      TYPE=82 PACKET CONTENTS (SWIFT_BAT_GRB_POS_TEST Source)
            Packet Item Descriptions
      TYPE=83 PACKET CONTENTS (SWIFT_POINTDIR)
            Packet Item Descriptions
      TYPE=84 PACKET CONTENTS (SWIFT_BAT_TRANS Source)
            Packet Item Descriptions
      TYPE=85 PACKET CONTENTS (SWIFT_XRT_THRESHPIX)           [NOT AVAILABLE TO THE PUBLIC]
            Packet Item Descriptions
      TYPE=86 PACKET CONTENTS (SWIFT_XRT_THRESHPIX_PROC)      [NOT AVAILABLE TO THE PUBLIC]
            Packet Item Descriptions
      TYPE=87 PACKET CONTENTS (SWIFT_XRT_SPER)                [NOT AVAILABLE TO THE PUBLIC]
            Packet Item Descriptions
      TYPE=88 PACKET CONTENTS (SWIFT_XRT_SPER_PROC)           [NOT AVAILABLE TO THE PUBLIC]
            Packet Item Descriptions
      TYPE=89 PACKET CONTENTS (SWIFT_UVOT_NACK_POSITION)
            Packet Item Descriptions
      TYPE=98 PACKET CONTENTS (SWIFT_BAT_SUBTHRESHOLD_POSITION Source) [NOT YET AVAILABLE]
            Packet Item Descriptions
      TYPE=99 PACKET CONTENTS (SWIFT_BAT_SLEW_GRB_POSITION Source)
            Packet Item Descriptions
      TYPE=100 PACKET CONTENTS (SuperAGILE_GRB_POS_WAKEUP Source)
            Packet Item Descriptions
      TYPE=101 PACKET CONTENTS (SuperAGILE_GRB_POS_GROUND Source)
            Packet Item Descriptions
      TYPE=102 PACKET CONTENTS (SuperAGILE_GRB_POS_REFINED Source)
            Packet Item Descriptions
      TYPE=107 PACKET CONTENTS (AGILE_POINTDIR)
            Packet Item Descriptions
      TYPE=108 PACKET CONTENTS (SuperAGILE_TRANS Source)      [NOT YET AVAILABLE]
            Packet Item Descriptions
      TYPE=109 PACKET CONTENTS (SuperAGILE_GRB_POS_TEST Source)
            Packet Item Descriptions
      TYPE=110 PACKET CONTENTS (FERMI_GBM_ALERT)
            Packet Item Descriptions
      TYPE=111 PACKET CONTENTS (FERMI_GBM_FLT_POS Source)
            Packet Item Descriptions
      TYPE=112 PACKET CONTENTS (FERMI_GBM_GND_POS Source)
            Packet Item Descriptions
      TYPE=113 PACKET CONTENTS (FERMI_GBM_LC)                 [NOT YET AVAILABLE TO THE PUBLIC]
            Packet Item Descriptions
      TYPE=114 PACKET CONTENTS (FERMI_GBM_GND_INT Source)     [NOT AVAILABLE TO THE PUBLIC]
            Packet Item Descriptions
      TYPE=118 PACKET CONTENTS (FERMI_GBM_TRANS Source)       [NOT YET AVAILABLE TO THE PUBLIC]
            Packet Item Descriptions
      TYPE=119 PACKET CONTENTS (FERMI_GBM_POS_TEST Source)
            Packet Item Descriptions
      TYPE=120 PACKET CONTENTS (FERMI_LAT_GRB_POS_INI Source) [NOT YET AVAILABLE TO THE PUBLIC]
            Packet Item Descriptions
      TYPE=121 PACKET CONTENTS (FERMI_LAT_GRB_POS_UPD Source) [NOT YET AVAILABLE TO THE PUBLIC]
            Packet Item Descriptions
      TYPE=122 PACKET CONTENTS (FERMI_LAT_GRB_POS_DIAG Source)[NOT YET AVAILABLE TO THE PUBLIC]
            Packet Item Descriptions
      TYPE=123 PACKET CONTENTS (FERMI_LAT_TRANS Source)       [NOT YET AVAILABLE TO THE PUBLIC]
            Packet Item Descriptions
      TYPE=124 PACKET CONTENTS (FERMI_LAT_GRB_POS_TEST Source)
            Packet Item Descriptions
      TYPE=125 PACKET CONTENTS (FERMI_OBS_REQUEST)            [NOT YET AVAILABLE]
            Packet Item Descriptions
      TYPE=126 PACKET CONTENTS (FERMI_SC_SLEW)                [NOT YET AVAILABLE]
            Packet Item Descriptions
      TYPE=127 PACKET CONTENTS (FERMI_LAT_GND_REF Source)     [NOT YET AVAILABLE TO THE PUBLIC]
            Packet Item Descriptions
      TYPE=128 PACKET CONTENTS (FERMI_LAT_GND_TRIG Source)    [NOT YET AVAILABLE TO THE PUBLIC]
            Packet Item Descriptions
      TYPE=129 PACKET CONTENTS (FERMI_POINTDIR)
            Packet Item Descriptions
      TYPE=130 PACKET CONTENTS (SIMBAD/NED Search Results)
            Packet Item Descriptions
      COORDINATES EPOCH and QUANTIZATION COMPARISON




INTRODUCTION:

Scope:
This is the Socket Packet Format Specification Document.
It contains the complete format and contents of each of the packets that are
sent to GCN Internet socket sites.  This document lists only those packet types
available to the GCN Sites -- there are other packet types (not listed
in this doc) that are used for internal communication and processing
purposes within the GCN system (ie types 5-10, 12-20, 23, and 81-96).

Variations in Packeting Format:
Given the intrinsic variation of data types across all the missions,
it is not possible to have the same format for all packet types, nor is it
possible to have the same locations for those items that do appear
in more than one mission (packet type).  Whenever possible, herculean effort
was made to put the same items in standard locations within the packet.

Integer vs Floating Point:
The basic packet is 160 bytes composed of 40 long_words (4-byte integers).
Integers are used even for the intrinsically floating point quantities
so as to make the transfer between platforms and operating systems easier.
All floating point quantities have been scaled up to preserve the decimal
fraction and then integerized.  There are only two levels of scaling and
quantization.  For those coordinates source with relative large uncertainties,
the scaling is 100x [0.01 degrees].  And for those sources with better accuracy,
the scalling is 10,000x [0.0001 degrees].  All that remains for inter-platform
compatibility is possibly word and/or byte swapping.

Byte and Word Order:
These socket packets were originally created on a Sun Sparc platform
(which is a big-endian machine). But even though the packets are now
created on a small-endian machine, the byte order is adjusted back 
to the big-endian order just prior to being written out the socket 
connections.  This rotation is done to maintain format continuity
over the years.  If the GCN recipient site is small-endien machine,
you will have to perform byte and/or word swapping on the 40 long-word
fields to get them into a proper order for its computer.  The location
of the '\n' character within the last 4-byte field in the packet
can be used to diagnose the byte and/or word swapping necessary.

Obtaining an e-copy:
Most of this document is preformatted, so the user can easily get a copy
of this document by using the get_document_source command within
their browser and removing the purposely very small number of html-ism's.



PACKET NAME vs TYPE NUMBER

This table lists all the currently valid notices (by their name) versus
the packet type number.

     NUMBER   NAME              COMMENT

      1       BATSE_ORIGINAL    NO LONGER AVAILABLE
      2       Test
      3       Imalive
      4       Kill
     11       BATSE_MAXBC       NO LONGER AVAILABLE
     21       Bradford_TEST     NO LONGER AVAILABLE
     22       BATSE_FINAL       NO LONGER AVAILABLE
     24       BATSE_LOCBURST    NO LONGER AVAILABLE
     25       ALEXIS
     26       RXTE-PCA_ALERT    NO LONGER AVAILABLE
     27       RXTE-PCA
     28       RXTE-ASM_ALERT
     29       RXTE-ASM
     30       COMPTEL           NO LONGER AVAILABLE
     31       IPN_RAW
     32       IPN_SEGMENT       WILL BE RE-AVAILABLE
     33       SAX-WFC_ALERT     NOT AVAILABLE
     34       SAX-WFC           NO LONGER AVAILABLE
     35       SAX-NFI_ALERT     NOT AVAILABLE
     36       SAX-NFI           NO LONGER AVAILABLE
     37       RXTE-ASM_XTRANS   NO LONGER AVAILABLE
     38       spare/unused
     39       IPN_POSITION
     40       HETE_S/C_ALERT    NO LONGER AVAILABLE
     41       HETE_S/C_UPDATE   NO LONGER AVAILABLE
     42       HETE_S/C_LAST     NO LONGER AVAILABLE
     43       HETE_GNDANA       NO LONGER AVAILABLE
     44       HETE_Test
     45       GRB_COUNTERPART
     46       SWIFT_TOO_FOM_OBSERVE
     47       SWIFT_TOO_SC_SLEW
     51       INTEGRAL_POINTDIR
     52       INTEGRAL_SPIACS
     53       INTEGRAL_WAKEUP
     54       INTEGRAL_REFINED
     55       INTEGRAL_OFFLINE
     57       OGLE                             NOT YET AVAILABLE
     57       SNEWS                            NOT YET AVAILABLE
     58       MILAGRO                          NO LONGER AVAILABLE
     59       KONUS_LIGHTCURVE                 NOT YET AVAILABLE
     60       SWIFT_BAT_GRB_ALERT
     61       SWIFT_BAT_GRB_POSITION
     62       SWIFT_BAT_GRB_NACK_POSITION
     63       SWIFT_BAT_GRB_LIGHTCURVE
     64       SWIFT_BAT_SCALED_MAP             NOT AVAILABLE TO THE PUBLIC
     65       SWIFT_FOM_OBSERVE
     66       SWIFT_SC_SLEW
     67       SWIFT_XRT_POSITION
     68       SWIFT_XRT_SPECTRUM
     69       SWIFT_XRT_IMAGE
     70       SWIFT_XRT_LIGHTCURVE
     71       SWIFT_XRT_NACK_POSITION
     72       SWIFT_UVOT_IMAGE
     73       SWIFT_UVOT_SRC_LIST
     74       SWIFT_FULL_DATA_INIT             NOT YET AVAILABLE
     75       SWIFT_FULL_DATA_UPDATE           NOT YET AVAILABLE
     76       SWIFT_BAT_GRB_PROC_LIGHTCURVE    NOT YET AVAILABLE
     77       SWIFT_XRT_PROC_SPECTRUM
     78       SWIFT_XRT_PROC_IMAGE
     79       SWIFT_UVOT_PROC_IMAGE
     80       SWIFT_UVOT_PROC_SRC_LIST
     81       SWIFT_UVOT_POSITION
     82       SWIFT_BAT_GRB_POS_TEST
     83       SWIFT_POINTDIR
     84       SWIFT_BAT_TRANS
     85       SWIFT_XRT_THRESHPIX              NOT AVAILABLE TO THE PUBLIC
     86       SWIFT_XRT_THRESHPIX_PROC         NOT AVAILABLE TO THE PUBLIC
     87       SWIFT_XRT_SPER                   NOT AVAILABLE TO THE PUBLIC
     88       SWIFT_XRT_SPER_PROC              NOT AVAILABLE TO THE PUBLIC
     89       SWIFT_UVOT_NACK_POSITION
     98       SWIFT_BAT_SUBTHRESHOLD_POSITION  NOT YET AVAILABLE
     99       SWIFT_BAT_SLEW_GRB_POSITION
     100      SuperAGILE_GRB_POS_WAKEUP
     101      SuperAGILE_GRB_POS_GROUND
     102      SuperAGILE_GRB_POS_REFINED
     108      AGILE_POINTDIR
     108      SuperAGILE_TRANS                 NOT YET AVAILABLE
     109      SuperAGILE_GRB_POS_TEST
     110      FERMI_GBM_ALERT
     111      FERMI_GBM_FLT_POS
     112      FERMI_GBM_GND_POS
     113      FERMI_GBM_LC                     NOT YET AVAILABLE TO THE PUBLIC
     118      FERMI_GBM_TRANS                  NOT YET AVAILABLE TO THE PUBLIC
     119      FERMI_GBM_POS_TEST
     120      FERMI_LAT_GRB_POS_INI            NOT YET AVAILABLE TO THE PUBLIC
     121      FERMI_LAT_GRB_POS_UPD            NOT YET AVAILABLE TO THE PUBLIC
     122      FERMI_LAT_GRB_POS_DIAG           NOT YET AVAILABLE TO THE PUBLIC
     123      FERMI_LAT_TRANS                  NOT YET AVAILABLE TO THE PUBLIC
     124      FERMI_LAT_GRB_POS_TEST
     125      FERMI_OBS_REQUEST                NOT YET AVAILABLE
     126      FERMI_SC_SLEW                    NOT YET AVAILABLE
     127      FERMI_LAT_GND_REF                NOT YET AVAILABLE TO THE PUBLIC
     128      FERMI_LAT_GND_TRIG               NOT YET AVAILABLE TO THE PUBLIC
     129      FERMI_POINTDIR
     130      SIMBAD/NED_SEARCH_RESULTS



COMPARING THE TYPE=1,2,3,4,11,21,22,24-45,51-55,58-59,
60-89,98,99,100-102,107-109,110-113,118-130 CONTENTS/FORMATS:

The contents and formats of all the valid packets for distribution are listed
below.  The descriptions and definitions for each of the items within
the packets are given in the sections following each packet type.
Entries with a "-" or a "spare" in the table are undefined spare slots.

Type:  1             2            3            4              11
Loc:   ORIGINAL      TEST         IMALIVE      KILL           MAXBC

0      pkt_type      pkt_type     pkt_type     pkt_type       pkt_type
1      pkt_sernum    pkt_sernum   pkt_sernum   pkt_sernum     pkt_sernum
2      pkt_hopcnt    pkt_hopcnt   pkt_hopcnt   pkt_hopcnt     pkt_hopcnt
3      pkt_sod       pkt_sod      pkt_sod      pkt_sod        pkt_sod
4      trig_num      trig_num     -            -              trig_num
5      burst_tjd     burst_tjd    burst_tjd    -              burst_tjd
6      burst_sod     burst_sod    burst_sod    -              burst_sod
7      burst_ra      burst_ra     -            -              burst_ra
8      burst_dec     burst_dec    -            -              burst_dec
9      burst_inten   burst_inten  -            -              burst_inten
10     burst_peak    burst_peak   -            -              burst_peak
11     burst_error   burst_error  -            -              burst_error
12     sc_az         sc_az=0      -            -              sc_az
13     sc_el         sc_el=0      -            -              sc_el
14     sc_x_ra       sc_x_ra=0    -            -              sc_x_ra
15     sc_x_dec      sc_x_dec=0   -            -              sc_x_dec
16     sc_z_ra       sc_z_ra=0    -            -              sc_z_ra
17     sc_z_dec      sc_z_dec=0   -            -              sc_z_dec
18     trig_id       trig_id      -            -              trig_id
19     misc          misc         -            -              misc
20     earth_sc_az   earth_sc_az  -            -              earth_sc_az   
21     earth_sc_el   earth_sc_el  -            -              earth_sc_el
22     sc_radius     sc_radius    -            -              sc_radius
23     t_peak        spare        -            -              maxc1[0]
24     sam_used      spare        -            -              maxc1[1]
25     spare         spare        -            -              maxc1[2]
26     spare         spare        -            -              maxc1[3]
27     spare         spare        -            -              maxc1[4]
28     spare         spare        -            -              maxc1[5]
29     spare         spare        -            -              maxc1[6]
30     spare         spare        -            -              maxc1[7]
31     spare         spare        -            -              maxbc[0]
32     spare         spare        -            -              maxbc[1]
33     spare         spare        -            -              maxbc[2]
34     spare         spare        -            -              maxbc[3]
35     spare         spare        -            -              maxbc[4]
36     spare         spare        -            -              maxbc[5]
37     spare         spare        -            -              maxbc[6]
38     spare         spare        -            -              maxbc[7]
39     pkt_term      pkt_term     pkt_term     pkt_term       pkt_term



Type:  21            22           24           25
Loc:   BRAD_COORDS   FINAL        LOCBURST     ALEXIS

0      pkt_type      pkt_type     pkt_type     pkt_type
1      pkt_sernum    pkt_esrnum   pkt_sernum   pkt_sernum
2      pkt_hopcnt    pkt_hopcnt   pkt_hopcnt   pkt_hopcnt
3      pkt_sod       pkt_sod      pkt_sod      pkt_sod
4      trig_num      trig_num     trig_num     src_num
5      burst_tjd     burst_tjd    burst_tjd    trans_tjd
6      burst_sod     burst_sod    burst_sod    trans_sod
7      burst_ra      burst_ra     burst_ra     trans_ra
8      burst_dec     burst_dec    burst_dec    trans_dec
9      burst_inten   burst_inten  burst_inten  -
10     burst_peak    burst_peak   burst_peak   -
11     burst_error   burst_error  burst_error  trans_error
12     sc_az=0       sc_az        sc_az        -
13     sc_el=0       sc_el        sc_el        -
14     sc_x_ra=0     sc_x_ra      sc_x_ra      -
15     sc_x_dec=0    sc_x_dec     sc_x_dec     -
16     sc_z_ra=0     sc_z_ra      sc_z_ra      -
17     sc_z_dec=0    sc_z_dec     sc_z_dec     -
18     -             trig_id      trig_id      -
19     misc          misc         misc         -
20     -             earth_sc_az  -            -
21     -             earth_sc_el  -            -
22     -             sc_radius    -            trans_alpha
23     -             -            -            map_duration
24     -             -            -            tele_id
25     -             -            -            -
26     -             -            -            -
27     -             -            -            -
28     -             -            -            -
29     -             -            -            -
30     -             -            -            -
31     -             -            -            -
32     -             -            -            -
33     -             -            -            -
34     -             -            -            -
35     -             -            -            -
36     -             -            -            -
37     -             -            -            -
38     -             -            -            -
39     pkt_term      pkt_term     pkt_term     pkt_term



Type:  26             27          28            29           30 
Loc:   RXTE-PCA_ALERT RXTE-PCA    XTE-ASM_ALERT XTE-ASM      COMPTEL

0      pkt_type       pkt_type    pkt_type      pkt_type     pkt_type
1      pkt_sernum     pkt_sernum  pkt_sernum    pkt_sernum   pkt_sernum
2      pkt_hopcnt     pkt_hopcnt  pkt_hopcnt    pkt_hopcnt   pkt_hopcnt
3      pkt_sod        pkt_sod     pkt_sod       pkt_sod      pkt_sod
4      trig_num       trig_num    trig_num      trig_num     trig_num
5      burst_tjd      burst_tjd   burst_tjd     burst_tjd    burst_tjd
6      burst_sod      burst_sod   burst_sod     burst_sod    burst_sod
7      locburst_ra    burst_ra    burst_ra      burst_ra     burst_ra
8      locburst_dec   burst_dec   burst_dec     burst_dec    burst_dec
9      -              burst_inten -             burst_inten  burst_inten
10     -              burst_peak  -             burst_peak   burst_peak
11     -              burst_error -             burst_error  burst_error
12     -              -           -             burst_cont   -
13     -              -           -             -            -
14     -              -           -             -            -
15     -              -           -             -            -
16     -              -           -             -            -
17     -              -           -             -            -
18     -              -           trig_id       trig_id      trig_id
19     misc           misc        misc          misc         misc
20     -              -           -             -            -
21     -              -           -             -            -
22     -              -           -             -            -
23     -              -           -             -            -
24     obs_tjd        -           -             err_ra1      err_ra1
25     obs_sod        -           -             err_dec1     err_dec1
26     -              -           -             err_ra2      err_ra2
27     -              -           -             err_dec2     err_dec2
28     -              -           -             err_ra3      err_ra3
29     -              -           -             err_dec3     err_dec3
30     -              -           -             err_ra4      err_ra4
31     -              -           -             err_dec4     err_dec4
32     -              -           -             length       det_signif
33     -              -           -             width        -
34     -              -           -             pos_angle    -
35     -              -           -             -            -
36     -              -           -             -            -
37     -              -           -             -            -
38     -              -           -             -            -
39     pkt_term       pkt_term    pkt_term      pkt_term     pkt_term


Type:  31             32             33            34
Loc:   IPN_RAW        IPN_SEG        SAX-WFC_ALERT SAX-WFC

0      pkt_type       pkt_type       pkt_type      pkt_type
1      pkt_sernum     pkt_sernum     pkt_sernum    pkt_sernum
2      pkt_hopcnt     pkt_hopcnt     pkt_hopcnt    pkt_hopcnt
3      pkt_sod        pkt_sod        pkt_sod       pkt_sod  
4      trig_id        trig_num       -             -       
5      burst_tjd      burst_tjd      burst_tjd     burst_tjd
6      burst_sod      burst_sod      burst_sod     burst_sod
7      ipn_center_ra  ipn_center_ra  burst_ra      burst_ra 
8      ipn_center_dec ipn_center_dec burst_dec     burst_dec
9      ipn_radius     ipn_radius     -             burst_inten 
10     ipn_t_window   -              -             burst_peak  
11     ipn_width      ipn_width      -             burst_error
12     -              3sig_ra        -             burst_cont
13     -              3sig_dec       -             -        
14     evt_duration   2sig_ra        -             -       
15     -              2sig_dec       -             -      
16     -              1sig_ra        -             -     
17     -              1sig_dec       -             -    
18     trig_id        max_prob_ra    trig_id       trig_id
19     misc           max_prob_dec   misc          misc  
20     -              1sig_ra        -             -
21     -              1sig_dec       -             -
22     -              2sig_ra        -             -
23     -              2sig_dec       -             -
24     -              3sig_ra        -             -
25     -              3sig_dec       -             -
26     -              -              -             -
27     -              -              -             -
28     -              -              -             -
29     -              -              -             -
30     -              -              -             -
31     -              -              -             -
32     -              -              -             -
33     -              -              -             -
34     -              -              -             -
35     -              -              -             -
36     -              -              -             -
37     -              -              -             -
38     scratch        -              -             -
39     pkt_term       pkt_term       pkt_term      pkt_term


Type:  35            36           37             
Loc:   SAX-NFI_ALERT SAX-NFI      XTE-ASM_XTRANS 

0      pkt_type      pkt_type     pkt_type         
1      pkt_sernum    pkt_sernum   pkt_sernum     
2      pkt_hopcnt    pkt_hopcnt   pkt_hopcnt     
3      pkt_sod       pkt_sod      pkt_sod        
4      -             -            ref_num        
5      burst_tjd     burst_tjd    trans_tjd      
6      burst_sod     burst_sod    trans_sod      
7      burst_ra      burst_ra     trans_ra       
8      burst_dec     burst_dec    trans_dec      
9      -             burst_inten  trans_inten    
10     -             burst_peak   -              
11     -             burst_error  trans_error    
12     -             burst_cont   -              
13     -             -            time_since     
14     -             -            chi_sq_1       
15     -             -            chi_sq_2       
16     -             -            SigNoise1      
17     -             -            SigNoise2      
18     trig_id       trig_id      trig_id        
19     misc          misc         misc           
20     -             -            -
21     -             -            -
22     -             -            -
23     -             -            -
24     -             -            ra1
25     -             -            dec1
26     -             -            ra2
27     -             -            dec2
28     -             -            ra3
29     -             -            dec3
30     -             -            ra4
31     -             -            dec4
32     -             -            line_length
33     -             -            line_width
34     -             -            pos_angle
35     -             -            -
36     -             -            -
37     -             -            -
38     -             -            -
39     pkt_term      pkt_term     pkt_term       


Type:  39
Loc:   IPN_POS

0      pkt_type
1      pkt_sernum
2      pkt_hopcnt
3      pkt_sod
4      ref_num
5      burst_tjd
6      burst_sod
7      burst_ra
8      burst_dec
9      burst_fluence
10     burst_flux
11     burst_error 
12     sample_interval
13     -
14     -
15     -
16     burst2_ra
17     burst2_dec
18     sernum
19     misc
20     -
21     box_area
22     duration
23     ra1
24     dec1
25     ra2
26     dec2
27     ra3
28     dec3
29     ra4
30     dec4
31     ra21
32     dec21
33     ra22
34     dec22
35     ra23
36     dec23
37     ra24
38     dec24
39     pkt_term


Type:  40             41              42            43            44
Loc:   HETE_S/C_ALERT HETE_S/C_UPDATE HETE_S/C_LAST HETE_GNDANA   HETE_Test

0      pkt_type       pkt_type        pkt_type      pkt_type      pkt_type
1      pkt_sernum     pkt_sernum      pkt_sernum    pkt_sernum    pkt_sernum
2      pkt_hopcnt     pkt_hopcnt      pkt_hopcnt    pkt_hopcnt    pkt_hopcnt
3      pkt_sod        pkt_sod         pkt_sod       pkt_sod       pkt_sod
4      trig_seq_num   trig_seq_num    trig_seq_num  trig_seq_num  trig_seq_num
5      burst_tjd      burst_tjd       burst_tjd     burst_tjd     burst_jtd
6      burst_sod      burst_sod       burst_sod     burst_sod     burst_sod
7      [burst_ra]     burst_ra        burst_ra      burst_ra      burst_ra
8      [burst_dec]    burst_dec       burst_dec     burst_dec     burst_dec
9      trig_flags     trig_flags      trig_flags    trig_flags    trig_flags
10     gamma_cnts     gamma_cnts      gamma_cnts    gamma_cnts    gamma_cnts
11     wxm_s2n        wxm_s2n         wxm_s2n       wxm_s2n       wxm_s2n 
12     sxc_cnts       sxc_cnts        sxc_cnts      sxc_cnts      sxc_cnts
13     gamma_time     gamma_time      gamma_time    gamma_time    gamma_time
14     wxm_time       wxm_time        wxm_time      wxm_time      wxm_time
15     sc_point       sc_point        sc_point      sc_point      sc_point
16     -              wxra1           wxra1         wxra1         wxra1
17     -              wxdec1          wxdec1        wxdec1        wxdec1
18     -              wxra2           wxra2         wxra2         wxra1
19     -              wxdec2          wxdec2        wxdec2        wxdec2
20     -              wxra3           wxra3         wxra3         wxra1
21     -              wxdec3          wxdec3        wxdec3        wxdec3
22     -              wxra4           wxra4         wxra4         wxra1
23     -              wxdec4          wxdec4        wxdec4        wxdec4
24     -              wx_errors       wx_errors     wx_errors     wx_errors
25     -              wx_dimsig       wx_dimsig     wx_dimsig     wx_dimsig
26     -              sxra1           sxra1         sxra1         sxra1
27     -              sxdec1          sxdec1        sxdec1        sxdec1
28     -              sxra2           sxra2         sxra2         sxra1
29     -              sxdec2          sxdec2        sxdec2        sxdec2
30     -              sxra3           sxra3         sxra3         sxra1
31     -              sxdec3          sxdec3        sxdec3        sxdec3
32     -              sxra4           sxra4         sxra4         sxra1
33     -              sxdec4          sxdec4        sxdec4        sxdec4
34     -              sx_errors       sx_errors     sx_errors     sx_errors
35     -              sx_simsig       sx_simsig     sx_simsig     sx_simsig
36     -              pos_flags       pos_flags     pos_flags     pos_flags
37     -              validity        validity      validity      validity
38     -              lc_img_sn       lc_img_sn     lc_img_sn     lc_img_sn  
39     pkt_term       pkt_term        pkt_term      pkt_term      pkt_term


Type:  45
Loc:   GRB_COUNTERPART

0      pkt_type
1      pkt_sernum
2      pkt_hopcnt
3      pkt_sod
4      ref_num
5      burst_tjd
6      burst_sod
7      cp_ra
8      cp_dec
9      cp_inten
10     inten_uncert
11     pos_error
12     filter
13     seeing
14     obs_start_date
15     obs_start_time
16     obs_dur
17     id_conf_level
18     trig_id
19     misc
20     tele_name_c0-3
21     tele_name_c4-7
22     tele_name_c8-11
23     tele_name_c11-15
24     name_c0-3
25     name_c4-7
26     name_...
27     name_...
28     name_...
29     name_...
30     name_...
31     name_...
32     name_...
33     name_...
34     name_...
35     name_...
36     name_...
37     name_...
38     name_c56-59
39     pkt_term



Type:  51            52           53           54             55
Loc:   INTEGRAL_     INTEGRAL_    INTEGRAL_    INTEGRAL_      INTEGRAL_
       POINTDIR      SPIACS       WAKEUP       REFINED        OFFLINE

0      pkt_type      pkt_type     pkt_type     pkt_type       pkt_type
1      pkt_sernum    pkt_sernum   pkt_sernum   pkt_sernum     pkt_sernum
2      pkt_hopcnt    pkt_hopcnt   pkt_hopcnt   pkt_hopcnt     pkt_hopcnt
3      pkt_sod       pkt_sod      pkt_sod      pkt_sod        pkt_sod
4      trig_sub_num  trig_sub_num trig_sub_num trig_sub_num   trig_sub_num
5      slew_tjd      burst_tjd    burst_tjd    burst_tjd      burst_tjd
6      slew_sod      burst_sod    burst_sod    burst_sod      burst_sod
7      -             -            burst_ra     burst_ra       burst_ra
8      -             -            burst_dec    burst_dec      burst_dec
9      -             det_flags    det_flags    det_flags      det_flags
10     -             inten_sigma  inten_sigma  inten_sigma    inten_sigma 
11     -             -            burst_error  burst_error    burst_error
12     test_mpos     test_mpos    test_mpos    test_mpos      test_mpos
13     -             time_scale   time_scale   time_scale     time_scale
14     next_sc_ra    -            sc_ra        sc_ra          sc_ra
15     next_sc_dec   -            sc_dec       sc_dec         sc_dec
16     -             time_error   time_error   time_error     time_error
17     -             -            -            -              -
18     -             -            -            -              -
19     misc_att      misc_att     misc_att     misc_att       misc_att
20     -             -            -            -              -
21     -             -            -            -              -
22     -             -            -            -              -
23     -             -            -            -              -
24     -             -            -            -              -
25     -             -            -            -              -
26     -             -            -            -              -
27     -             -            -            -              -
28     -             -            -            -              -
29     -             -            -            -              -
30     -             -            -            -              -
31     -             -            -            -              -
32     -             -            -            -              -
33     -             -            -            -              -
34     -             -            -            -              -
35     -             -            -            -              -
36     -             -            -            -              -
37     -             -            -            -              -
38     -             -            -            -              -
39     pkt_term      pkt_term     pkt_term     pkt_term       pkt_term


Type:  57            58
Loc:   SNEWS         MILAGRO

0      pkt_type      pkt_type
1      pkt_sernum    pkt_sernum
2      pkt_hopcnt    pkt_hopcnt
3      pkt_sod       pkt_sod
4      trig_num      trig_num
5      event_tjd     burst_tjd
6      event_sod     burst_sod
7      event_ra      burst_ra
8      event_dec     burst_dec
9      event_signal  burst_signal
10     -             background
11     event_error   burst_error 
12     containment   significance
13     duration      duration
14     -             ann_rate
15     -             zen_angle
16     -             -
17     -             -
18     trig_id       trig_id
19     misc          misc
20     -             -
21     -             -
22     -             -
23     -             -
24     -             -
25     -             -
26     -             -
27     -             -
28     -             -
29     -             -
30     -             -
31     -             -
32     -             -
33     -             -
34     -             -
35     -             -
36     -             -
37     -             -
38     -             -
39     pkt_term      pkt_term



Type:  59
Loc:   KONUS_LC

0      pkt_type
1      pkt_sernum
2      pkt_hopcnt
3      pkt_sod
4      -
5      burst_tjd
6      burst_sod
7      -
8      -
9      -
10     -
11     - 
12     -
13     -
14     -
15     -
16     -
17     -
18     trig_id
19     -
20     -
21     -
22     url_c0-3
23     url_c4-7
24     url_c8-11 
25     url_... 
26     url_... 
27     url_... 
28     url_... 
29     url_... 
30     url_... 
31     url_... 
32     url_... 
33     url_... 
34     url_... 
35     url_... 
36     url_... 
37     url_... 
38     url_c64-67
39     pkt_term



SWIFT PACKETS:

Type:  60             61              62            63            64
Loc:   BAT_GRB_ALERT  BAT_GRB_POS     BAT_GRB_NACK  BAT_GRB_LC    BAT_SCALEDMAP

0      pkt_type       pkt_type        pkt_type      pkt_type      pkt_type
1      pkt_sernum     pkt_sernum      pkt_sernum    pkt_sernum    pkt_sernum
2      pkt_hopcnt     pkt_hopcnt      pkt_hopcnt    pkt_hopcnt    pkt_hopcnt
3      pkt_sod        pkt_sod         pkt_sod       pkt_sod       pkt_sod
4      trig_obs_num   trig_obs_num    trig_obs_num  trig_obs_num  trig_obs_num
5      trig_tjd       burst_tjd       trig_tjd      burst_tjd     burst_tjd
6      trig_sod       burst_sod       trig_sod      burst_sod     burst_sod
7      -              burst_ra        -             burst_ra      point_ra
8      -              burst_dec       -             burst_dec     point_dec
9      -              burst_flue      -             -             -
10     -              burst_ipeak     -             -             -
11     -              burst_error     -             -             -
12     -              phi             -             phi           -
13     -              theta           -             theta         -
14     -              integ_time      integ_time    delta_time    foregnd_dur
15     -              -               -             integ_time    integ_time
16     lon_lat        lon_lat         lon_lat       lon_lat       lon_lat
17     trig_index     trig_index      trig_index    trig_index    trig_index
18     soln_status    soln_status     soln_status   soln_status   soln_status
19     misc           misc            misc          misc          misc
20     -              image_signif    image_signif  image_signif  -
21     rate_signif    rate_signif     rate_signif   rate_signif   -
22     -              bkg_flue        bkg_flue      url_c0-3      url_c0-3
23     -              bkg_start       bkg_start     url_c4-7      url_c4-7
24     -              bkg_dur         bkg_dur       url_c8-11     url_c8-11 
25     -              cat_num         -             url_...       url_... 
26     -              -               -             url_...       url_... 
27     -              -               -             url_...       url_... 
28     -              -               -             url_...       url_... 
29     -              -               -             url_...       url_... 
30     -              -               -             url_...       url_... 
31     -              -               -             url_...       url_... 
32     -              -               -             url_...       url_... 
33     -              -               -             url_...       url_... 
34     -              -               -             url_...       url_... 
35     -              -               -             url_...       url_... 
36     -              merit_0-3       merit_0-3     url_...       url_... 
37     -              merit_4-7       merit_4-7     url_...       url_... 
38     -              merit_8-9       merit_8-9     url_c64-67    url_c64-67
39     pkt_term       pkt_term        pkt_term      pkt_term      pkt_term


Type:  65 (and 46)    66 (and 47)
Loc:   FOM_OBS        SC_SLEW

0      pkt_type       pkt_type
1      pkt_sernum     pkt_sernum
2      pkt_hopcnt     pkt_hopcnt
3      pkt_sod        pkt_sod
4      trig_obs_num   trig_obs_num
5      burst_tjd      burst_tjd
6      burst_sod      burst_sod
7      burst_ra       burst_ra 
8      burst_dec      burst_dec
9      roll           roll
10     lon_lat        lon_lat
11     -              -
12     -              -
13     -              wait_time
14     -              obs_time
15     integ_time     integ_time
16     soln_status    soln_status
17     trig_index     trig_index
18     at_slew_flags  slew_rtn
19     misc           misc
20     -              -
21     rate_signif    rate_signif
22     -              bat_mode
23     -              xrt_mode
24     -              uvot_mode
25     -              -
26     -              -
27     -              -
28     -              -
29     -              -
30     -              -
31     -              -
32     -              -
33     -              -
34     -              -
35     -              -
36     -              -
37     -              -
38     merit_value    merit_value
39     pkt_term       pkt_term


Type:  67             68              69              70            71
Loc:   XRT_POS        XRT_SPEC        XRT_IMAGE       XRT_LC        XRT_NACK_POS

0      pkt_type       pkt_type        pkt_type        pkt_type      pkt_type
1      pkt_sernum     pkt_sernum      pkt_sernum      pkt_sernum    pkt_sernum
2      pkt_hopcnt     pkt_hopcnt      pkt_hopcnt      pkt_hopcnt    pkt_hopcnt
3      pkt_sod        pkt_sod         pkt_sod         pkt_sod       pkt_sod
4      trig_obs_num   trig_obs_num    trig_obs_num    trig_obs_num  trig_obs_num
5      data_tjd       spec_start_tjd  image_start_tjd start_tjd     data_tjd
6      data_sod       spec_start_sod  image_start_sod start_sod     data_sod
7      burst_ra       bore_ra         burst_ra        bore_ra       point_ra
8      burst_dec      bore_dec        burst_dec       bore_dec      point_dec
9      burst_flue     livetime        centroid_cnt    livetime      centroid_cnts
10     -              spec_stop_tjd   -               stop_tjd      min_count
11     burst_error    spec_stop_sod   centroid_stddev stop_sod      centroid_stddev
12     x_tam_i1       mode            centroid_x      -             sig_max
13     y_tam_i1       waveform        centroid_y      -             -
14     x_tam_i2       bias            raw_x           -             -
15     y_tam_i2       -               raw_y           -             -
16     hi_prec_err    -               roll            -             ph2_iter
17     amp_wave       -               gain/mode/wave  -             max_iter
18     soln_status    -               expo_time       -             err_flag
19     misc           misc            misc            misc          misc
20     xrt-bat        -               grb_in_xrt_y    -             -
21     det_signif     term_cond       grb_in_xrt_z    term_cond     -
22     -              url_c0-3        url_c0-3        url_c0-3      -
23     -              url_c4-7        url_c4-7        url_c4-7      -
24     -              url_...         url_...         url_...       -
25     -              url_...         url_...         url_...       -
26     -              url_...         url_...         url_...       -
27     -              url_...         url_...         url_...       -
28     -              url_...         url_...         url_...       -
29     -              url_...         url_...         url_...       -
30     -              url_...         url_...         url_...       -
31     -              url_...         url_...         url_...       -
32     -              url_...         url_...         url_...       -
33     -              url_...         url_...         url_...       -
34     -              url_...         url_...         url_...       -
35     -              url_...         url_...         url_...       -
36     -              url_...         url_...         url_...       -
37     -              url_...         url_...         url_...       -
38     -              url_c64-67      url_c64-67      url_c64-67    -
39     pkt_term       pkt_term        pkt_term        pkt_term      pkt_term


Type:  72             73
Loc:   UVOT_IMAGE     UVOT_SRCLIST

0      pkt_type       pkt_type
1      pkt_sernum     pkt_sernum
2      pkt_hopcnt     pkt_hopcnt
3      pkt_sod        pkt_sod
4      trig_obs_num   trig_obs_num
5      expo_start_tjd expo_start_tjd
6      expo_start_sod expo_start_sod
7      point_ra       point_ra 
8      point_dec      point_dec
9      image_roll     image_roll
10     filter         filter
11     expo_id        bkg_mean
12     x_offset       x_max
13     y_offset       y_max
14     width          n_stars
15     height         x_offset
16     xy_grb         y_offset
17     n_frames       det_thresh
18     swl_lwl        photo_thresh
19     misc           misc
20     -              -
21     -              -
22     url_c0-3       url_c0-3
23     url_c4 7       url_c4-7
24     url_...        url_...
25     url_...        url_...
26     url_...        url_...
27     url_...        url_...
28     url_...        url_...
29     url_...        url_...
30     url_...        url_...
31     url_...        url_...
32     url_...        url_...
33     url_...        url_...
34     url_...        url_...
35     url_...        url_...
36     url_...        url_...
37     url_...        url_...
38     url_c64-67     url_c64-67
39     pkt_term       pkt_term


Type:  74             75
Loc:   FULL_DATA_INIT FULL_DATA_UPDATE

0      pkt_type       pkt_type
1      pkt_sernum     pkt_sernum
2      pkt_hopcnt     pkt_hopcnt
3      pkt_sod        pkt_sod
4      -              -
5      -              -
6      -              -
7      -              -
8      -              -
9      -              -
10     -              -
11     -              -
12     -              -
13     -              -
14     -              -
15     -              -
16     -              -
17     -              -
18     -              -
19     misc           misc
20     -              -
21     -              -
22     url_c0-3       url_c0-3
23     url_c4-7       url_c4-7
24     url_...        url_...
25     url_...        url_...
26     url_...        url_...
27     url_...        url_...
28     url_...        url_...
29     url_...        url_...
30     url_...        url_...
31     url_...        url_...
32     url_...        url_...
33     url_...        url_...
34     url_...        url_...
35     url_...        url_...
36     url_...        url_...
37     url_...        url_...
38     url_c64-67     url_c64-67
39     pkt_term       pkt_term


Type:  76             77              78              79             80
Loc:   BAT_PROC_LC    XRT_PROC_SPEC   XRT_PROC_IMAGE  UVOT_PROC_IM   UVOT_PROC_SL

0      pkt_type       pkt_type        pkt_type        pkt_type       pkt_type
1      pkt_sernum     pkt_sernum      pkt_sernum      pkt_sernum     pkt_sernum
2      pkt_hopcnt     pkt_hopcnt      pkt_hopcnt      pkt_hopcnt     pkt_hopcnt
3      pkt_sod        pkt_sod         pkt_sod         pkt_sod        pkt_sod
4      trig_obs_num   trig_obs_num    trig_obs_num    trig_obs_num   trig_obs_num
5      burst_tjd      spec_start_tjd  image_start_tjd expo_start_tjd expo_start_tjd
6      burst_sod      spec_start_sod  image_start_sod expo_start_sod expo_start_sod
7      burst_ra       bore_ra         burst_ra        point_ra       point_ra
8      burst_dec      bore_dec        burst_dec       point_dec      point_dec
9      T90_time       burst_flue      Centroid_Cnts   image_roll     image_roll
10     -              SpecStopTJD     -               filter         filter
11     -              SpecStopSOD     CentStdDev      expo_id        bkg_mean
12     phi            mode            centroid_x      x_offset       x_max
13     theta          waveform        centroid_y      y_offset       y_max
14     delta_time     -               raw_x           width          n_stars
15     integ_time     -               raw_y           height         x_offset
16     lon_lat        -               roll            xy_grb         y_offset
17     trig_index     -               gain/mode/wave  n_frames       det_thresh
18     soln_status    -               expo_time       swl_lwl        photo_thresh
19     misc           misc            misc            misc           misc
20     -              -               -               -              -
21     -              -               -               -              -
22     url_c0-3       url_c0-3        url_c0-3        url_c0-3       url_c0-3
23     url_c4-7       url_c4-7        url_c4-7        url_c4-7       url_c4-7
24     url_...        url_...         url_...         url_...        url_... 
25     url_...        url_...         url_...         url_...        url_... 
26     url_...        url_...         url_...         url_...        url_... 
27     url_...        url_...         url_...         url_...        url_... 
28     url_...        url_...         url_...         url_...        url_... 
29     url_...        url_...         url_...         url_...        url_... 
30     url_...        url_...         url_...         url_...        url_... 
31     url_...        url_...         url_...         url_...        url_... 
32     url_...        url_...         url_...         url_...        url_... 
33     url_...        url_...         url_...         url_...        url_... 
34     url_...        url_...         url_...         url_...        url_... 
35     url_...        url_...         url_...         url_...        url_... 
36     url_...        url_...         url_...         url_...        url_... 
37     url_...        url_...         url_...         url_...        url_... 
38     url_c64-67     url_c64-67      url_c64-67      url_c64-67     url_c64-67
39     pkt_term       pkt_term        pkt_term        pkt_term       pkt_term


Type:  81             82               83             84
Loc:   UVOT_POS       BAT_GRB_POS_TEST POINTDIR       BAT_TRANS

0      pkt_type       pkt_type         pkt_type       pkt_type
1      pkt_sernum     pkt_sernum       pkt_sernum     pkt_sernum
2      pkt_hopcnt     pkt_hopcnt       pkt_hopcnt     pkt_hopcnt
3      pkt_sod        pkt_sod          pkt_sod        pkt_sod
4      trig_obs_num   trig_obs_num     trig_obs_num   trig_obs_num
5      burst_tjd      burst_tdj        point_tjd      trans_tjd
6      burst_sod      burst_sod        point_sod      trans_sod
7      burst_ra       burst_ra         point_ra       trans_ra
8      burst_dec      burst_dec        point_dec      trans_dec
9      burst_mag      burst_flue       point_roll     trans_flue
10     filter         burst_ipeak      -              trans_ipeak
11     burst_error    burst_error      -              trans_error
12     -              phi              -              phi
13     -              theta            -              theta
14     -              integ_time       obs_time       integ_time
15     -              -                merit_value    -
16     hi_prec_err    lon_lat          lon_lat        lon_lat
17     -              trig_index       -              trig_index
18     soln_status    soln_status      -              soln_status
19     misc           misc             misc           misc
20     mag_error      image_signif     -              image_signif
21     -              rate_signif      -              rate_signif
22     -              bkg_flue         tgt_c0-3       bkg_flue
23     -              bkg_start        tgt_c4-7       bkg_start
24     -              bkg_dur          tgt_c8-11      bkg_dur
25     -              -                tgt_...        -
26     -              -                tgt_...        -
27     -              -                tgt_...        -
28     -              -                tgt_...        -
29     -              -                tgt_...        -
30     -              -                tgt_...        -
31     -              -                tgt_...        -
32     -              -                tgt_...        -
33     -              -                tgt_...        -
34     -              -                tgt_...        -
35     -              -                tgt_...        -
36     -              merit_0-3        tgt_...        merit_0-3
37     -              merit_4-7        tgt_...        merit_4-7
38     -              merit_8-9        tgt_c64-67     merit_8-9
39     pkt_term       pkt_term         pkt_term       pkt_term


Type:  85             86               87             88
Loc:   XRT_THRESHPIX  XRT_TP_PROC      XRT_SPER       XRT_SPER_PROC

0      pkt_type       pkt_type         pkt_type       pkt_type
1      pkt_sernum     pkt_sernum       pkt_sernum     pkt_sernum
2      pkt_hopcnt     pkt_hopcnt       pkt_hopcnt     pkt_hopcnt
3      pkt_sod        pkt_sod          pkt_sod        pkt_sod
4      trig_obs_num   trig_obs_num     trig_obs_num   trig_obs_num
5      burst_tjd      burst_tdj        burst_tjd      burst_tjd
6      burst_sod      burst_sod        burst_sod      burst_sod
7      point_ra       point_ra         point_ra       point_ra
8      point_dec      point_dec        point_dec      point_dec
9      expo_time      expo_time        expo_time      expo_time
10     stop_date      stop_date        stop_date      stop_date
11     stop_time      stop_time        stop_time      stop_time
12     seq_num        seq_num          num_pkt        num_pkt
13     -              -                num_evt        num_evt
14     -              -                -              -
15     -              -                -              -
16     -              -                -              -
17     -              -                -              -
18     -              -                -              -
19     misc           misc             misc           misc
20     -              -                -              -
21     -              -                -              -
22     url_c0-3       url_c0-3        url_c0-3        url_c0-3
23     url_c4-7       url_c4-7        url_c4-7        url_c4-7
24     url_...        url_...         url_...         url_...
25     url_...        url_...         url_...         url_...
26     url_...        url_...         url_...         url_...
27     url_...        url_...         url_...         url_...
28     url_...        url_...         url_...         url_...
29     url_...        url_...         url_...         url_...
30     url_...        url_...         url_...         url_...
31     url_...        url_...         url_...         url_...
32     url_...        url_...         url_...         url_...
33     url_...        url_...         url_...         url_...
34     url_...        url_...         url_...         url_...
35     url_...        url_...         url_...         url_...
36     url_...        url_...         url_...         url_...
37     url_...        url_...         url_...         url_...
38     url_c64-67     url_c64-67      url_c64-67      url_c64-67
39     pkt_term       pkt_term        pkt_term        pkt_term


Type:  89
Loc:   UVOT_POS_NACK

0      pkt_type
1      pkt_sernum
2      pkt_hopcnt
3      pkt_sod
4      trig_obs_num
5      trig_tjd
6      trig_sod
7      src_ra
8      src_dec
9      mag_lim
10     filter
11     src_error
12     src
13     -
14     -
15     -
16     -
17     -
18     soln_status
19     misc
20     lim_sigma
21     -
22     -
23     -
24     -
25     -
26     -
27     -
28     -
29     -
30     -
31     -
32     -
33     -
34     -
35     -
36     -
37     -
38     -
39     pkt_term

Type:  98                     99
Loc:   BAT_SUBTHRESHOLD_POS   BAT_SLEW_GRB_POS

0      pkt_type               pkt_type
1      pkt_sernum             pkt_sernum
2      pkt_hopcnt             pkt_hopcnt
3      pkt_sod                pkt_sod
4      trig_obs_num           id_num
5      burst_tjd              burst_tjd
6      burst_sod              burst_sod
7      burst_ra               burst_ra
8      burst_dec              burst_dec
9      burst_flue             burst_flue
10     burst_ipeak            burst_ipeak
11     burst_error            burst_error
12     phi                    -
13     theta                  -
14     integ_time             integ_time
15     -                      -
16     lon_lat                -
17     trig_index             trig_index
18     soln_status            soln_status
19     misc                   misc
20     image_signif           image_signif
21     rate_signif            -
22     bkg_flue               -
23     bkg_start              -
24     bkg_dur                -
25     cat_num                -
26     -                      -
27     -                      -
28     -                      -
29     -                      -
30     -                      -
31     -                      -
32     -                      -
33     -                      -
34     -                      -
35     -                      -
36     merit_0-3              -
37     merit_4-7              -
38     merit_8-9              -
39     pkt_term               pkt_term



SuperAGILE PACKETS:

Note: 100=Wakeup, 101=Ground, 102=Refined

Type:  100-102        107               108               109
Loc:   SuperAGILE_POS AGILE_POINTDIR    SuperAGILE_TRANS  SuperAGILE_POS_TEST

0      pkt_type       pkt_type          pkt_type          pkt_type
1      pkt_sernum     pkt_sernum        pkt_sernum        pkt_sernum
2      pkt_hopcnt     pkt_hopcnt        pkt_hopcnt        pkt_hopcnt
3      pkt_sod        pkt_sod           pkt_sod           pkt_sod
4      trig_num       -                 trig_num          trig_num
5      burst_tjd      curr_tjd          trans_tjd         burst_tjd
6      burst_sod      curr_sod          trans_sod         burst_sod
7      burst_ra       curr_ra           trans_ra          burst_ra
8      burst_dec      curr_dec          trans_dec         burst_dec
9      burst_intenX   -                 trans_intenX      burst_intenX
10     burst_intenY   -                 trans_intenY      burst_intenY
11     burst_error    -                 trans_error       burst_error
12     -              next_tjd          -                 -
13     -              next_sod          -                 -
14     -              next_ra           -                 -
15     -              next_dec          -                 -
16     -              -                 -                 -
17     -              -                 -                 -
18     trig_id        -                 trig_id           trig_id
19     misc           misc              misc              misc
20     burst_signif   -                 trans_signif      burst_signif
21     -              -                 -                 -
22     -              -                 -                 -
23     -              -                 -                 -
24     -              -                 -                 -
25     -              -                 -                 -
26     -              -                 -                 -
27     -              -                 -                 -
28     -              -                 -                 -
29     -              -                 -                 -
30     -              -                 -                 -
31     -              -                 -                 -
32     -              -                 -                 -
33     -              -                 -                 -
34     -              -                 -                 -
35     -              -                 -                 -
36     -              -                 -                 -
37     -              -                 -                 -
38     -              -                 -                 -
39     pkt_term       pkt_term          pkt_term          pkt_term



FERMI PACKETS:


Type:  110            111             112             113            118            119
Loc:   GBM_ALERT      GBM_FLT_POS     GBM_GND_POS     GBM_LC         GBM_TRANS      GBM_POS_TEST

0      pkt_type       pkt_type        pkt_type        pkt_type       pkt_type       pkt_type
1      pkt_sernum     pkt_sernum      pkt_sernum      pkt_sernum     pkt_sernum     pkt_sernum
2      pkt_hopcnt     pkt_hopcnt      pkt_hopcnt      pkt_hopcnt     pkt_hopcnt     pkt_hopcnt
3      pkt_sod        pkt_sod         pkt_sod         pkt_sod        pkt_sod        pkt_sod
4      trig_num       trig_num        trig_num        trig_num       trig_num       trig_num
5      burst_tjd      burst_tjd       burst_tjd       burst_tjd      trans_tjd      burst_tjd
6      burst_sod      burst_sod       burst_sod       burst_sod      trans_sod      burst_sod
7      -              burst_ra        burst_ra        burst_ra       trans_ra       burst_ra
8      -              burst_dec       burst_dec       trans_dec      trans_dec      burst_dec
9      algorithm      burst_flue      -               ???            trans_flue     burst_flue
10     -              -               -               ???            trans_inten    burst_inten
11     -              burst_error     burst_error     ???            trans_error    burst_error
12     -              phi             phi             -              -              -
13     -              theta           theta           -              -              -
14     -              integ_time      data_interval   ???            integ_time     data_interval
15     -              -               -               -              -              -
16     -              -               -               ???            -              -      
17     -              trig_dur        -               ???            trig_index     trig_index
18     -              soln_status     -               ???            soln_status    soln_status
19     misc           misc            misc            ???            misc           misc
20     rec_seq_num    rec_seq_num     rec_seq_num     ???            rec_seq_num    rec_seq_num
21     trig_signif    rate_signif     -               ???            rate_signif    rate_signif
22     lon            loc_algor       loc_algor       ???            loc_algor      loc_algor
23     lat            most_likely     -               ???            most_likely    most_likely
24     -              2most_likely    -               ???            2most_likely   2most_likely
25     -              hard_ratio      -               -              -              -
26     dets           dets            lo_e            -              -              -
27     -              -               hi_e            -              -              -
28     -              -               sc_x            -              -              -
29     -              -               sc_y            -              -              -
30     -              -               sc_z            -              -              -
31     -              -               -               -              -              -
32     -              -               -               -              -              -
33     -              -               -               -              -              -
34     -              -               -               -              -              -
35     -              -               -               -              -              -
36     -              -               -               -              -              -
37     -              lon             -               -              -              -
38     -              lat             -               -              -              -
39     pkt_term       pkt_term       pkt_term        pkt_term        pkt_term       pkt_term


Type:  120            121             122             123            124
Loc:   LAT_POS_INI    LAT_POS_UPD     LAT_POS_DIAG    LAT_TRANS      LAT_POS_TEST

0      pkt_type       pkt_type        pkt_type        pkt_type       pkt_type
1      pkt_sernum     pkt_sernum      pkt_sernum      pkt_sernum     pkt_sernum
2      pkt_hopcnt     pkt_hopcnt      pkt_hopcnt      pkt_hopcnt     pkt_hopcnt
3      pkt_sod        pkt_sod         pkt_sod         pkt_sod        pkt_sod
4      trig_num       trig_num        trig_num        trig_num       trig_num
5      burst_tjd      burst_tjd       burst_tjd       trans_tjd      burst_tjd
6      burst_sod      burst_sod       burst_sod       trans_sod      burst_sod
7      burst_ra       burst_ra        burst_ra        trans_ra       burst_ra
8      burst_dec      burst_dec       burst_dec       trans_dec      burst_dec
9      tot_inten      tot_inten       tot_inten       tot_inten      tot_inten
10     inten_4        inten_4         inten_4         inten_4        inten_4
11     burst_error    burst_error     burst_error     trans_error    burst_error
12     phi            phi             phi             phi            phi
13     theta          theta           theta           theta          theta
14     int_time       int_time        int_time        int_time       int_time
15     -              -               -               -              -
16     -              -               -               -              -
17     trig_index     trig_index      trig_index      trig_index     trig_index
18     trig_id        trig_id         trig_id         trig_id        trig_id
19     misc           misc            misc            misc           misc
20     rec_seq_num    rec_seq_num     rec_seq_num     rec_seq_num    rec_seq_num
21     -              -               -               -              -
22     -              -               -               -              -
23     -              -               -               -              -
24     -              -               -               -              -
25     temp_signif    temp_signif     temp_signif     temp_signif    temp_signif
26     image_signif   image_signif    image_signif    image_signif   image_signif
27     -              -               -               -              -
28     -              -               -               -              -
29     -              -               -               -              -
30     -              -               -               -              -
31     -              -               -               -              -
32     -              -               -               -              -
33     -              -               -               -              -
34     -              -               -               -              -
35     -              -               -               -              -
36     -              -               -               -              -
37     -              -               -               -              -
38     -              -               -               -              -
39     pkt_term       pkt_term        pkt_term        pkt_term       pkt_term


Type:  125           126
Loc:   FERMI_OBS_REQ FERMI_SC_SLEW

0      pkt_type      pkt_type
1      pkt_sernum    pkt_sernum
2      pkt_hopcnt    pkt_hopcnt
3      pkt_sod       pkt_sod
4      trig_num      trig_num
5      point_tjd     point_tjd
6      point_sod     point_sod
7      point_ra      point_ra
8      point_dec     point_dec
9      -             -
10     -             -
11     -             -
12     -             -
13     dwell_time    dwell_time
14     -             -
15     -             -
16     -             -
17     -             -
18     -             -
19     misc          misc
20     -             -
21     -             -
22     -             -
23     -             -
24     -             -
25     -             -
26     -             -
27     -             -
28     -             -
29     -             -
30     -             -
31     -             -
32     -             -
33     -             -
34     -             -
35     -             -
36     -             -
37     -             -
38     -             -
39     pkt_term      pkt_term


Type:  127            128
Loc:   LAT_GND_REF    LAT_GND_TRIG

0      pkt_type       pkt_type
1      pkt_sernum     pkt_sernum
2      pkt_hopcnt     pkt_hopcnt
3      pkt_sod        pkt_sod
4      trig_num       trig_num
5      burst_tjd      burst_tjd
6      burst_sod      burst_sod
7      burst_ra       burst_ra
8      burst_dec      burst_dec
9      tot_inten      tot_inten
10     inten_4        -
11     burst_error    burst_error
12     -              -
13     -              -
14     int_time       int_time
15     -              -
16     -              -
17     trig_index     trig_index
18     trig_id        trig_id
19     misc           misc
20     -              -
21     -              -
22     -              -
23     -              -
24     -              -
25     temp_signif    -
26     image_signif   trig_signif
27     -              -
28     -              -
29     -              -
30     -              -
31     -              -
32     -              -
33     -              -
34     -              -
35     -              -
36     -              -
37     -              -
38     -              -
39     pkt_term       pkt_term


Type:  129
Loc:   FERMI_POINTDIR

0      pkt_type
1      pkt_sernum
2      pkt_hopcnt
3      pkt_sod
4      -
5      start_tjd
6      start_sod
7      start_ra
8      start_dec
9      delta_t
10     ra_dec_1t
11     ra_dec_2t
12     ra_dec_3t
13     ra_dec_4t
14     ra_dec_5t
15     ra_dec_6t
16     ra_dec_7t
17     ra_dec_8t
18     ra_dec_9t
19     ra_dec_10t
20     ra_dec_11t
21     ra_dec_12t
22     ra_dec_13t
23     ra_dec_14t
24     ra_dec_15t
25     ra_dec_16t
26     ra_dec_17t
27     ra_dec_18t
28     ra_dec_19t
29     ra_dec_20t
30     ra_dec_21t
31     ra_dec_22t
32     ra_dec_23t
33     ra_dec_24t
34     ra_dec_25t
35     ra_dec_26t
36     ra_dec_27t
37     ra_dec_28t
38     ra_dec_29t
39     pkt_term


Type:  130
Loc:   SIMBAD/NED

0      pkt_type
1      pkt_sernum
2      pkt_hopcnt
3      pkt_sod
4      trig_obs_num
5      trig_tjd
6      trig_sod
7      ra
8      dec
9      -
10     -
11     error
12     orig_type
13     -
14     -
15     -
16     -
17     -
18     -
19     -
20     -
21     -
22     fname_c0-3
23     fname_c4-7
24     fname_c8-11
25     ...
26     ...
27     -
28     -
29     -
30     -
31     -
32     -
33     -
34     -
35     -
36     -
37     -
38     -
39     pkt_term



PACKET ITEM MACROS:

Below are the C-language define's for picking out the various elements
of the array of longs that make up the packet.  They have names which
reflect the contents of packet types 1, 2, and 3 (for historical reasons).
For the other types, these macros are reusable and for others their names
conote the wrong concept, so straight numerical indices are used in accessing
the packet buffer array.  [For the HETE-based packets, a new set of 40 macros
was define'd (see a section towards the end of this document).]

/* Indices into the socket packet array of 40 longs: */
#define PKT_TYPE      0   /* Packet type number */
#define PKT_SERNUM    1   /* Packet serial number */
#define PKT_HOP_CNT   2   /* Packet hop counter */
#define PKT_SOD       3   /* Packet Sec-Of-Day [centi-sec] (sssss.sss*100) */
#define BURST_TRIG    4   /* BATSE Trigger number */
#define BURST_TJD     5   /* Truncated Julian Day */
#define BURST_SOD     6   /* Sec-of-Day [centi-secs] (sssss.sss*100) */
#define BURST_RA      7   /* RA  [centi-deg] (0.0 to 359.999 *100) */
#define BURST_DEC     8   /* Dec [centi-deg] (-90.0 to +90.0 *100) */
#define BURST_INTEN   9   /* Intensity [cnts] */
#define BURST_PEAK   10   /* Peak Intensity [cnts/1.024sec] */
#define BURST_ERROR  11   /* Location uncertainty [centi-deg] */
#define SC_AZ        12   /* Burst SC Az [centi-deg] (0.0 to 359.999 *100) */
#define SC_EL        13   /* Burst SC El [centi-deg] (-90.0 to +90.0 *100) */
#define SC_X_RA      14   /* SC X-axis RA [centi-deg] (0.0 to 359.999 *100) */
#define SC_X_DEC     15   /* SC X-axis Dec [centi-deg] (-90.0 to +90.0 *100) */
#define SC_Z_RA      16   /* SC Z-axis RA [centi-deg] (0.0 to 359.999 *100) */
#define SC_Z_DEC     17   /* SC Z-axis Dec [centi-deg] (-90.0 to +90.0 *100) */
#define TRIGGER_ID   18   /* Flag bits that identify the trigger type */
#define MISC         19   /* Misc indicator flag bits */
#define E_SC_AZ      20   /* Earth's center in SC Az */
#define E_SC_EL      21   /* Earth's center in SC El */
#define SC_RADIUS    22   /* Orbital radius of the GRO SC [km] */
#define BURST_T_PEAK 23   /* Time of Peak intensity [centi-sec] (sssss.ss*100) */
#define PKT_SPARE24  24   /* Beginning of spare section */
#define PKT_SPARE38  38   /* End of the spare section */
#define PKT_TERM     39   /* Packet termination character */

#define SIZLBUF      40   /* Number of longwords in socket packet */




TYPE=1 PACKET CONTENTS:

NOTE: Type=1 packets (BATSE_Original) are NO LONGER AVAILABLE (June 2000). (since CGRO was de-orbitted).

The packet consists of 40 four-byte quantities.  The order and contents
are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=1)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       burst_trig   integer         BATSE trigger number
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [centi-deg]     (int)(0.0 to 359.9999 *100)
long         8       burst_dec    [centi-deg]     (int)(-90.0 to +90.0 *100)
long         9       burst_inten  [cnts]          Intensity, 0 to infinity
long         10      burst_peak   [cnts/1.024s]   Peak Intensity, 0 to infinity
long         11      burst_error  [centi-deg]     (int)(0.0 to 180.0 *100)
long         12      sc_az        [centi-deg]     (int)(0.0 to 359.9999 *100)
long         13      sc_el        [centi-deg]     (int)(-90.0 to +90.0 *100)
long         14      sc_x_ra      [centi-deg]     (int)(0.0 to 359.9999 *100)
long         15      sc_x_dec     [centi-deg]     (int)(-90.0 to +90.0 *100)
long         16      sc_z_ra      [centi-deg]     (int)(0.0 to 359.9999 *100)
long         17      sc_z_dec     [centi-deg]     (int)(-90.0 to +90.0 *100)
long         18      trigger_id   bits            Trigger identification flags
long         19      misc         bits            Misc stuff packed in here
long         20      e_sc_az      [centi-deg]     (int)(0.0 to 359.999 *100)
long         21      e_sc_el      [centi-deg]     (int)(-90.0 to +90.0 *100)
long         22      sc_radius    [km]            SC orbital radius
long         23      t_peak       [centi-sec]     (int)(sssss.sss *100)
long         24      sam_used     integer         Num samples integrated
long         25-38   spare[14]    integer         56 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


 
PACKET ITEM DESCRIPTIONS for type=1:

The "pkt_type" is an integer with a value of 1, 2 or 3 that tells
which type of packet this is and therefore what the contents are (they change
between the various types).  The types are:  1) Real BATSE trigger
initiated notices (GRBs, SFs, PEs, etc),  2) Test trigger notices,
3) Imalive packets.  The other types (4, 11, 22, and 24-34) are discussed
in other sections below.  And packet types (4-10, 12-21 and 23) never make it
to the outside world -- they are for internal GCN-use only.

The "pkt_sernum" is the serial number for that packet type.  Each packet
type has its own sequential serial numbering.  They all start from 1 when
the GCN programs start up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the machine of origin.  Do not confuse this with the burst_sod (see below).
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_trig" is the uniquely identifying serial number assigned by the
on-board BATSE flight software to each trigger.  It started with SN=1 just
after launch and is currently (Jun97) in the 6000's.

The "burst_tjd" is the Truncated Julian Day of the BATSE trigger,
eg. TJD=10281 is 17 Jul 96. 

The "burst_sod" is the UT seconds-of-day of the BATSE trigger.  This is the
spacecraft system clock UT time when the on-board software found a large
enough increase in the countrate (the 5.5-sigma threshold) in two or more
detectors in the selected energy band in any of the 3 sampling time scales
(64, 256, or 1024 msec).  It is derived from the spacecraft clock which has
more accuracy, but then is truncated to 10msec level, multiplied by 100,
and converted to a 32-bit integer for the packet.

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the trigger/burst
as determined by the GCN program (current epoch).  These intrinsically
floating point quantities have been multiplied by 100 and then integerized
to make an integer quantity with units of centi-degrees.

The "burst_inten" is actually the integrated fluence of the trigger (burst).
For Original notices, it is just the counts in the first 1.024 or 2.048 sec
of the burst after the time when there was enough counts for GCN to
calculate a direction solution.

The "burst_peak" is the maximum count rate intensity seen in the
trigger (burst).  Since there are several time domains in which
the notices are sent, the peak intensity is that so far encountered
in the light curve.  For type=1 it is the brightest 1-sec sample
of the 1or2 rate samples used from that Major Frame of telemetry data.

The "burst_error" is the radius of the circle that will contain on average
68% of the bursts.  This number is generated from an emperical comparison
to the Huntsville locations from an ensemble of past bursts.

The "sc_az" and "sc_el" are the spacecraft coordinates of the trigger (burst)
as determined by the GCN program.  The location in this coordinate system
is useful for the other 3 instruments on the GRO spacecraft (especially
the elevation angle allows the two z-axis instruments to determine if it is
in their FOVs).

The "sc_x_ra", "sc_x_dec", "sc_z_ra", and "sc_z_dec" are the RA,Dec (J2000)
coordinates to which the spacecraft x- and z-axes point.  These are the four
quantities needed to turn the spacecraft az,el directions into celestial 
coordinates.

The "trigger_id" field contains bit_flags which attempt to identify
the type of transient event that triggered the BATSE instrument.
The bit packing of the "trigger_id" entry in the packet is:
Bit_Number     Item_name      Description
----------     ---------      -----------
0              suspected_grb  0=No or 1=Yes, it is a suspected GRB
1              definite_grb   0=No or 1=Yes, it is definitely a GRB
2              near_sun       0=No or 1=Yes, the direction is near the Sun
3              soft_sf        0=No or 1=Yes, the spectrum is SF soft
4              suspected_pe   0=No or 1=Yes, it is a suspected Particle evt
5              definite_pe    0=No or 1=Yes, it is definitely a Particle evt
6              x_x_x_x_xxx    spare
7              definite_unk   0=No or 1=Yes, it is definitely an Unknown
8              earthward      0=No or 1=Yes, the direction is in the Earth cone
9              soft_flag      0=No or 1=Yes, the spectrum is a little soft
10             near_saa       0=No or 1=Yes, the spacecraft location is in SAA
11             definite_saa   0=No or 1=Yes, trigger is definitely SAA related
12             suspected_sf   0=No or 1=Yes, it is a suspected Solar Flare
13             definite_sf    0=No or 1=Yes, it is definitely a Solar Flare
14             op_flag        0=No or 1=Yes, the 2 brightest dets are opposites
15             def_not_grb    0=No or 1=Yes, it is definitely not a GRB
16             iso_pe         0=No or 1=Yes, Datlowe isotropic param is low
17             iso_grb        0=No or 1=Yes, Datlowe isotropic param is high
18             neg_h_ratio    0=No or 1=Yes, the hardness ratio is negative
19             neg_iso_bc     0=No or 1=Yes, Datlowe isotropic param is negative
20             not_soft       0=No or 1=Yes, the hardness ratio is not soft
21             hi_iso_ratio   0=No or 1=Yes, Datlowe iso C3/C2 ratio is high
22             low_inten      0=No or 1=Yes, intensity too small to be a GRB
23-30          spare          spare
31             bow            0=No or 1=Yes, it is a Burst OverWrite

These define's are in C-language programs for masking to get the various items
out of "trigger_id":
#define SUSP_GRB            0x00000001  /* Suspected GRB */
#define DEF_GRB             0x00000002  /* Definitely a GRB */
#define NEAR_SUN            0x00000004  /* Coords are near the Sun (<15deg) */
#define SOFT_SF             0x00000008  /* Spectrum is soft, h_ratio > 2.0 */
#define SUSP_PE             0x00000010  /* Suspected Particle Event */
#define DEF_PE              0x00000020  /* Definitely a Particle Event */
#define X_X_X_X_XXX         0x00000040  /* spare */
#define DEF_UNK             0x00000080  /* Definitely an Unknown */
#define EARTHWARD           0x00000100  /* Location towards Earth center */
#define SOFT_FLAG           0x00000200  /* Small hardness ratio (>1.5) */
#define NEAR_SAA            0x00000400  /* It is near/in the SAA region */
#define DEF_SAA             0x00000800  /* Definitely an SAA region */
#define SUSP_SF             0x00001000  /* Suspected Solar Flare */
#define DEF_SF              0x00002000  /* Definitely a Solar Flare */
#define OP_FLAG             0x00004000  /* Op-dets flag set */
#define DEF_NOT_GRB         0x00008000  /* Definitely not a GRB event */
#define ISO_PE              0x00010000  /* Datelowe Iso param is small (PE) */
#define ISO_GRB             0x00020000  /* D-Iso param is large (GRB/SF) */
#define NEG_H_RATIO         0x00040000  /* Negative h_ratio */
#define NEG_ISO_BC          0x00080000  /* Negative iso_part[1] or iso_part[2] */
#define NOT_SOFT            0x00100000  /* Not soft flag, GRB or PE */
#define HI_ISO_RATIO        0x00200000  /* Hi C3/C2 D-Iso ratio */
#define LOW_INTEN           0x00400000  /* Inten too small to be a real GRB */
#define X_X_X_X_XX2         0x7F800000  /* spare */
#define BOW_FLAG            0x80000000  /* Burst OverWrite trigger */



The "misc" field contains various bit_flags, the algorithm level, the
notice type, and the program source-code version numbers.
The bit packing of the "misc" entry in the packet is:
Bit_Number     Item_name      Description
----------     ---------      -----------
0              tm_indicator   0=No_TM, 1=TM_present
1              bad_calc       Singular matrix (bad calculation)
2              comptel_fov    Position is in COMPTEL FOV
3              egret_fov      Position is in EGRET FOV
4              osse_fov       Position is in OSSE FOV
5-7            level          Program coords calc level [1-4]
8-9            notice_type    0=Original coords notice,
                              1=Updates coords notice,
                              2=Delay coords notice,
                              3=Final coords notice.
10             alex_anti_sun  Position is in the Anti-Solar hemisphere (ALEXIS)
11             ipn_peak       Passed the IPN Peak Inten Threshold criteria
12             ipn_flue       Passed the IPN Fluence Threshold criteria
13             xte_crit       Passed the RXTE follow-up criteria
14             xte_type       RXTE-PCA_ALERT and RXTE-PCA packet sub-types:
                              0=RXTE_ALERT_WILL_NOT_OBSERVE
                              1=RXTE_ALERT_WILL_OBSERVE
                              0=RXTE_OBS_SAW_NOTHING
                              1=RXTE_OBS_SAW_SOMETHING
15             no_trig_ind    BATSE is not in a triggerable mode
16-27          ver_minor      Program version, Minor number [0-2047]
28-31          ver_major      Program version, Major number [1-15]

The define's for masking to get the various items out of "misc":
#define TM_IND_MASK         0x00000001  /* TM Indicator mask */
#define BAD_CALC_MASK       0x00000002  /* Singular matrix (bad calculation) */
#define C_FOV_MASK          0x00000004  /* COMPTEL FOV indicator mask */
#define E_FOV_MASK          0x00000008  /* EGRET FOV indicator mask */
#define O_FOV_MASK          0x00000010  /* OSSE FOV indicator mask */
#define PROG_LEV_MASK       0x000000E0  /* Program Algorithm Level mask */
#define NOTICE_TYPE_MASK    0x00000300  /* Notification Type mask */
#define A_ASD_MASK          0x00000400  /* ALEXIS Anti-Solar Dir ind mask */
#define IPN_PEAK_MASK       0x00000800  /* Passed the IPN Peak Inten thresh */
#define IPN_FLUE_MASK       0x00001000  /* Passed the IPN Fluence thresh */
#define XTE_CRITERIA        0x00002000  /* Meets RXTE follow-up criteria */
#define XTE_STATUS          0x00004000  /* Won't/will obs and Didn't/did see */
#define NO_TRIG_MASK        0x00008000  /* BATSE is not in a triggerable mode */
#define VER_MINOR_MASK      0x0FFF0000  /* Program Minor Version Number mask */
#define VER_MAJOR_MASK      0xF0000000  /* Program Major Version Number mask */


The "e_sc_az" and "e_sc_el" are the spacecraft az,el coordinates of the 
center of the Earth.

The "sc_radius" is the distance of the spacecraft from the center of the Earth.

The "t_peak" item is the UT seconds-of-day of the time of the peak/maximum
count rate [cnts/1.024sec] seen so far (remember there are a series of notices)
in the trigger/burst light curve.  This count rate has been normalized back
to be the true planewave intensity of the burst -- not for any given detector.

The "sam_used" item is the number of 1.024-sec samples of rate data
that went into the accumulation (integration).  For type=1 packets it must
be either a 1 or a 2.  For type=22 packets it can be a value of 1 to 32.

There are 14 "spare" items in the packet for future growth.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.




TYPE=2 PACKET CONTENTS:

The TEST packet consist of 40 four-byte quantities.  The order and contents
are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=2)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       burst_trig   integer         BATSE trigger number
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [centi-deg]     (int)(0.0 to 359.9999 *100)
long         8       burst_dec    [centi-deg]     (int)(-90.0 to +90.0 *100)
long         9       burst_inten  [cnts]          Intensity, 0 to infinity
long         10      burst_peak   [cnts/1.024s]   Peak Intensity, 0 to infinity
long         11      burst_error  [centi-deg]     (int)(0.0 to 180.0 *100)
long         12      sc_az        [centi-deg]     (int)(0.0 to 359.9999 *100)
long         13      sc_el        [centi-deg]     (int)(-90.0 to +90.0 *100)
long         14      sc_x_ra      [centi-deg]     (int)(0.0 to 359.9999 *100)
long         15      sc_x_dec     [centi-deg]     (int)(-90.0 to +90.0 *100)
long         16      sc_z_ra      [centi-deg]     (int)(0.0 to 359.9999 *100)
long         17      sc_z_dec     [centi-deg]     (int)(-90.0 to +90.0 *100)
long         18      trigger_id   bits            Trigger identification flags
long         19      misc         bits            Misc stuff packed in here
long         20      e_sc_az      [centi-deg]     (int)(0.0 to 359.999 *100)
long         21      e_sc_el      [centi-deg]     (int)(-90.0 to +90.0 *100)
long         22      sc_radius    [km]            SC orbital radius
long         23-38   spare[16]    integer         64 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


 
PACKET ITEM DESCRIPTIONS for type=2:

The "pkt_type" is an integer with a value of 1, 2 or 3 that tells
which type of packet this is and therefore what the contents are (they change
between the various types).  The types are:  1) Real BATSE trigger
initiated notices (GRBs, SFs, PEs, etc),  2) Test trigger notices,
3) Imalive packets.  The other types (4, 11, 22, and 24-34) are discussed
in other sections below.  And packet types (4-10, 12-21 and 23) never make it
to the outside world -- they are for internal GCN-use only.

The "pkt_sernum" is the serial number for that packet type.  Each packet
type has its own sequential serial numbering.  They all start from 1 when
the GCN programs start up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent.
Do not confuse this with the burst_sod (see below).
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_trig" is the uniquely identifying serial number assigned by the
on-board BATSE flight software to each trigger.  It started with SN=1 just
after launch and is currently (Jun97) in the 6000's.  This is always -1
for type=2 packets.

The "burst_tjd" is the Truncated Julian Day of the BATSE trigger,
eg. TJD=10281 is 17 Jul 96.

The "burst_sod" is the UT seconds-of-day of the BATSE trigger.  This is the
spacecraft system clock UT time when the on-board software found a large
enough increase in the countrate (the 5.5-sigma threshold) in two or more
detectors in the selected energy band in any of the 3 sampling time scales
(64, 256, or 1024 msec).  It is derived from the spacecraft clock which has
more accuracy, but then is truncated to 10msec level, multiplied by 100,
and converted to a 32-bit integer for the packet.

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the trigger/burst
as determined by the GCN program (current epoch).  These intrinsically
floating point quantities have been multiplied by 100 and then integerized
to make an integer quantity with units of centi-degrees.

The "burst_inten" is set to 1000 cnts/sec for Test Notices.

The "burst_peak" is set to 1000 cnts/sec for Test Notices.

The "burst_error" is the radius of the circle that will contain on average
68% of the bursts.  This number is generated from an emperical comparison
to the Huntsville locations from an ensemble of past bursts.

The "trigger_id" field contains bit_flags which attempt to identify
the type of transient event that triggered the BATSE instrument.
The bit packing of the "trigger_id" entry in the packet is:
Bit_Number     Item_name      Description
----------     ---------      -----------
0              suspected_grb  0=No or 1=Yes, it is a suspected GRB
1              definite_grb   0=No or 1=Yes, it is definitely a GRB
2              near_sun       0=No or 1=Yes, the direction is near the Sun
3              soft_sf        0=No or 1=Yes, the spectrum is SF soft
4              suspected_pe   0=No or 1=Yes, it is a suspected Particle evt
5              definite_pe    0=No or 1=Yes, it is definitely a Particle evt
6              x_x_x_x_xxx    spare
7              definite_unk   0=No or 1=Yes, it is definitely an Unknown
8              earthward      0=No or 1=Yes, the direction is in the Earth cone
9              soft_flag      0=No or 1=Yes, the spectrum is a little soft
10             near_saa       0=No or 1=Yes, the spacecraft location is in SAA
11             definite_saa   0=No or 1=Yes, trigger is definitely SAA related
12             suspected_sf   0=No or 1=Yes, it is a suspected Solar Flare
13             definite_sf    0=No or 1=Yes, it is definitely a Solar Flare
14             op_flag        0=No or 1=Yes, the 2 brightest dets are opposites
15             def_not_grb    0=No or 1=Yes, it is definitely not a GRB
16             iso_pe         0=No or 1=Yes, Datlowe isotropic param is low
17             iso_grb        0=No or 1=Yes, Datlowe isotropic param is high
18             neg_h_ratio    0=No or 1=Yes, the hardness ratio is negative
19             neg_iso_bc     0=No or 1=Yes, Datlowe isotropic param is negative
20             not_soft       0=No or 1=Yes, the hardness ratio is not soft
21             hi_iso_ratio   0=No or 1=Yes, Datlowe iso C3/C2 ratio is high
22             low_inten      0=No or 1=Yes, intensity too small to be a GRB
23-30          spare          spare
31             bow            0=No or 1=Yes, it is a Burst OverWrite

These define's are in C-language programs for masking to get the various items
out of "trigger_id":
#define SUSP_GRB            0x00000001  /* Suspected GRB */
#define DEF_GRB             0x00000002  /* Definitely a GRB */
#define NEAR_SUN            0x00000004  /* Coords are near the Sun (<15deg) */
#define SOFT_SF             0x00000008  /* Spectrum is soft, h_ratio > 2.0 */
#define SUSP_PE             0x00000010  /* Suspected Particle Event */
#define DEF_PE              0x00000020  /* Definitely a Particle Event */
#define X_X_X_X_XXX         0x00000040  /* spare */
#define DEF_UNK             0x00000080  /* Definitely an Unknown */
#define EARTHWARD           0x00000100  /* Location towards Earth center */
#define SOFT_FLAG           0x00000200  /* Small hardness ratio (>1.5) */
#define NEAR_SAA            0x00000400  /* It is near/in the SAA region */
#define DEF_SAA             0x00000800  /* Definitely an SAA region */
#define SUSP_SF             0x00001000  /* Suspected Solar Flare */
#define DEF_SF              0x00002000  /* Definitely a Solar Flare */
#define OP_FLAG             0x00004000  /* Op-dets flag set */
#define DEF_NOT_GRB         0x00008000  /* Definitely not a GRB event */
#define ISO_PE              0x00010000  /* Datelowe Iso param is small (PE) */
#define ISO_GRB             0x00020000  /* D-Iso param is large (GRB/SF) */
#define NEG_H_RATIO         0x00040000  /* Negative h_ratio */
#define NEG_ISO_BC          0x00080000  /* Negative iso_part[1] or iso_part[2]*/
#define NOT_SOFT            0x00100000  /* Not soft flag, GRB or PE */
#define HI_ISO_RATIO        0x00200000  /* Hi C3/C2 D-Iso ratio */
#define LOW_INTEN           0x00400000  /* Inten too small to be a real GRB */
#define X_X_X_X_XX2         0x7F800000  /* spare */
#define BOW_FLAG            0x80000000  /* Burst OverWrite trigger */



The "misc" field contains various bit_flags, the algorithm level, the
notice type, and the program source-code version numbers.
The bit packing of the "misc" entry in the packet is:
Bit_Number     Item_name      Description
----------     ---------      -----------
0              tm_indicator   0=No_TM, 1=TM_present
1              bad_calc       Singular matrix (bad calculation)
2              comptel_fov    Position is in COMPTEL FOV
3              egret_fov      Position is in EGRET FOV
4              osse_fov       Position is in OSSE FOV
5-7            level          Program coords calc level [1-4]
8-9            notice_type    0=Original coords notice,
                              1=Updates coords notice,
                              2=Delay coords notice,
                              3=Final coords notice.
10             alex_anti_sun  Position is in the Anti-Solar hemisphere (ALEXIS)
11             ipn_peak       Passed the IPN Peak Inten Threshold criteria
12             ipn_flue       Passed the IPN Fluence Threshold criteria
13             xte_crit       Passed the RXTE follow-up criteria
14             xte_type       RXTE-PCA_ALERT and RXTE-PCA packet sub-types:
                              0=RXTE_ALERT_WILL_NOT_OBSERVE
                              1=RXTE_ALERT_WILL_OBSERVE
                              0=RXTE_OBS_SAW_NOTHING
                              1=RXTE_OBS_SAW_SOMETHING
15             no_trig_ind    BATSE is not in a triggerable mode
16-27          ver_minor      Program version, Minor number [0-2047]
28-31          ver_major      Program version, Major number [1-15]

The define's for masking to get the various items out of "misc":
#define TM_IND_MASK         0x00000001  /* TM Indicator mask */
#define BAD_CALC_MASK       0x00000002  /* Singular matrix (bad calculation) */
#define C_FOV_MASK          0x00000004  /* COMPTEL FOV indicator mask */
#define E_FOV_MASK          0x00000008  /* EGRET FOV indicator mask */
#define O_FOV_MASK          0x00000010  /* OSSE FOV indicator mask */
#define PROG_LEV_MASK       0x000000E0  /* Program Algorithm Level mask */
#define NOTICE_TYPE_MASK    0x00000300  /* Notification Type mask */
#define A_ASD_MASK          0x00000400  /* ALEXIS Anti-Solar Dir ind mask */
#define IPN_PEAK_MASK       0x00000800  /* Passed the IPN Peak Inten thresh */
#define IPN_FLUE_MASK       0x00001000  /* Passed the IPN Fluence thresh */
#define XTE_CRITERIA        0x00002000  /* Meets RXTE follow-up criteria */
#define XTE_STATUS          0x00004000  /* Won't/will obs and Didn't/did see */
#define NO_TRIG_MASK        0x00008000  /* BATSE is not in a triggerable mode */
#define VER_MINOR_MASK      0x0FFF0000  /* Program Minor Version Number mask */
#define VER_MAJOR_MASK      0xF0000000  /* Program Major Version Number mask */



There are 16 "spare" items in the packet for future growth.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.




TYPE=3 PACKET CONTENTS:

The IMALIVE packet consists of 40 four-byte quantities.  The order and contents
are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=3)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       spare        integer         4 bytes for the future
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7-38    spare[32]    integer         128 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


 
PACKET ITEM DESCRIPTIONS for type=3:

The "pkt_type" is an integer with a value of 1, 2 or 3 that tells
which type of packet this is and therefore what the contents are (they change
between the various types).  The types are:  1) Real BATSE trigger
initiated notices (GRBs, SFs, PEs, etc),  2) Test trigger notices,
3) Imalive packets.  The other types (4, 11, 22, and 24-34) are discussed
in other sections below.  And packet types (4-10, 12-21 and 23) never make it
to the outside world -- they are for internal GCN-use only.

The "pkt_sernum" is the serial number for that packet type.  Each packet
type has its own sequential serial numbering.  They all start from 1 when
the GCN programs start up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_tjd" is the Truncated Julian Day when this packet was formed.
eg. TJD=10281 is 17 Jul 96.  Since this is an "imalive" packet, the "burst"
aspect of this is meaningless.  It is filled because the filtering code
needs to have this field to work for all packet types.

The "burst_sod" is the UT seconds-of-day when this packet was formed.
It is identical in value to the "pkt_sod" field.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).  Since this is an "imalive" packet, the "burst" aspect
of this is meaningless.  It is filled because the filtering code needs to have
this field to work for all packet types.

There are 32 "spare" items in the packet for future growth.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.




TYPE=4 PACKET CONTENTS:

The KILL packet consists of 40 four-byte quantities.  It is used to send a
signal the site-end of the socket connection that GCN is going to close
the connection immediately (within milliseconds).  This is the only socket
packet that is never echo-ed back to the GCN system.  The order and contents
are listed in the table below.  They have the same function, meaning, and
content as the items of the same name in the previous packet types (1-3).

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=4)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4-38    spare[35]    integer         140 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)




TYPE=11 PACKET CONTENTS:

NOTE: This Type=11 (BATSE_MAXBC) is NO LONGER AVAILABLE (June 2000).

The MAXBC packet consists of 40 four-byte quantities.  The order and contents
are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=11)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       burst_trig   integer         BATSE trigger number
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [centi-deg]     (int)(0.0 to 359.9999 *100)
long         8       burst_dec    [centi-deg]     (int)(-90.0 to +90.0 *100)
long         9       burst_inten  [cnts]          Linear scale, 0 to infinity
long         10      burst_peak   [cnts/1.024s]   Linear scale, 0 to infinity
long         11      burst_error  [centi-deg]     (int)(0.0 to 180.0 *100)
long         12      sc_az        [centi-deg]     (int)(0.0 to 359.9999 *100)
long         13      sc_el        [centi-deg]     (int)(-90.0 to +90.0 *100)
long         14      sc_x_ra      [centi-deg]     (int)(0.0 to 359.9999 *100)
long         15      sc_x_dec     [centi-deg]     (int)(-90.0 to +90.0 *100)
long         16      sc_z_ra      [centi-deg]     (int)(0.0 to 359.9999 *100)
long         17      sc_z_dec     [centi-deg]     (int)(-90.0 to +90.0 *100)
long         18      trigger_id   integer         Trigger identification flags
long         19      misc         integer         Misc stuff packed in here
long         20      e_sc_az      [centi-deg]     (int)(0.0 to 359.999 *100)
long         21      e_sc_el      [centi-deg]     (int)(-90.0 to +90.0 *100)
long         22      sc_radius    [km]            SC orbital radius
long         23      maxc1[0]     [cnts/64mSec]   Linear scale, 0 to infinity
long         24      maxc1[1]     [cnts/64mSec]   Linear scale, 0 to infinity
long         25      maxc1[2]     [cnts/64mSec]   Linear scale, 0 to infinity
long         26      maxc1[3]     [cnts/64mSec]   Linear scale, 0 to infinity
long         27      maxc1[4]     [cnts/64mSec]   Linear scale, 0 to infinity
long         28      maxc1[5]     [cnts/64mSec]   Linear scale, 0 to infinity
long         29      maxc1[6]     [cnts/64mSec]   Linear scale, 0 to infinity
long         30      maxc1[7]     [cnts/64mSec]   Linear scale, 0 to infinity
long         31      maxbc[0]     [cnts/64mSec]   Linear scale, 0 to infinity
long         32      maxbc[1]     [cnts/64mSec]   Linear scale, 0 to infinity
long         33      maxbc[2]     [cnts/64mSec]   Linear scale, 0 to infinity
long         34      maxbc[3]     [cnts/64mSec]   Linear scale, 0 to infinity
long         35      maxbc[4]     [cnts/64mSec]   Linear scale, 0 to infinity
long         36      maxbc[5]     [cnts/64mSec]   Linear scale, 0 to infinity
long         37      maxbc[6]     [cnts/64mSec]   Linear scale, 0 to infinity
long         38      maxbc[7]     [cnts/64mSec]   Linear scale, 0 to infinity
long         39      pkt_term     integer         Pkt Termination (always = \n)

 
PACKET ITEM DESCRIPTIONS (only those unique to type=11):

The 8 "maxc1[i]" and the 8 "maxbc[i]" are the 16 maximum (bkg subtracted) rates
[cnts/64mSec] as determined by the BATSE flight software during the 0-10
minutes after the initial trigger.  The index "i" runs from 0 to 7 for the 8
LADs.  The "c1" refers to the C1 DISCLA channel (~20-50 keV).  The "bc" refers
to the "burst channels" which is most of the time set to the two middle
DISCLA channels (50-100-300 keV).



TYPE=21 PACKET CONTENTS/DESCRIPTION:

NOTE: This Type=11 (Bradford) is NO LONGER AVAILABLE (June 2000)

The format and content of this BRAD_COORDS packet is identical to the
Test Coords packet (type=2).  The only difference is that the values
for the test RA,Dec locations are different than the set used for type=2.
The Bradford telescope system needed a different set of locations than
the generic set, so a separate packet type was defined and this different type
allowed the necessary filtering differences between the Bradford site
and the rest of the GCN sites.



TYPE=22 PACKET CONTENTS/DESCRIPTION:

NOTE: This Type=22 (BATSE_Final) is NO LONGER AVAILABLE (June 2000)

The format and content of this FINAL packet is identical to the ORIGINAL
(type=1) with the one exception:  that the "inten" is now a fluence value
for the number of "sam_used" values that went into the integration
of the burst light curve.



TYPE=24 PACKET CONTENTS/DESCRIPTION:

NOTE: This Type=24 (BATSE_LOCBURST) is NO LONGER AVAILABLE (June 2000).

The format and content of this LOCBURST packet is identical to the 
GRB Coords packet (type=1).  The major difference is that the values
of the RA,Dec location are calculated using the LOCBURST algorithm
instead of the ideal-physics and are, therefore, more accurate.
The "t_peak" value at location index=23 is undefined for this packet type.



TYPE=25 PACKET CONTENTS:

The ALEXIS packet consists of 40 four-byte quantities.  The order and contents
are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=25)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       src_num      integer         ALEXIS source number
long         5       trans_tjd    [days]          Truncated Julian Day
long         6       trans_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       trans_ra     [centi-deg]     (int)(0.0 to 359.9999 *100)
long         8       trans_dec    [centi-deg]     (int)(-90.0 to +90.0 *100)
long         9-10    spare[2]     integer         Unused at this point
long         11      trans_error  [centi-deg]     (int)(0.0 to 180.0 *100)
long         12-22   spare[11]    integer         Unused at this point
long         22      trans_alpha  integer         (int)(alpha *100)
long         23      map_dur      integer         Always 12, 24, or 48
long         24      tele_id      integer         Always 1, 2, 3, 4, 5, or 6
long         25-38   spare[14]    integer         56 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


 
PACKET ITEM DESCRIPTIONS (only those unique to type=25):

Only the packet items that are different than the type=1,2,3 packet contents
are listed below.  The standard packet items are described and defined
in the above sections.

The "src_num" is the uniquely identifying number assigned by the ground
ALEXIS data processing software to each identified source.  It starts with 1
for each processing run and progresses upwards (typically 0-20 sources
are identified each 12-hr run).

The "trans_tjd" is the Truncated Julian Day of the ALEXIS source,
eg. TJD=10281 is 17 Jul 96.  It is the TJD of the ending date/time stamp
of the map accumulation in which the transient was found.

The "trans_sod" is the UT seconds-of-day of the ALEXIS source.  It is the
SOD of the ending date/time stamp of the map accumulation in which the
transient was found.  While the units are centi-seconds, the value is always
a whole second.  The use of centi-seconds maintains the format/precission
that is used throughout all the packets.

The "trans_ra" and "trans_dec" are the RA,Dec coordinates of the transient
as determined by the ALEXIS batch processing analysis program (current epoch).
The units are centi-degrees.

The "trans_error" is the 3-sigma radius of the error circle.  It contains
the sum of the statistical and systematic errors.  This number is derived
from a comparison of the known location of the HZ 43 object and the 
instrument's determination.

The "trans_alpha" is the -log10(probability_of_false_detection).  The alpha
parameter is only the statistical significance of the detection, or put another
way, -log10 of the probability that the source could be a natural fluctuation
above a Poisson background.

The "map_duration" is the amount of data (the last 12, 24, or 48 hours)
that went into the accumulation that the transient was found.  The ALEXIS
processing uses three different time scales as a tradeoff between transient
duration and sensitivity.  This integer has only the 12, 24, or 48 numeric
values -- all other values are invalid.

The "tele_id" is the telescope that the transient was detected in.  This is
an integer with only 1 through 6 as the valid values for the six detectors.
The telescope names and energy bandpasses are: 1="1A 93eV", 2="1B 70eV",
3="2A 93eV", 4="2B 66eV", 5="3A 70eV", 6="3B 66eV".  (Telescopes 1 and 2
are co-aligned on ALEXIS, as are telescopes 3 and 4, and telescopes 5 and 6.)



TYPE=26 PACKET CONTENTS:

NOTE: Type=26 packets (RXTE_PCA_ALERT) are NO LONGER AVAILABLE.

The RXTE-PCA_ALERT packet consist of 40 four-byte quantities.  The order and
contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=26)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       burst_trig   integer         BATSE trigger number
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       locburst_ra  [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         8       locburst_dec [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         9-18    spare[10]    integer         40 bytes for the future
long         19      misc         integer         Misc stuff packed in here
long         20-23   spare[4]     integer         16 bytes for the future
long         24      obs_tjd      integer         Observation start TJD
long         25      obs_sod      integer         (int)(sssss.ss *100)
long         26-38   spare[19]    integer         76 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)

 
PACKET ITEM DESCRIPTIONS (only those unique to type=26):

For the type=26 (PCA ALERT) packets, the normal burst_ra/_dec locations
contain the LOCBURST RA/Dec location.  This allows the potential follow-up
observer to make tentative observing plans based approximate LOCBURST location
on the sky.

The "misc" field contains various bit_flags (see the section for types=1,2,3
for the definition of all the normal bits), and for the specialty bits
for type=26 (see the partial table below):

Bit_Number     Item_name      Description
----------     ---------      -----------
13             xte_crit       Passed the RXTE-PCA follow-up criteria
14             xte_type       RXTE-PCA_ALERT packet sub-types:
                              0=RXTE_ALERT_WILL_NOT_OBSERVE
                              1=RXTE_ALERT_WILL_OBSERVE

The define's for masking to get the various items out of "misc":
#define XTE_CRITERIA        0x00002000  /* Meets RXTE-PCA follow-up criteria */
#define XTE_STATUS          0x00004000  /* Won't/will observe */

The "obs_tjd" and "obs_sod" fields are the Truncated Julian Day and
Seconds-of_day for the start of the RXTE-PCA observation.  Putting this
timestamp in the ALERT notice allows the follow-up observer to know
when the RXTE-PCA observation is planned and about when the RXTE-PCA coordinates
will become available.



TYPE=27 PACKET CONTENTS:

The RXTE-PCA GRB coordinates packet consist of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=27)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       burst_trig   integer         BATSE trigger number
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         9       burst_inten  [mCrab]         Linear scale, 0 to infinity
long         10      spare        integer         spare
long         11      burst_error  [10^-4-deg]     (int)(0.0 to 180.0 *10000)
long         12-18   spare[7]     integer         28 bytes for the future
long         19      misc         integer         Misc stuff packed in here
long         20-38   spare[19]    integer         76 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


 
PACKET ITEM DESCRIPTIONS (only those unique to type=27):

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst
(current epoch).  These intrinsically floating point quantities have been
multiplied by 10000 and then integerized to make an integer quantity
with units of 0.0001-degrees.

The "burst_inten" is slightly different than the burst_inten used in type=1.
It is units of mCrab (instead of the counts/sec).

The "misc" field contains various bit_flags (see the section for types=1,2,3
for the definition of all the normal bits), and for the specialty bits
for type=27 (see the partial table below):

Bit_Number     Item_name      Description
----------     ---------      -----------
13             xte_crit       Passed the RXTE-PCA follow-up criteria
14             xte_type       RXTE-PCA packet sub-types:
                              0=RXTE_OBS_SAW_NOTHING
                              1=RXTE_OBS_SAW_SOMETHING

The define's for masking to get the various items out of "misc":
#define XTE_CRITERIA        0x00002000  /* Meets RXTE-PCA follow-up criteria */
#define XTE_STATUS          0x00004000  /* Didn't/did see a source */





TYPE=28 PACKET CONTENTS:

The packet for the RXTE-ASM ALERT notice has not been finalized yet.




TYPE=29 PACKET CONTENTS:

The RXTE-ASM GRB coordinates packet consist of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=29)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       burst_trig   integer         BATSE trigger number
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         9       burst_inten  [mCrab]         Linear scale, 0 to infinity
long         10      spare        integer         spare
long         11      burst_error  [10^-4-deg]     (int)(0.0 to 180.0 *10000)
long         12      burst_conf   [10^-2]         (int)(0.0 to 100.0 *100)
long         13-18   spare[6]     integer         24 bytes for the future
long         19      misc         integer         Misc stuff packed in here
long         20-23   spare[4]     integer         16 bytes for the future
long         24      err_ra1      [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         25      err_dec1     [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         26      err_ra2      [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         27      err_dec2     [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         28      err_ra3      [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         29      err_dec3     [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         30      err_ra4      [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         31      err_dec4     [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         32      length       [10^-4-deg]     (int)(0.0 to 180.0 *10000)
long         33      width        [10^-4-deg]     (int)(0.0 to 180.0 *10000)
long         34      pos_angle    [10^-4-deg]     (int)(0.0 to 360.0 *10000)
long         35-38   spare[4]     integer         16 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)

 
PACKET ITEM DESCRIPTIONS (only those unique to type=29):

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst
(current epoch).  These intrinsically floating point quantities have been
multiplied by 10000 and then integerized to make an integer quantity
with units of 0.0001-degrees.

The "burst_inten" is slightly different than the burst_inten used in type=1.
It is units of mCrab (instead of the counts/sec).

The "misc" field contains various bit_flags (see the section for type=1,2,3
for the definition of all the normal bits), and for the specialty bits
for type=32 (see the partial table below):

Bit_Number     Item_name      Description
----------     ---------      -----------
8-9            notice_type    0=Initial coords notice,
                              1=Updates coords notice,
                              3=Final coords notice.
14             box_v_line     RXTE-ASM error box sub-types:
                              0=line
                              1=box

The define's for masking to get the various items out of "misc":
#define NOTICE_TYPE_MASK    0x00000300  /* Notification Type mask */

The "burst_error" is the radius of a circle which circumscribes the error
box (diamond-shaped).  It is decimal degrees and is for the "burst_cont"
containment (statistical + systematic).

The "burst_cont" is the confidence containment percentage for the quoted
burst_error value.  It is stored in the packet in centi-percentage
(e.g. 98.5% would be an integer value of 9850).

The "err_ra1" and "err_dec1" are the RA,Dec coordinates for the 1st corner
of the error box.  Ditto for "2", "3", and "4" for the second, third, and
fourth corners, respectively.  (These fields are valid when the error box
is type "box".)  Note that these RA,Dec values are J2000 epoch, whereas the
RA,Dec of the center of the box is in Current epoch.  The use of different
epochs is, admittedly, ugly, but is due to historical/evolutionary aspects
that are way too lengthy and of little practical importance to explain here.

The "length" is the length of the error box when the error box is type "line".
The "width" is the width of the error box when the error box is type "line".
The "pos_angle" is the position angle of the error box when the error box
is type "line".  It is measured eastward from north.





================================================================================

TYPE=30 PACKET CONTENTS:

NOTE: Type=30 (COMPTEL) is NO LONGER AVAILABLE (June 2000). (since CGRO was de-orbitted).

{Note that the RA,Dec of the center are in J2000 epoch, and not
in the rest-of-the-program standard Current epoch.  The corners
of the error box are in the J2000 epoch.}




================================================================================

TYPE=31 PACKET CONTENTS:

The IPN_RAW packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=31)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_id      integer         Mission-specific ID number
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       ipn_cntr_ra  [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       ipn_cntr_dec [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       ipn_radius   [0.0001-deg]    Radius of the annulus
long         10      ipn_t_win    [centi-sec]     Earth-center time range (*100)
long         11      ipn_width    [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12-13   spare[2]     integers        8 bytes for the future
long         14      event_dur    [centi-sec]     Duration of the event (*100)
long         15-17   spare[3]     integers        12 bytes for the future
long         18      trig_id      bits            Type of source/trigger found
long         19      misc         bits            Misc stuff packed in here
long         20-37   spare[18]    integer         72 bytes for the future
long         38      scratch      integer         Scratch/internal use
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 31
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_id" is some mission-specific identification number.  It is optional;
not all misions-instruments will have an identification.

The "burst_tjd" is the Truncated Julian Day of the burst trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "ipn_center_ra" and "ipn_center_dec" are the RA,Dec coordinates of the center
of the IPN annulus (J2000).  These intrinsically floating point quantities
have been multiplied by 10,000 and then integerized to make an integer quantity
with units of 0.0001-degrees.  This field is valid only if the "trigger_id"
2^0 bit is a 0.

The "ipn_radius" is the radius to the center of the IPN annulus.
The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).  This field is valid only if the "trigger_id"
2^0 bit is a 0.

The "ipn_t_window" is the amount of time slop that the Timestamp could vary
depending on the direction of the burst wavefront (eg for a LEO s/c, this 
would be +-0.022 sec, and for Mars Observer, it would range from +/-250 sec
to +/-1250 sec depending on the relative positions of Mars and Earth).
The units are 0.01-sec (ie the fl.pt. time duration was multiplied
by 100 and then integerized).

The "ipn_width" is the 3-sigma width of the IPN annulus.
The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).  This field is valid only if the "trigger_id"
2^0 bit is a 0.

The "event_duration" is the duration of the event in the specified instrument
(see Misc flag bits).  (Note that the different mission-instruments have
different sensitivities and energy windows, so for a given GRB, there will be
variations in this value from one instrument to the next.)
The units are 0.01-sec (ie the fl.pt. time duration was multiplied
by 100 and then integerized).

The "trig_id" field contains flag bits on the content and expectation 
of this event being a burst or not.
The bit packing of the "trig_id" entry in the packet is:
BitNum  Item_name       Description
------  ---------       -----------
0       time_only       0=No or 1=Yes, this packet contains only the time (no ra,dec)
1       not_operational Instrument not able to take data at that time (PwrOff, Cal_mode, SAA)
2       grb             0=No or 1=Yes, it is definitely a GRB
3       prob_grb        0=No or 1=Yes, it is probably a GRB
4       poss_grb        0=No or 1=Yes, it is possibly a GRB
5       def_not_grb     0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6       nothing_found   if 1, it indicates no "blip" was found in the corresponding time_window
7-8     ecliptic        0=Unknown, 1=North hemisphere, 2=South hemisphere, 3=Middle_band (less than X deg)
9-29    spare           spare for future use
30      test_submit     0=No or 1=Yes, this is a test submission (internal use only)
31      spare           spare for future use

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0   When this bit is a 1, it indicates that no further information will be available on this event.
2^1   When this bit is a 1, it indicates that further information will probably be available on this event.
2^2   When this bit is a 1, it indicates that further information will definitely be available on this event.
2^3   This is an updated notice.  This is a notice that changes/improves
      the information specified in the original Notice.
2^4-9 Not assigned.
2^10  The Ulysses mission contributed to this Notice.
2^11  The Mars Odyssey-HEND instrument contributed to this Notice.
2^12  The Mars Odyssey-GRS instrument contributed to this Notice.
2^13  The RHESSI mission contributed to this Notice.
2^14  The KONUS-Wind instrument contributed to this Notice.
2^15  The Swift-BAT instrument contributed to this Notice.
2^16  The Messenger-GRNS instrument contributed to this Notice.
2^17  The Suzaku-WAM instrument contributed to this Notice.
2^18  The INTEGRAL-SPIACS instrument contributed to this Notice.
2^19  The SuperAGILE instrument contributed to this Notice.
2^20  The AGILE-GRID instrument contributed to this Notice.
2^21  The AGILE-MCAL instrument contributed to this Notice.
2^22  The FERMI-GBM instrument contributed to this Notice.
2^23  The FERMI-LAT instrument contributed to this Notice.
2^24-31  Not assigned.

The "scratch"  field is for use internal to GCN (to communicate
the name of the temporary comments files during importation).
It has no value to the outside world and should be ignored.

There are a total of 25 "spare" items in the packet (usually filled
with zeros).  They are located at items 4, 12-13, 15-17 and 20-37.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.






TYPE=32 PACKET CONTENTS:

NOTE: Type=32 (IPN_SEGMENT) is no longer available (since it part of the
input to this type was the BATSE position).

NOTE: It might become available again now that FERMI-GBM error circles are available.

The IPN_SEGMENT packet consists of 40 four-byte quantities.  The order and
contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=32)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       burst_trig   integer         BATSE trigger number
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       ipn_c_ra     [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         8       ipn_c_dec    [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         9       ipn_radius   [10^-4-deg]     (int)(0.0 to +90.0 *10000)
long         10      ipn_width    [10^-4-deg]     (int)(0.0 to +90.0 *10000)
long         11      3sig_ra      [10^-4-deg]     (int)(0.0 to 360.0 *10000)
long         12      3sig_dec     [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         13      2sig_ra      [10^-4-deg]     (int)(0.0 to 360.0 *10000)
long         14      2sig_dec     [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         15      1sig_ra      [10^-4-deg]     (int)(0.0 to 360.0 *10000)
long         16      1sig_dec     [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         17      max_prob_ra  [10^-4-deg]     (int)(0.0 to 360.0 *10000)
long         18      max_prob_dec [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         19      1sig_ra      [10^-4-deg]     (int)(0.0 to 360.0 *10000)
long         20      1sig_dec     [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         21      2sig_ra      [10^-4-deg]     (int)(0.0 to 360.0 *10000)
long         22      2sig_dec     [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         23      3sig_ra      [10^-4-deg]     (int)(0.0 to 360.0 *10000)
long         24      3sig_dec     [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         25-38   spare[14]    integer         56 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS (only those unique to type=32):

The "ipn_c_ra" and "ipn_c_dec" are the RA,Dec coordinates of the center of
the IPN annulus.  They are in J2000 epoch.  The units are 0.0001-degrees.
It was necessary to use a scaling factor (1000x) bigger than the normal 100x
(ie centi-degrees) because the intrinsic accuracy and precision of the
IPN coordinates is much better.

The "ipn_radius" and "ipn_width" are the radius and the width of the IPN
annulus.  Full width which contains all the known statistical and
systematic errors (ie greater than 90% confidence).  The units are
0.0001-degrees.

The "3sig_ra" and "3sig__dec" are the RA,Dec coordinates of the point along
the annulus at which the 3-sigma probability is located.  There are
two such locations (one on each side of the maximum probability location.
They are in J2000 epoch.  The units are 0.0001-degrees.

Similarly for the "2sig_ra", "2sig_dec", "1sig_ra", and "1sig_dec".

The "max_prob_ra" and "max_prob_dec" are the RA,Dec coordinates of the
location on the IPN annulus which the has the maximum probability of being
the location of the GRB.  They are in J2000 epoch.  The units are
0.0001-degrees.



================================================================================

TYPE=33 PACKET CONTENTS:

The packet for the SAX-WFC ALERT notice has not been finalized yet.
[03feb01: It probably never will be finalized.  There seems to be
no interest from the community to have/use this Notice type, and
there seems to be no interest amongst the SAX team to generate it.]




TYPE=34 PACKET CONTENTS:

NOTE: Type=34 (SAX_WFC) is no longer available (since BeppoSAX mission was terminated).

The SAX-WFC GRB Position packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=34)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       spare        integer         4 bytes for the future
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         9       burst_inten  [mCrab]         Linear scale, 0 to infinity
long         10      spare        integer         4 bytes for the future
long         11      burst_error  [10^-4-deg]     (int)(0.0 to 180.0 *10000)
long         12      burst_cont   [centi-%]       (int)(0.0 to 100.0 *100)
long         13-17   spare[5]     integer         20 bytes for the future
long         18      trigger_id   integer         Trigger identification flags
long         19      misc         integer         Misc stuff packed in here
long         20-38   spare[19]    integer         56 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS (only those unique to type=34):

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst
(current epoch).  These intrinsically floating point quantities have been
multiplied by 10000 and then integerized to make an integer quantity
with units of 0.0001-degrees.

The "burst_inten" is slightly different than the burst_inten used in type=1.
It is units of mCrab (instead of the counts/sec).

The "burst_cont" is the confidence containment percentage for the quoted
burst_error value.  It is stored in the packet in centi-percentage
(e.g. 98.5% would be an integer value of 9850).




TYPE=35 PACKET CONTENTS:

The packet for the SAX-NFI ALERT notice has not been finalized yet.
[03feb01: It probably never will be finalized.  There seems to be
no interest from the community to have/use this Notice type, and
there seems to be no interest amongst the SAX team to generate it.]





TYPE=36 PACKET CONTENTS:

NOTE: Type=36 (SAX_NFI) is no longer available (since BeppoSAX mission was terminated).

The SAX-NFI GRB Position packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=36)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       spare        integer         4 bytes for the future
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         9       burst_inten  [mCrab]         Linear scale, 0 to infinity
long         10      spare        integer         4 bytes for the future
long         11      burst_error  [10^-4-deg]     (int)(0.0 to 180.0 *10000)
long         12      burst_cont   [centi-%]       (int)(0.0 to 100.0 *100)
long         13-17   spare[5]     integer         20 bytes for the future
long         18      trigger_id   integer         Trigger identification flags
long         19      misc         integer         Misc stuff packed in here
long         20-38   spare[19]    integer         56 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS (only those unique to type=36):

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst
(current epoch).  These intrinsically floating point quantities have been
multiplied by 10000 and then integerized to make an integer quantity
with units of 0.0001-degrees.

The "burst_inten" is slightly different than the burst_inten used in type=1.
It is units of mCrab (instead of the counts/sec).

The "burst_cont" is the confidence containment percentage for the quoted
burst_error value.  It is stored in the packet in centi-percentage
(e.g. 98.5% would be an integer value of 9850).


================================================================================

TYPE=37 PACKET CONTENTS:

NOTE: Type=37 packets (RXTE_ASM_XTRANS) are NO LONGER AVAILABLE.

The RXTE-ASM_XTRANS Position packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=37)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       ref_num      integer         The serial number of trans
long         5       trans_tjd    [days]          Truncated Julian Day
long         6       trans_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       trans_ra     [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         8       trans_dec    [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         9       trans_inten  [mCrab]         Linear scale, 0 to infinity
long         10      spare        integer         4 bytes for the future
long         11      trans_error  [10^-4-deg]     (int)(0.0 to 180.0 *10000)
long         12      spare        integer         4 bytes for the future
long         13      time_since   [centi-sec]     (int)(sssss.sss *100)
long         14-17   spare[4]     integer         16 bytes for the future
long         18      trigger_id   integer         Trigger identification flags
long         19      misc         integer         Misc stuff packed in here
long         24      ra1          [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         25      dec1         [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         26      ra2          [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         27      dec2         [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         28      ra2          [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         29      dec3         [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         30      ra3          [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         31      dec4         [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         32      line_length  [10^-4-deg]     (int)(0.0 to 180.0 *10000)
long         33      line_width   [10^-4-deg]     (int)(0.0 to 180.0 *10000)
long         34      pos_angle    [10^-4-deg]     (int)(0.0 to 360.0 *10000)
long         35-38   spare[4]     integer         16 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS (only those unique to type=37):

The "trans_ra" and "trans_dec" are the RA,Dec coordinates of the transient
(current epoch).  These intrinsically floating point quantities have been
multiplied by 10000 and then integerized to make an integer quantity
with units of 0.0001-degrees.

The "trans_inten" is slightly different than the burst_inten used in type=1.
It is units of mCrab (instead of the counts/sec).

The "misc" field contains various bit_flags (see the section for type=1,2,3
for the definition of all the normal bits), and for the specialty bits
for type=37 (see the partial table below):

Bit_Number     Item_name      Description
----------     ---------      -----------
8-9            notice_type    0=Initial coords notice,
                              1=Updates coords notice,
                              3=Final coords notice.
14             box_v_line     RXTE-ASM error box sub-types:
                              0=line
                              1=box

The define's for masking to get the various items out of "misc":
#define NOTICE_TYPE_MASK    0x00000300  /* Notification Type mask */

The "trans_error" is the radius of a circle which circumscribes the error
box (diamond-shaped).

The "ra1" and "dec1" are the RA,Dec coordinates for the 1st corner of the
error box.  Ditto for "2", "3", and "4" for the second, third, and
fourth corners, respectively.  (These fields are valid when the error box
is type "box".)  Note that these RA,Dec values are J2000 epoch, whereas the
RA,Dec of the center of the box is in Current epoch.  The use of different
epochs is, admittedly, ugly, but is due to historical/evolutionary aspects
that are way too lengthy and of little practical importance to explain here.

The "line_length" is the length of the error box when the error box
is type "line" (this and the next two fields are ONLY assigned when
the type is "line").
The "line_width" is the width of the error box when the error box
is type "line".
The "pos_angle" is the position angle of the error box when the error box
is type "line".  It is measured eastward from north.




================================================================================

TYPE=38 PACKET CONTENTS:

This type=38 is a "spare" packet.  It is used for development testing
within the GCN as each new "source" packet is brought online.  It's contents
and format change with new source.
This packet type should never be distributed to the GCN sites.




================================================================================

TYPE=39 PACKET CONTENTS:

The IPN_POSITION packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=39)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       ref_num      integer         The serial number of trans
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         9       burst_flue   [10^-9erg/cm2]  Linear scale, 0 to infinity
long         10      burst_flux   [10^-9erg/cm2/s]Linear scale, 0 to infinity
long         11      burst_error  [10^-4-deg]     (int)(0.0 to 180.0 *10000)
long         12      samp_interval[10^-4-sec]     (int)(0.0 to infinity)
long         13-15   spare[3]     integer         16 bytes for the future
long         16      burst2_ra    [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         17      burst2_dec   [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         18      trig_id      bits            Trigger identification flags
long         19      misc         integer         Misc stuff packed in here
long         20      spare        integer         4 bytes for the future
long         21      box_area     [10^-4-sq.arcmin](int)(0.0 to X.X *10000)
long         22      duration     [centi-sec]     (int)(sssss.sss *100)
long         23      ra1          [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         24      dec1         [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         25      ra2          [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         26      dec2         [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         27      ra2          [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         28      dec3         [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         29      ra3          [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         30      dec4         [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         31      ra21         [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         32      dec21        [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         33      ra22         [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         34      dec22        [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         35      ra22         [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         36      dec23        [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         37      ra23         [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         38      dec24        [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 39, which tells that this packet
is of type IPN_POSITION and therefore indicates the contents and format
for the other 39 fields.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1 when
the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 1.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "refnum" is a serial number assigned by K.Hurley (UCBerkeley, IPN).
It is used for referencing/citation purposes.  It is sequential for the
Notices -- not the GRBs -- hence two Notices on a single GRB will have
different serial numbers (eg an initial notice and a refined-calculation notice
would have different refnum's).

The "burst_tjd" is the Truncated Julian Day of the burst,
eg. TJD=12275 is 01 Jan 2002.

The "burst_sod" is the time of earth-crossing for the burst
as determined by the Interplanetary Network of spacecraft.
The SOD is multiplied by 100, and converted to a 32-bit integer for the packet
(i.e the units are centi-sec; 10 msec),  eg. 4689568 = 46895.68 sec-of-day =
13:01:35.68 UT.

The "burst_ra" and "burst_dec" fields specify the RA,Dec location of the calculated
burst position (in J2000 epoch).  These intrinsically floating point
quantities have been multiplied by 10,000 and then integerized to make
an integer quantity with units of 10^-4-degrees.

The "burst_flue" is the burst fluence in units of 10^-9 erg/cm2.
This is not always known for the burst at the time of the issuance
of the Notice, in which case it will have a value of -1.

The "burst_flux" is the burst fluence in units of 10^-9 erg/cm2/sec.
This is not always known for the burst at the time of the issuance
of the Notice, in which case it will have a value of -1.

The "burst_error" is the radius of a circle which circumscribes
the error box (rectangular-or-diamond-shaped). The units are decimal degrees
times 10,000.0.  This radius represents the worst case error distance 
(ie the distance from the center to the farthest corner).

The "sampling_interval" is the interval of time during which the peak flux
was observed (ie the integration interval while scanning for the maximum
flux value).

The "burst2_ra" and "burst2_dec" values is the center of the 2nd IPN box
(if the Notice is a 2-box subtype).

The "trigger_id" field contains bit_flags which attempt to identify
the type of burst event.
The bit packing of the "trigger_id" entry in the packet is:
Bit_Number     Item_name      Description
----------     ---------      -----------
0              x_x_x_x        spare
1              definite_grb   0=No or 1=Yes, it is definitely a GRB
2-27           x_x_x_x        spare
28             spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29             temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30-31          x_x_x_x        spare

In the "misc" word, the 2^5-6 bits are used to indicate the Notice subtype:
a 00 is a 1-box subtype, and a 01 is a 2-box subtype.  For subtype=0 (1-box),
the various 2nd-box items in the packet format are filled with zeros (ie the
center and the 4 corners).

The "box_area" is the area of the error box in units of 0.0001 sq.arcminutes.
If the Notice is a 2-box notice, then the area of the 2nd box is always
the same as the first box.

The "duration" is the T90 duration of the burst in units of centi-seconds.
This is not always known for the burst at the time of the issuance
of the Notice, in which case it will have a value of -1.

The "ra1" and "dec1" are the RA,Dec coordinates for the 1st corner of the
error box.  Ditto for "2", "3", and "4" for the second, third, and
fourth corners, respectively.
The "ra21" and "dec21" are the RA,Dec coordinates for the 1st corner of the
second box (if the Notice is a 2-box subtype).  Ditto for the 2nd, 3rd, and 4th
corners.

There are a total of tbd "spare" items in the packet (usually filled
with zeros).  They are located at items 11-12, 17-18, and 20-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



================================================================================

TYPE=40 PACKET CONTENTS:

NOTE: Type=40 packets (HETE_S/C_ALERT) are NO LONGER AVAILABLE.

The HETE_S/C_ALERT packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=40)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_seq_num integers        Trigger num & mesg sernum
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7-8     spare[2]     integer         Mostly empty in Alert packets
long         9       trig_flags   bits            Trigger type ID flag bits
long        10       gamma_cnts   [cnts/sec]      GammaDet count rate
long        11       wxm_signoise [centi-sig/nois]WXM rate trigger signal/noise
long        12       sxc_cnts     [cnts/sec]      SXC count rate
long        13       gamma_time   [milli-sec]     GammaDet timescale
long        14       wxm_time     [milli-sec]     WXM det timescale
long        15       sc_point     integers        S/c RA,Dec pointing dir
long        16-38    spare[23]    integer         92 bytes not filled (zeros)
long        39       pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 40, 41, 42, 43, or 44
that tells which type of packet this is and therefore what the contents are
(they change slightly between the various types).  The types are:
40 = HETE_S/C_ALERT, 41 = HETE_S/C_UPDATE, 42 = HETE_S/C_LAST,
43 = HETE_GNDANA, and 44 = HETE_Test.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1 when
the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 1.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_seq_num" contains two separate items: a) the "trigger number"
and b) the "message sequence number".  The trigger number is assigned 
by the HETE flight software for each new triggering event.  The message
sequence number is a serial number across all 4 message subtypes (S/C_Alert,
S/C_Update, S/C_Last, and GndAna).  The S/C_Alert always has a sequence number of 1,
then there can be one or more S/C_Update messages for a given trigger (2,3,...,N),
then one S/C_Last (seq_num=N+1), and then one GndAnalysis message (seq_num=N+2).
The two parts of the trig_seq_num word can be extracted using these masks:
#define TRIGNUM_MASK   0x0000FFFF     /* Trigger number */
#define SEQNUM_MASK    0xFFFF0000     /* Mesg Seq Num, then downshift 16 bits */

The "burst_tjd" is the Truncated Julian Day of the HETE trigger,
eg. TJD=11910 is 01 Jan 2001.

The "burst_sod" is the UT seconds-of-day of the HETE trigger.  This is the
spacecraft system clock UT time when the on-board software found a large
enough increase in the countrate.  The sod is multiplied by 100,
and converted to a 32-bit integer for the packet (ie  the units are centi-sec; 10 msec).

There are 2 "spare" items next in the packet that are not filled in
for the S/C_Alert packet.  These are the locations of the "burst_ra" and "burst_dec"
which will be assigned values in the later packets when the position information
becomes available.  Please note that on some occasions (~10% of the time),
these two fields can, in fact, be filled with the burst_ra and burst_dec
position values for the burst.  This happens when the s/c can not transmit
the Alert when it first becomes available on the s/c (ie when there is a
gap inthe downlinks),  if this gap islong enough (about 10-30 sec), then enough
time will have gone by for the "Update" to come along.  The Update has position
information so it fills in those "slots" in the outgong packet. But the outgoing
packet keeps the Alert type indentity instead of the Update indentity even though
it has position information.  The TBD flag is also set in this scenario 
(indicating that there are values to be had in the burst_ra/_dec slots).

The "trig_flags" is a collection of bit flags. The content, bit position,
and meaning is contained in the following list of macros:
#define GAMMA_TRIG     0x00000001     /* Did FREGATE trigger? 1=yes, 0=no*/
#define WXM_TRIG       0x00000002     /* Did WXM trigger? */
#define SXC_TRIG       0x00000004     /* Did SXC trigger? */
#define ART_TRIG       0x00000008     /* Artificial trigger? */
#define POSS_GRB       0x00000010     /* Possible GRB */
#define DEF_GRB        0x00000020     /* Definite GRB */
#define DEF_NOT_GRB    0x00000040     /* Definitely NOT GRB */
#define HETE_NEAR_SAA  0x00000080     /* S/c is in or near the SAA */
#define POSS_SGR       0x00000100     /* Possible SGR */
#define DEF_SGR        0x00000200     /* Definite SGR */
#define POSS_XRB       0x00000400     /* Possible XRB */
#define DEF_XRB        0x00000800     /* Definite XRB */
#define GAMMA_DATA     0x00001000     /* Gamma data in this message */
#define WXM_DATA       0x00002000     /* WXM data in this message */
#define SXC_DATA       0x00004000     /* SXC data in this message */
#define OPT_DATA       0x00008000     /* Optical (s/c ACS) data in this message*/
#define WXM_POS        0x00010000     /* WXM position in this message */
#define SXC_POS        0x00020000     /* SXC position in this message */
#define H_TRIG_spare1  0x000C0000     /* spare1 */
#define H_USE_TRIG_SN  0x00400000     /* Use H_WXM_S_N */
#define H_TRIG_spare2  0x00800000     /* spare2 */
#define H_SXC_EN_TRIG  0x01000000     /* Triggered on the 1.5-12 keV band */
#define H_LOW_EN_TRIG  0x02000000     /* Triggered on the 2-30 keV band */
#define H_MID_EN_TRIG  0x04000000     /* Triggered on the 6-120 keV band */
#define H_HI_EN_TRIG   0x08000000     /* Triggered on the 25-400 keV band */
#define H_PROB_XRB     0x10000000     /* Probable XRB */
#define H_PROB_SGR     0x20000000     /* Probable SGR */
#define H_PROB_GRB     0x40000000     /* Probable GRB */
#define H_TRIG_spare3  0x80000000     /* spare3 */
The 9 "*_POSS_*", "*_PROB_*", and "*_DEF_*" flag bits indicate
if the flight s/w thought the trigger was "possibly", "probably" or "definitely"
due to a GRB, SGR, or an X-Ray Burster.  Given the complexity of the problem and
the limitations of flight s/w algorithms,  more than one of these 9 bits
can be set at the same time.
The "WXM_DATA" and "SXC_DATA" flag bits indicate whether or not this packet
contains data describing the brightness of the SXC or WXM data.
The "WXM_POS" and "SXC_POS" flag bits indicate whether or not this packet
contains valid WSM and SXC position information (ie the 4 corners).
These 2 flag bits are only valid for the S/C_UPDATE, S/C_LAST, and GNDANA (41-43)
packets (ie not valid for the S/C_ALERT (40) packet).

The "gamma_counts" field contains the count rate as detected
by the FREGATE detector.  The units are (approximately) counts per sec.

The "wxm_signoise" field contains the rate-trigger detection signal-to-noise
ratio of the WXC detector.  It is the increase in the countrate
that caused the trigger -- the units are an integer ratio [centi-sigma].

The "sxc_counts" field contains the count rate as detected by the SXC detector.
The units are counts per sec.

The "gamma_time" is the trigger_criteria timescale used in the FREGATE
detection -- this is related to the risetime of the burst.

The "wxm_time" is the trigger timescale, which is more like a burst duration,
but not exactly: it's the "foreground" interval duration which gives
the best S/N in the trigger algorithm.

The "sc_point" field contains the RA,Dec coordinates of the s/c pointing
direction.  The RA is stored in the upper word, and Dec is stored
in the lower word.  The units are degrees.

There are 23 "spare" items in the packet that are not used (usually filled
with zeros).

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.





TYPE=41 PACKET CONTENTS:

NOTE: Type=41 packets (HETE_S/C_UPDATE) are NO LONGER AVAILABLE.

The HETE_S/C_UPDATE packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=41)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_seq_num integers        Trigger num & mesg sernum
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         9       trig_flags   bits            Trigger type ID flag bits
long        10       gamma_cnts   [cnts/sec]      GammaDet count rate
long        11       wxm_signoise [centi-sig/nois]WXM rate trigger signal/noise
long        12       sxc_cnts     [cnts/sec]      SXC det count rate
long        13       gamma_time   [milli-sec]     GammaDet timescale
long        14       wxm_time     [milli-sec]     WXM det timescale
long        15       sc_point     integers        S/c RA,Dec pointing dir
long        16       wxra1        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        17       wxdec1       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        18       wxra2        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        19       wxdec2       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        20       wxra3        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        21       wxdec3       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        22       wxra4        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        23       wxdec4       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        24       wx_errors    bit fields      Packed with Sys & Stat errors
long        25       wx_dimsig    bit fields      Packed numbers
long        26       sxra1        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        27       sxdec1       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        28       sxra2        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        29       sxdec2       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        30       sxra3        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        31       sxdec3       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        32       sxra4        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        33       sxdec4       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        34       sx_errors    bit fields      Packed with Sys & Stat errors
long        35       sx_dimsig    bit fields      Packed numbers
long        36       pos_flags    bits            Mixed bits: pos, signif, data
long        37       validity     bits            Trigger source ID type
long        38       lc_img_sn    4 bytes         WXM X&Y LightCurve & Image SN
long        39       pkt_term     integer         Pkt Termination (always = \n)



PACKET ITEM DESCRIPTIONS (only those unique to type=41):

The following items are unique to packet type=41.  Items 0-13 and 39
are the same as defined in packet type=40.

The "burst_ra" and "burst_dec" items are the RA,Dec (Current epoch) location
of the burst.  Since there are two instruments that can produce
position information, these two locations are filled with the best position
of the 1 or 2 possibilities.  If both the SXC and WXM positions are available,
then these two fields are filled with the SXC location.  If only the WXM
position is available, the WXM position is contained in these two items.
If neither position is available, then that very rare (but technically
possible) situation is indicated by filling the items with the values
-999.9999 and -999.9999 (illegal values for RA,Dec).

Note that the 3 countrate fields (gamma_cnt, wxm_cnt, and sxc_cnt) may change
their values from from one Notice to the next.

The "trig_flags" field may also change from one Notice to the next.

The "wxraN", "wxdecN", sxraN", and "sxdecN" fields are the RA,Dec corners
of the WXC and SXC instrument source position error boxes (in J2000 epoch),
respectively.  The value "N" runs from 1 to 4 for the four corners of the box.
Coordinates of corners are given in degrees * 10000 (0.36" precision!).
If all 4 corners are the same RA,Dec location, then the error box is circular
and not rectangular.  And the RA,Dec given is the center of the circle (and
is the same as the "burst_ra","burst_dec" fields.

The"wx_errors" contains the statistical error (upper word) and
the systematic error (lower word) for the WXC position determination.
These should be added in quadrature to get the total uncertainty (radius).
To decode the wx_errors word:
#define STATERR_MASK    0xFFFF0000    /* Statistical error [arcsec], radius */
#define SYSERR_MASK     0x0000FFFF    /* Systematic error [arcsec], radius */

The "wx_dimsig" contains two things:
a) the maximum dimension of the WXM error box (the distance between the two
corners of the error box that are the farthest apart [units arcsec]),   and
b) the significance of the detection of the point source in the image plane
(in Sig/Noise units) [note that this is different than the wxm_signoise field
which is based on the rate-trigger detection significance].
To decode the ws_dimsig word:
#define MAXDIM_MASK     0xFFFF0000    /* Max dimension of location box */
#define NSIGMA_MASK     0x0000FFFF    /* Detection significance [Sig/Noise] */
Note that the "maximum dimension" of the 'error box' is effectively a diameter
for a circumscribing 'error circle'.

The"sx_errors" contains the statistical error (upper word) and
the systematic error (lower word) for the SXC position determination.
The same decoding listed in wx_errors also applies for sx_errors.

The "sx_dimsig" contains two things:
a) the maximum dimension of the SXC error box (the distance between the two
corners of the error box that are farthest apart [units arcsec],   and
b) the significance of the detection (in Sig/Noise units).
The same decoding macros listed in wx_dimsig also apply for sx_dimsig.

The "pos_flags" is a slight misnomer.  It contains a mixture of flag bits.
There are bits about the status of the various detected positions;
bits about the significance of the detections; and bits about if things
have changed/improved during the ground analysis (GNDANA packets only).
Except the "sc_long" field which is present in all 4 types (Alerts through
GNDANA).  It is contains the longitude of the s/c in its orbit, and is measured
eastward from the prime meridian (ie it goes 0-359deg, however because of
bit-packing constraints, it is prescaled by 2).
The pos_flags bits:
#define WXM_SXC_SAME    0x00000001     /* Positions are consistent, 1=yes  */
                                       /* WXM and SXC have overlapping boxes */
#define WXM_SXC_DIFF    0x00000002     /* Positions are inconsistent */
                                       /* WXM and SXC do not have overlapping boxes */
#define WXM_LOW_SIG     0x00000004     /* NSIGMA below a threshold        */
                                       /* The S/N is below a "good" value */
#define SXC_LOW_SIG     0x00000008     /* NSIGMA below a threshold        */
                                       /* The S/N is below a "good" value */
/* The following bits are assigned (and theerfore valid) only
 * in the GNDANA packets: */
#define GAMMA_REFINED   0x00000010     /* Gamma refined since FINAL      */
                                       /* Gamma data changed as a result */
                                       /* of ground analysis             */
#define WXM_REFINED     0x00000020     /* WXM refined since FINAL        */
                                       /* WXM data changed as a result   */
                                       /* of ground analysis             */
#define SXC_REFINED     0x00000040     /* SXC refined since FINAL        */
                                       /* SXC data changed as a result   */
                                       /* of ground analysis             */
#define POS_spare       0x00FFFFB0     /* spare */
#define SC_LONG         0xFF000000     /* S/C Longitude East [units of 2-degrees] */ 

The "validity" is set of bit flags specifying the identity of the type
of trigger (i.e. GRB, x-ray src, etc).
Validity is determined after the trigger has been detected.
Fregate looks at background trends before and after the burst:
it can say "hey, this was due to a rising background" and the burst is invalid.
The on-board code can see that a burst came from a known source,
but only after a position has been detected:  the burst is invalid
because it's a known source.
The on-board code can protect against emersion triggers if it's
been properly configured.  If the ground analysis shows
"oops, it was an emersion trigger", then that bit is set.
If there's no position, it's a useless burst.  This bit is defined,
but it is not currently set by the on-board or the ground processing s/w.
The following macros can be used to extract the various flag bits from validity:
#define BURST_VALID     0x00000001     /* Burst declared valid */
#define BURST_INVALID   0x00000002     /* Burst declared invalid */
#define H_VAL0x4_spare  0x00000004     /* spare; not used */
#define H_VAL0x8_spare  0x00000008     /* spare; not used */
#define EMERGE_TRIG     0x00000010     /* Emersion trigger */
#define KNOWN_XRS       0x00000020     /* Known X-ray source */
#define NO_POSITION     0x00000040     /* No WXM or SXC position */
#define H_VAL0x80_spare 0x00000080     /* spare; not used */
#define OPS_ERROR       0x00000100     /* Bad burst: s/c and inst ops error */
#define PARTICLES       0x00000200     /* Bad burst: particles */
#define BAD_FLT_LOC     0x00000400     /* Bad burst: bad flight location */
#define BAD_GND_LOC     0x00000800     /* Bad burst: bad ground location */
#define RISING_BACK     0x00001000     /* Bad burst: rising background */
#define POISSON_TRIG    0x00002000     /* Bad burst: poisson fluctuation trigger*/
#define H_VALID_spare   0x1FFFC000     /* spare */
#define H_EMAIL_METHOD  0x20000000     /* email import method(=1, socket=0) */
#define H_INTERNAL_TEST 0x40000000     /* HETE_OPS GndAna test/debug loop */
#define H_NOT_A_BURST   0x80000000     /* GndAna shows this trigger to be non-GRB*/

The "lc_img_sn" contains 4 values (the WXM X and Y LightCurve SN and
Image SN values).
WXM_X_LC_SN     in the most significant byte,
WXM_Y_LC_SN     in the next most significant byte,
WXM_X_IMAGE_SN  in the third most significant byte, and
WXM_Y_IMAGE_SN  in the least significant byte.

WXM_X_LC_SN and WXM_Y_LC_SN describe the signal-to-noise of the excess
over background in the WXM light curve (LC) in each of the two modules (X and Y).
The WXM light curve is obtained by summing the data over all position bins
at 320ms time resolution.  The flight software chooses background and
burst time intervals, and performs a standard background subtraction
in each detector.  The resulting net signals are divided by their respective 
root-variances, to yield the quantities reported here.
Note that WXM_*_LC_SN are not directly related to trigger SNR,
since the trigger operates on 80ms resolution data, and may in fact
come from FREGATE data rather than from WXM data.  The light-curve SNR
is designed measure the overall signal-to-noise in the actual data used
to obtain the location, so as to complement WXM_*_IMAGE_SN.
The two values stored in the packet are in units of deci-sigma (ie they
have been multiplied by 10.0 and integerized prior to storing, and thus
have a dynamic range of 0.0 to 25.5).
 
WXM_X_IMAGE_SN and WXM_Y_IMAGE_SN describe the peak signal-to-noise
in the cross-correlation of the background-subtracted image with the mask
in each of the two modules (X and Y).
The background-subtracted signal across each WXM detector is cross-correlated
with the mask.  The resulting cross-correlation functions are mean-subtracted
and divided by their respective root-variances, yielding SNR as a function
of source projection angle in each detector.  The quantities reported here
are the peak values of those functions.
The two values stored in the packet are in units of deci-sigma (ie they
have been multiplied by 10.0 and integerized prior to storing, and thus
have a dynamic range of 0.0 to 25.5).


TYPE=42 PACKET CONTENTS:

NOTE: Type=42 packets (HETE_S/C_LAST) are NO LONGER AVAILABLE.

The HETE_S/C_LAST packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=42)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_seq_num integers        Trigger num & mesg sernum
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         9       trig_flags   bits            Trigger type ID flag bits
long        10       gamma_cnts   [cnts/sec]      GammaDet count rate
long        11       wxm_signoise [centi-sig/nois]WXM rate trigger signal/noise
long        12       sxc_cnts     [cnts/sec]      SXC det count rate
long        13       gamma_time   [milli-sec]     GammaDet timescale
long        14       wxm_time     [milli-sec]     WXM det timescale
long        15       sc_point     integers        S/c RA,Dec pointing dir
long        16       wxra1        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        17       wxdec1       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        18       wxra2        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        19       wxdec2       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        20       wxra3        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        21       wxdec3       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        22       wxra4        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        23       wxdec4       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        24       wx_errors    bit fields      Packed with Sys & Stat errors
long        25       wx_dimsig    bit fields      Packed numbers
long        26       sxra1        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        27       sxdec1       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        28       sxra2        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        29       sxdec2       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        30       sxra3        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        31       sxdec3       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        32       sxra4        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        33       sxdec4       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        34       sx_errors    bit fields      Packed with Sys & Stat errors
long        35       sx_simsig    bit fields      Packed numbers
long        36       pos_flags    bits            Mixed bits: pos, signif, data
long        37       validity     bits            Trigger source ID type
long        38       lc_img_sn    4 bytes         WXM X&Y LightCurve & Image SN
long        39       pkt_term     integer         Pkt Termination (always = \n)



PACKET ITEM DESCRIPTIONS (only those unique to type=42):

The following items are unique to packet type=42.  Items 0-33 and 39
are the same as defined in packet type=41.  The only two new 
bit fields in "validity".

The following macros can be used to extract the new flag bits from validity:
#define BURST_VALID     0x00000001     /* Is this a real GRB?  1=yes */
#define BURST_INVALID   0x00000002     /* It is not a real GRB. 1=not_real */



TYPE=43 PACKET CONTENTS:

NOTE: Type=43 packets (HETE_GNDANA) are NO LONGER AVAILABLE.

The HETE_GNDANA packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=43)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_seq_num integers        Trigger num & mesg sernum
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         9       trig_flags   bits            Trigger type ID flag bits
long        10       gamma_cnts   [cnts/sec]      GammaDet count rate
long        11       wxm_signoise [centi-sig/nois]WXM rate trigger signal/noise
long        12       sxc_cnts     [cnts/sec]      SXC det count rate
long        13       gamma_time   [milli-sec]     GammaDet timescale
long        14       wxm_time     [milli-sec]     WXM det timescale
long        15       sc_point     integers        S/c RA,Dec pointing dir
long        16       wxra1        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        17       wxdec1       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        18       wxra2        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        19       wxdec2       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        20       wxra3        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        21       wxdec3       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        22       wxra4        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        23       wxdec4       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        24       wx_errors    bit fields      Packed with Sys & Stat errors
long        25       wx_dimsig    bit fields      Packed numbers
long        26       sxra1        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        27       sxdec1       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        28       sxra2        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        29       sxdec2       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        30       sxra3        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        31       sxdec3       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        32       sxra4        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        33       sxdec4       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        34       sx_errors    bit fields      Packed with Sys & Stat errors
long        35       sx_simsig    bit fields      Packed numbers
long        36       pos_flags    bits            Mixed bits: pos, signif, data
long        37       validity     bits            Trigger source ID type
long        38       lc_img_sn    4 bytes         WXM X&Y LightCurve & Image SN
long        39       pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS (only those unique to type=43):

There are no unique (new) fields in packet type=43.  All the fields defined
in type=42 are also present in type=43.  However, there are a few new bits
defined in the "pos_flags" and "validity" fields.  Also, the values contained
in the following fields may have changed from what was distributed
in the last type=42 Notice.




HETE FLAG BITS  VS  NOTICE TYPE:

The table below contains the 3 fields that have flag bits in the 4 types
of HETE Notices (S/C_Alert, S/C_Update, S/C_Last, and GroundAnalysis).  It shows 
which bits are assigned (set to 1 or 0) in each Notice type.
An "X" means that bit is tested and set (1or0) in that Notice type.
A blank (" ") means that bit is not determined/controlled in that Notice type.

Table of HETE Packet Flag Bits  vs  Notice Type

WORD:
BIT             Bit_Mask     S/C_Alert S/C_Update S/C_Last GndAna

TRIG_FLAGS:

H_GAMMA_TRIG    0x00000001       X       X        X        X
H_WXM_TRIG      0x00000002       X       X        X        X
H_SXC_TRIG      0x00000004       X       X        X        X
H_ART_TRIG      0x00000008       X       X        X        X
H_POSS_GRB      0x00000010       X       X        X        X
H_DEF_GRB       0x00000020       X       X        X        X
H_DEF_NOT_GRB   0x00000040       X       X        X        X
H_NEAR_SAA      0x00000080       X       X        X        X
H_POSS_SGR      0x00000100       X       X        X        X
H_DEF_SGR       0x00000200       X       X        X        X
H_POSS_XRB      0x00000400       X       X        X        X
H_DEF_XRB       0x00000800       X       X        X        X
H_GAMMA_DATA    0x00001000       X       X        X        X
H_WXM_DATA      0x00002000       X       X        X        X
H_SXC_DATA      0x00004000       X       X        X        X
H_OPT_DATA      0x00008000       X       X        X        X
H_WXM_POS       0x00010000       X       X        X        X
H_SXC_POS       0x00020000       X       X        X        X
H_TRIG_spare    0xFFFD0000    


POS_FLAGS:

H_WXM_SXC_SAME   0x00000001              X        X        X
H_WXM_SXC_DIFF   0x00000002              X        X        X
H_WXM_LOW_SIG    0x00000004   ???
H_SXC_LOW_SIG    0x00000008   ???
H_GAMMA_REFINED  0x00000010                                X
H_WXM_REFINED    0x00000020                                X
H_SXC_REFINED    0x00000040                                X
H_POS_spare      0x00FFFFB0    
H_SC_LONG        0xFF000000      X       X        X        X


VALIDITY:

H_BURST_VALID   0x00000001                         X       X
H_BURST_INVALID 0x00000002                         X       X
H_VAL0x4_spare  0x00000004    
H_VAL0x8_spare  0x00000008
H_EMERGE_TRIG   0x00000010               X         X       X
H_KNOWN_XRS     0x00000020               X         X       X
H_NO_POSITION   0x00000040               X         X       X
H_VAL0x80_spare 0x00000080    
H_OPS_ERROR     0x00000100                                 X
H_PARTICLES     0x00000200                                 X
H_BAD_FLT_LOC   0x00000400                                 X
H_BAD_GND_LOC   0x00000800                                 X
H_RISING_BACK   0x00001000                                 X
H_POISSON_TRIG  0x00002000                                 X
H_VALID_spare   0x1FFFC000    
H_EMAIL_METHOD  0x20000000                                 X
H_INTERNAL_TEST 0x40000000                                 X
H_NOT_A_BURST   0x80000000                                 X


SLOT 38:

H_X_LC          0xff000000                X        X       X
H_Y_LC          0x00ff0000                X        X       X
H_X_IMAGE       0x0000ff00                X        X       X
H_Y_IMAGE       0x000000ff                X        X       X



TYPE=44 PACKET CONTENTS:

The HETE_Test packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=44)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_seq_num integers        Trigger num & mesg sernum
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         9       trig_flags   bits            Trigger type ID flag bits
long        10       gamma_cnts   [cnts/sec]      GammaDet count rate
long        11       wxm_signoise [centi-sig/nois]WXM rate trigger signal/noise
long        12       sxc_cnts     [cnts/sec]      SXC det count rate
long        13       gamma_time   [milli-sec]     GammaDet timescale
long        14       wxm_time     [milli-sec]     WXM det timescale
long        15       sc_point     integers        S/c RA,Dec pointing dir
long        16       wxra1        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        17       wxdec1       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        18       wxra2        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        19       wxdec2       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        20       wxra3        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        21       wxdec3       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        22       wxra4        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        23       wxdec4       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        24       wx_errors    bit fields      Packed with Sys & Stat errors
long        25       wx_dimsig    bit fields      Packed numbers
long        26       sxra1        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        27       sxdec1       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        28       sxra2        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        29       sxdec2       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        30       sxra3        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        31       sxdec3       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        32       sxra4        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        33       sxdec4       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        34       sx_errors    bit fields      Packed with Sys & Stat errors
long        35       sx_simsig    bit fields      Packed numbers
long        36       pos_flags    bits            Mixed bits: pos, signif, data
long        37       validity     bits            Trigger source ID type
long        38       lc_img_sn    4 bytes         WXM X&Y LightCurve & Image SN
long        39       pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS (only those unique to type=44):

There are no unique (new) fields in packet type=44.  All the fields defined
in type=43 are also present in type=44.





HETE-BASED PACKET ITEM MACROS:

Below are the C-language define's for picking out the various elements
of the array of longs that make up the HETE-based packets.  They have names
which reflect the contents of packet types 40, 41, 42, 43, & 44.  A few of the
items have the same names as the original BATSE-based packets, because
they are common to all type-bases.  For the other (non-HETE-based) types,
these macros should not be used because these macro names would conote
the wrong information content.

/* Indices into the socket packet array of 40 longs: */
#define PKT_TYPE         0   /* Packet type */
#define PKT_SERNUM       1   /* Packet serial number */
#define PKT_HOP_CNT      2   /* Packet hop count */
#define PKT_SOD          3   /* Packet Sec-of-Day [centi-sec] (sssss.sss*100) */
#define BURST_TRIG       4   /* HETE trigger number plus message sequence num */
#define BURST_TJD        5   /* Truncated Julian Day */
#define BURST_SOD        6   /* Sec-Of-Day [centi-sec] (sssss.sss*100) */
#define BURST_RA         7   /* RA  [10^-4-deg] (0.0 to 359.9999 *100) */
#define BURST_DEC        8   /* Dec [10^-4-deg] (-90.0 to +90.0 *100) */
#define TRIG_FLAGS       9   /* See flags below */
#define GAMMA_CTS_S     10   /* cts/s defined by gamma, can be 0 */
#define WXM_CTS_S       11   /* cts/s defined by WXM, can be 0 */
#define SXC_CTS_S       12   /* cts/s defined by SXC, can be 0 */
#define GAMMA_TIMESCALE 13   /* in milliseconds */
#define WXM_TIMESCALE   14   /* in milliseconds */
#define SC_POINTING     15   /* S/c pointing direction in degrees */
#define WXM_CNR1_RA     16   /* First corner of WXM error box */
#define WXM_CNR1_DEC    17   /* First corner of WXM error box */
#define WXM_CNR2_RA     18   /* Second corner of WXM error box */
#define WXM_CNR2_DEC    19   /* Second corner of WXM error box */
#define WXM_CNR3_RA     20   /* Third corner of WXM error box */
#define WXM_CNR3_DEC    21   /* Third corner of WXM error box */
#define WXM_CNR4_RA     22   /* Fourth corner of WXM error box */
#define WXM_CNR4_DEC    23   /* Fourth corner of WXM error box */
#define WXM_ERRORS      24   /* Arcsec, stat high, sys low */
#define WXM_DIM_NSIGMA  25   /* Max box size (arcsec), significance of loc'n */
#define SXC_CNR1_RA     26   /* First corner of SXC error box */
#define SXC_CNR1_DEC    27   /* First corner of SXC error box */
#define SXC_CNR2_RA     28   /* Second corner of SXC error box */
#define SXC_CNR2_DEC    29   /* Second corner of SXC error box */
#define SXC_CNR3_RA     30   /* Third corner of SXC error box */
#define SXC_CNR3_DEC    31   /* Third corner of SXC error box */
#define SXC_CNR4_RA     32   /* Fourth corner of SXC error box */
#define SXC_CNR4_DEC    33   /* Fourth corner of SXC error box */
#define SXC_ERRORS      34   /* Arcsec, stat high, sys low */
#define SXC_DIM_NSIGMA  35   /* Max box size (arcsec), significance of loc'n */
#define POS_FLAGS       36   /* Collection of various info bits */
#define VALIDITY        37   /* Trigger identity, source type, etc */
#define H_LC_IMG_SN     38   /* LightCurve and Image Sig/Noise ratios */
#define PKT_TERM        39   /* Packet termination character */





================================================================================

TYPE=45 PACKET CONTENTS:

The GRB_COUNTERPART packet covers detections of the burst counterpart
in both the optical, radio, and other (x-ray, TeV, neutrinos, etc ...) bandpasses.
However, to make the field_names shorter, they were given names
with an optical bias.  Only the name has this bias, the contents
cover the optical, the radio, the x-ray, particles, etc.

The GRB_COUNTERPART packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=45)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       ref_num      integer         Some reference number (eg trig_num)
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       cp_ra        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         8       cp_dec       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         9       cp_inten     [centi-mag]     (int)(mm.mm *100)
long        10       inten_err    [centi-mag]     (int)(mm.mm *100)
long        11       cp_error     [10^-4-deg]     (int)(0.0 to 180.0 *10000)
long        12       filter       integer         Opt_fltr, Radio_freq, Oth_??
long        13       seeing       [centi-arcsec]  (int)(ss.ss *100)
long        14       obs_tjd      [days]          Truncated Julian Day
long        15       obs_time     [centi-sec]     (int)(sssss.sss *100)
long        16       obs_dur      [centi-sec]     (int)(sssss.sss *100)
long        17       id_conf      [centi-%]       (int)(0.0 to 100.00 *100)
long        18       flags        bits            Flag bits on source-type
long        19       misc         bits            Misc flag bits and fields
quad_char   20-23    telescope    -               The name of the telescope
quad_char   24-38    name         -               The name of the submittor
long        39       pkt_term     integer         Pkt Termination (always = \n)



PACKET ITEM DESCRIPTIONS (type=45):


The "pkt_type" is an integer with a value of 45, which tells that this packet
is of type GRB_COUNTERPART and therefore indicates the contents and format
for the other 39 fields.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1 when
the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 1.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "ref_num" is a reference number for that burst.  Typically it is a trigger_number
of the burst for tht mission that made the original detection of the burst.

The "burst_tjd" is the Truncated Julian Day of the burst,
eg. TJD=12275 is 01 Jan 2002.

The "burst_sod" is the UT seconds-of-day (SOD) of the burst.  The SOD
is multiplied by 100, and converted to a 32-bit integer for the packet
(i.e the units are centi-sec; 10 msec),  eg. 4689568 = 46895.68 sec-of-day =
13:01:35.68 UT.

The "cp_ra" and "cp_dec" fields specify the RA,Dec location of the detected
GRB counterpart (in J2000 epoch).  These intrinsically floating point
quantities have been multiplied by 10,000 and then integerized to make
an integer quantity with units of 10^-4-degrees.

The "cp_inten" field contains the magnitude of the detected optical transient.
The units are centi-magnitudes (ie the magnitude was multiplied by 100 and
then integerized).  If the packet is for a counterpart detection
in the radio band (see the misc flag bits field), then the "cp_mag" field
contains the flux in centi-uJy (ie 10^-8 Janskies).  If the counterpart
detection in the "other" (x-/g-ray) category, then the units type are specified
by the 'expo' subfield in the 'filter' field and then multiplied by 100 and integerized.

The "inten_error" field contains the uncertainty (statistical plus systematic)
of the cp_inten value.  The units are also centi-magnitudes or centi-uJy or
centi-units for 'other' (eg centi-kHz, centi-MHz, centi-GHz, centi-keV,...,centi-TeV).
(See the 'expo' subfield in the 'filter' value.)

The "cp_error" is the radius of the circle that will contain on average
68% of the counterpart locations.  The units are 10^-4-degrees.

The "filter" field specifies the filter that was used for the observation.
The filter_index comes from a predefined list [see below].
 0 n/a
 1 U
 2 B
 3 V
 4 R
 5 I
 6 J
 7 K
 8 L
 9 M
10 r
The upper 8 bits (of this 32-bit field) contain the 'exponent' of the 'band'
if this is a 'radio' or 'other' counterpart observation:
RADIO:
  3 kHz
  6 MHz
  9 GHz
OTHER:
  3  keV
  6  MeV
  9  GeV
  12 TeV
  15 PeV

The "seeing" field contains the seeing during the observation.  The units
are centi-arcsec.

The "obs_tjd" is the Truncated Julian Day of the start of the observation.
The "obs_sod" is the Seconds-of-Day of the start of the observation.
The "obs_dur" is the duration in centi-seconds of the observation.  The seconds
is multiplied by 100 and then integerized (i.e. the units are centi-sec; 10 msec).

The "id_conf" is the confidence level of the identification of the counterpart to the GRB.
The percentage_value is multiplied by 100 and then integerized (i.e. the units are centi-%).

The "trig_id" field contains flag bit bits relating to the source-type identity.
Bit_Number     Item_name      Description
----------     ---------      -----------
0              n/a            n/a
1              GRB_DEF        This is definitely related to a GRB
2-31           x_x_x_x        spare

The "misc" field contains various miscelaneous flags and fields.
The bit packing of the "misc" entry in the packet is:
Bit_Number     Item_name      Description
----------     ---------      -----------
0-4            n/a            n/a
5-6            type           optical=1/radio=2/other=3

The "telescope" is the name of the telescope that made the detection.
This item in the packet spans 4 longwords (ie 16 bytes) and contains 
the ASCII string of the name of the telescope.  This string can be
up to 15 characters long, and will always be null-terminated.

The "name" is the name of the person submitting this counterpart detection notice.
This item in the packet spans 15 longwords (ie 60 bytes) and contains 
the ASCII string of the name of the submittor.  This string can be
up to 59 characters long, and will always be null-terminated.

There are no "spare" items in this packet.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long in
the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of GCN operation
(called BACODINE in those days).  It has since become a permanent fixture
as multiple sites are now operating, and it is not wise to play
with format/content changes.  And it still does function as a fixed-content
termination value for processing/transmission checking.


 
================================================================================



TYPE=46 PACKET CONTENTS:
TYPE=47 PACKET CONTENTS:

See packet types 65 and 67 respectively.



================================================================================

PACKET ITEM DESCRIPTIONS for type=51:

The INTEGRAL_POINTDIR packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=51)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_sub_num integers        Trigger num & mesg sernum
long         5       slew_tjd     [days]          Truncated Julian Day
long         6       slew_sod     [centi-sec]     (int)(sssss.sss *100)
long         7-11    spare[5]     integer         20 bytes for the future
long        12       test_mpos    flag_bits       Test and Multi-Position flags
long        13       spare[1]     integer         4 bytes for the future
long        14       next_sc_ra   [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long        15       next_sc_dec  [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long        16-18    spare[3]     integer         12 bytes for the future
long        19       misc_att     integer         S/c status & attitude
long        20-38    spare[19]    integer         76 bytes for the future
long        39       pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 51, 52, 53 , 54, or 55
that tells which type of packet this is and therefore what the contents are
(the contents change slightly between the various types).  The types are:
51 = INTEGRAL_POINTDIR, 52 = INTEGRAL_SPIACS, 53 = INTEGRAL_WAKEUP,
54 = INTEGRAL_REFINED, and 55 = INTEGRAL_OFFLINE.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created and sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_sub_num" are the uniquely identifying serial numbers (main and sub)
assigned by the on-board INTEGRAL flight software to each trigger.
The lower 16 bits contain the trigger ("Alert") number, and the upper 16 bits
contain the Alert sub-number.  The sub-number is always 0 for type=53;
goes from 1 to N for type=54; and N+1, N+2, ... for type=55.
The Alert number started with s/n=??? just after launch (Oct 02) and
is currently (???03) in the ???'s.

The "slew_tjd" is the TJD when the next s/c slew happens.

The "slew_sod" is the seconds-of-day (SOD) when the next s/c slew happens.

The "test_mpos" field contains the Test_Notice flag bit (2^31) and
the multiple_position flag bit (2^0).  The multi-position flag is meaningless
for the POINTDIR Notice.

The "next_sc_ra" and "next_sc_dec" are the RA,Dec (J2000) coordinates
to which the spacecraft will point after this slew.  This is the pointing
direction of the s/c.  The units are 10^04 deg, ie the values
where multiplied by 10000 and integerized.

The "misc_att" field contains status and attitude information on the s/c.
The exact contents and format are still TBD at the INTEGRAL MOC.

There are a total of 28 "spare" items in the packet (usually filled with zeros).
They are located at items 7-11,13, 16-18, and 20-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=52 PACKET CONTENTS:

The INTEGRAL_SPIACS packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=52)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_sub_num integers        Trigger num & mesg sernum
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7-8     spare[2]     integer         8 bytes for the future
long         9       det_flags    flag_bits       Detector flag bits
long         10      inten_sigma  [centi-sigma]   Burst_intensity_sigma*100
long         11      spare[1]     integer         4 bytes for the future
long         12      test_mpos    flag_bits       Test and Multi-Position flags
long         13      time_scale   [10^-4 sec]     Time sampling or trigger time
long         14-15   spare[2]     integer         8 bytes for the future
long         16      time_error   [10^-4 sec]     ????
long         17-18   spare[2]     integer         8 bytes for the future
long         19      misc_att     integer         S/c status & attitude
long         20-38   spare[19]    integer         76 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 51, 52, 53 , 54, or 55
that tells which type of packet this is and therefore what the contents are
(the contents change slightly between the various types).  The types are:
51 = INTEGRAL_POINTDIR, 52 = INTEGRAL_SPIACS, 53 = INTEGRAL_WAKEUP,
54 = INTEGRAL_REFINED, and 55 = INTEGRAL_OFFLINE.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_sub_num" are the uniquely identifying serial numbers (main and sub)
assigned by the on-board INTEGRAL flight software to each trigger.
The lower 16 bits contain the trigger ("Alert") number, and the upper 16 bits
contain the Alert sub-number.  The sub-number is always 0 for type=53;
goes from 1 to N for type=54; and N+1, N+2, ... for type=55.
The Alert number started with s/n=??? just after launch (Oct 02) and
is currently (???03) in the ???'s.

The "burst_tjd" is the Truncated Julian Day of the INTEGRAL burst trigger,
eg. TJD=12640 is 01 Jan 2003.

The "burst_sod" is the UT seconds-of-day (SOD) of the INTEGRAL burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "det_flags" ("trig_id") field contains bit_flags specifing
the trigger process.  The bit packing of the "det_flags" entry in the packet
is unknown as yet (TBD at the INTEGRAL MOC).

The "intensity_sigma" field contains the intensity of the burst in sigma units,
essentially a signal/noise metric.  The units are 'centi-sigma', ie the fl.pt.
sigma was multiplied by 100 and then integerized and put into the packet.

The "test_mpos" field contains the Test_Notice flag bit (2^31) and
the multiple_position flag bit (2^0).  The multi-position flag is meaningless
for the SPIACS Notice.

The "test_mpos" field contains the following bit_flags:
Bit_Number     Item_name      Description
----------     ---------      -----------
0              multi_position 0=No or 1=Yes, the INTEGRAL Gnd s/w there was more
                                             than one likely position for this burst.
                                             In that case, the RA,Dec fields
                                             ????contain/do_not_contain????
                                             the most likely position (I'm waiting
                                             for info from the Ops team).
1-28           x_x_x_x        spare
29             temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30             def_not_grb    0=No or 1=Yes, it is definitely not a GRB.
31             test           0=No or 1=Yes, it is a Test_Notice.

The "time_scale" field has the sampling interval used.  For type=52 (SPIACS)
it is the lightcurve binning;  for type=53 and 54 (WAKEUP and REFINED) it is
the SIT and IMITS that triggered;  and for type=55 (OFFLINE) it is the TBD
duration of the burst.

The "time_error" field contains the accuracy of the GRB timing information
(units are 10^-4 seconds).  This is usually the sum of the time bin size
used for the image reconstruction and the propogation delay.  It is expected
(by the INTEGRAL MOC) that type=55 packets (OFFLINE) will be corrected
for propogation delays.

The "sc_ra" and "sc_dec" are the RA,Dec (J2000) coordinates
to which the spacecraft points.  This is the pointing direction of the s/c.
The units are 10^04 deg, ie the values where multiplied by 10000 and 
integerized.

The "misc_att" field contains status and attitude information on the s/c.
The exact contents and format are still TBD at the INTEGRAL MOC.

There are a total of 26 "spare" items in the packet (usually filled
with zeros).  They are located at items 7-8, 11, 14-15, and 20-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=53 PACKET CONTENTS:

The INTEGRAL_WAKEUP packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=53)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_sub_num integers        Trigger num & mesg sernum
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         9       det_flags    bits            Detector flag bits
long         10      inten_sigma  [centi-sigma]   Burst_intensity_sigma*100
long         11      burst_error  [arcsec]        Burst location uncertainty 
long         12      test_mpos    flag_bits       Test and Multi-Position flags
long         13      time_scale   [10^-4 sec]     Time sampling or trigger time
long         14      sc_ra        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         15      sc_dec       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         16      time_error   [10^-4 sec]     ?????
long         17-18   spare[2]     integer         8 bytes for the future
long         19      misc_att     integer         S/c status & attitude
long         20-38   spare[19]    integer         76 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 51, 52, 53 , 54, or 55
that tells which type of packet this is and therefore what the contents are
(the contents change slightly between the various types).  The types are:
51 = INTEGRAL_POINTDIR, 52 = INTEGRAL_SPIACS, 53 = INTEGRAL_WAKEUP,
54 = INTEGRAL_REFINED, and 55 = INTEGRAL_OFFLINE.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_sub_num" are the uniquely identifying serial numbers (main and sub)
assigned by the on-board INTEGRAL flight software to each trigger.
The lower 16 bits contain the trigger ("Alert") number, and the upper 16 bits
contain the Alert sub-number.  The sub-number is always 0 for type=53;
goes from 1 to N for type=54; and N+1, N+2, ... for type=55.
The Alert number started with s/n=~1 just after launch (Oct 02) and
is currently (Oct2006) in the 3500s.

The "burst_tjd" is the Truncated Julian Day of the INTEGRAL burst trigger,
eg. TJD=12640 is 01 Jan 2003.

The "burst_sod" is the UT seconds-of-day (SOD) of the INTEGRAL burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the trigger/burst
(current epoch).  These intrinsically floating point quantities
have been multiplied by 10000 and then integerized to make an integer quantity
with units of 10^-4-degrees.

The "det_flags" ("trig_id") field contains bit_flags specifing
the trigger process.  The bit packing of the "det_flags" entry in the packet
is unknown as yet (TBD at INTEGRAL MOC).

The "intensity_sigma" field contains the intensity of the burst in sigma units,
essentially a signal/noise metric.  The units are 'centi-sigma', ie the fl.pt.
sigma was multiplied by 100 and then integerized and put into the packet.

The "burst_error" is the radius of the circle that will contain on average
TBD% c.l. of the bursts.  The units are arcseconds.

The "test_mpos" field contains the following bit_flags:
Bit_Number     Item_name      Description
----------     ---------      -----------
0              multi_position 0=No or 1=Yes, the INTEGRAL Gnd s/w there was more
                                             than one likely position for this burst.
                                             In that case, the RA,Dec fields
                                             ????contain/do_not_contain????
                                             the most likely position (I'm waiting
                                             for info from the Ops team).
1-27           x_x_x_x        spare
28             spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29             temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30             def_not_grb    0=No or 1=Yes, it is definitely not a GRB.
31             test           0=No or 1=Yes, it is a Test_Notice.

The "time_scale" field has the sampling interval used.  For type=52 (SPIACS)
it is the lightcurve binning;  for type=53 and 54 (WAKEUP and REFINED) it is
the SIT and IMITS that triggered;  and for type=55 (OFFLINE) it is the TBD
duration of the burst.

The "sc_ra" and "sc_dec" are the RA,Dec (J2000) coordinates
to which the spacecraft points.  This is the pointing direction of the s/c.
The units are 10^04 deg, ie the values where multiplied by 10000 and 
integerized.

The "time_error" field contains the accuracy of the GRB timing information
(units are 10^-4 seconds).  This is usually the sum of the time bin size
used for the image reconstruction and the propogation delay.  It is expected
(by the INTEGRAL MOC) that type=55 packets (OFFLINE) will be corrected
for propogation delays.

The "misc_att" field contains status and attitude information on the s/c.
The exact contents and format are still TBD at the INTEGRAL MOC.

There are a total of 23 "spare" items in the packet (usually filled
with zeros).  They are located at items 11-12, 17-18, and 20-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=54 PACKET CONTENTS:

The INTEGRAL_REFINED packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=54)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_sub_num integers        Trigger num & mesg sernum
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         9       det_flags    bits            Detector flag bits
long         10      inten_sigma  [centi-sigma]   Burst_intensity_sigma*100
long         11      burst_error  [arcsec]        Burst location uncertainty 
long         12      test_mpos    flag_bits       Test and Multi-Position flags
long         13      time_scale   [10^-4 sec]     Time sampling or trigger time
long         14      sc_ra        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         15      sc_dec       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         16      time_error   [10^-4 sec]     ?????
long         17-18   spare[2]     integer         8 bytes for the future
long         19      misc_att     integer         S/c status & attitude
long         20-38   spare[19]    integer         76 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 51, 52, 53 , 54, or 55
that tells which type of packet this is and therefore what the contents are
(the contents change slightly between the various types).  The types are:
51 = INTEGRAL_POINTDIR, 52 = INTEGRAL_SPIACS, 53 = INTEGRAL_WAKEUP,
54 = INTEGRAL_REFINED, and 55 = INTEGRAL_OFFLINE.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_sub_num" are the uniquely identifying serial numbers (main and sub)
assigned by the on-board INTEGRAL flight software to each trigger.
The lower 16 bits contain the trigger ("Alert") number, and the upper 16 bits
contain the Alert sub-number.  The sub-number is always 0 for type=53;
goes from 1 to N for type=54; and N+1, N+2, ... for type=55.
The Alert number started with s/n=??? just after launch (Oct 02) and
is currently (???03) in the ???'s.

The "burst_tjd" is the Truncated Julian Day of the INTEGRAL burst trigger,
eg. TJD=12640 is 01 Jan 2003.

The "burst_sod" is the UT seconds-of-day (SOD) of the INTEGRAL burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the trigger/burst
(current epoch).  These intrinsically floating point quantities
have been multiplied by 10000 and then integerized to make an integer quantity
with units of 10^-4-degrees.

The "det_flags" ("trig_id") field contains bit_flags specifing
the trigger process.  The bit packing of the "det_flags entry in the packet
is unknown as yet (TBD at INTEGRAL MOC).

The "intensity_sigma" field contains the intensity of the burst in sigma units,
essentially a signal/noise metric.  The units are 'centi-sigma', ie the fl.pt.
sigma was multiplied by 100 and then integerized and put into the packet.

The "burst_error" is the radius of the circle that will contain on average
TBD% c.l. of the bursts.  The units are arcseconds.

The "test_mpos" field contains the following bit_flags:
Bit_Number     Item_name      Description
----------     ---------      -----------
0              multi_position 0=No or 1=Yes, the INTEGRAL Gnd s/w there was more
                                             than one likely position for this burst.
                                             In that case, the RA,Dec fields
                                             ????contain/do_not_contain????
                                             the most likely position (I'm waiting
                                             for info from the Ops team).
1-27           x_x_x_x        spare
28             spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29             temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30             def_not_grb    0=No or 1=Yes, it is definitely not a GRB.
31             test           0=No or 1=Yes, it is a Test_Notice.

The "time_scale" field has the sampling interval used.  For type=52 (SPIACS)
it is the lightcurve binning;  for type=53 and 54 (WAKEUP and REFINED) it is
the SIT and IMITS that triggered;  and for type=55 (OFFLINE) it is the TBD
duration of the burst.

The "sc_ra" and "sc_dec" are the RA,Dec (J2000) coordinates
to which the spacecraft points.  This is the pointing direction of the s/c.
The units are 10^04 deg, ie the values where multiplied by 10000 and 
integerized.

The "time_error" field contains the accuracy of the GRB timing information
(units are 10^-4 seconds).  This is usually the sum of the time bin size
used for the image reconstruction and the propogation delay.  It is expected
(by the INTEGRAL MOC) that type=55 packets (OFFLINE) will be corrected
for propogation delays.

The "misc_att" field contains status and attitude information on the s/c.
The exact contents and format are still TBD at the INTEGRAL MOC.

There are a total of 23 "spare" items in the packet (usually filled
with zeros).  They are located at items 11-12, 17-18, and 20-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=55 PACKET CONTENTS:

The INTEGRAL_OFFLINE packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=55)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_sub_num integers        Trigger num & mesg sernum
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         9       det_flags    bits            Detector flag bits
long         10      inten_sigma  [centi-sigma]   Burst_intensity_sigma*100
long         11      burst_error  [arcsec]        Burst location uncertainty 
long         12      test_mpos    flag_bits       Test and Multi-Position flags
long         13      time_scale   [10^-4 sec]     Time sampling or trigger time
long         14      sc_ra        [10^-4-deg]     (int)(0.0 to 359.9999 *10000)
long         15      sc_dec       [10^-4-deg]     (int)(-90.0 to +90.0 *10000)
long         16      time_error   [10^-4 sec]     ?????
long         17-18   spare[2]     integer         8 bytes for the future
long         19      misc_att     integer         S/c status & attitude
long         20-38   spare[19]    integer         76 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 51, 52, 53 , 54, or 55
that tells which type of packet this is and therefore what the contents are
(the contents change slightly between the various types).  The types are:
51 = INTEGRAL_POINTDIR, 52 = INTEGRAL_SPIACS, 53 = INTEGRAL_WAKEUP,
54 = INTEGRAL_REFINED, and 55 = INTEGRAL_OFFLINE.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_sub_num" are the uniquely identifying serial numbers (main and sub)
assigned by the on-board INTEGRAL flight software to each trigger.
The lower 16 bits contain the trigger ("Alert") number, and the upper 16 bits
contain the Alert sub-number.  The sub-number is always 0 for type=53;
goes from 1 to N for type=54; and N+1, N+2, ... for type=55.
The Alert number started with s/n=??? just after launch (Oct 2002) and
is currently (???03) in the ???'s.

The "burst_tjd" is the Truncated Julian Day of the INTEGRAL burst trigger,
eg. TJD=12640 is 01 Jan 2003.

The "burst_sod" is the UT seconds-of-day (SOD) of the INTEGRAL burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the trigger/burst
(current epoch).  These intrinsically floating point quantities
have been multiplied by 10000 and then integerized to make an integer quantity
with units of 10^-4-degrees.

The "det_flags" ("trig_id") field contains bit_flags specifing
the trigger process.  The bit packing of the "det_flags" entry in the packet
is unknown as yet (TBD at INTEGRAL MOC).

The "intensity_sigma" field contains the intensity of the burst in sigma units,
essentially a signal/noise metric.  The units are 'centi-sigma', ie the fl.pt.
sigma was multiplied by 100 and then integerized and put into the packet.

The "burst_error" is the radius of the circle that will contain on average
TBD% c.l. of the bursts.  The units are arcseconds.

The "test_mpos" field contains the following bit_flags:
Bit_Number     Item_name      Description
----------     ---------      -----------
0              multi_position 0=No or 1=Yes, the INTEGRAL Gnd s/w there was more
                                             than one likely position for this burst.
                                             In that case, the RA,Dec fields
                                             ????contain/do_not_contain????
                                             the most likely position (I'm waiting
                                             for info from the Ops team).
1-27           x_x_x_x        spare
28             spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29             temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30             def_not_grb    0=No or 1=Yes, it is definitely not a GRB.
31             test           0=No or 1=Yes, it is a Test_Notice.

The "time_scale" field has the sampling interval used.  For type=52 (SPIACS)
it is the lightcurve binning;  for type=53 and 54 (WAKEUP and REFINED) it is
the SIT and IMITS that triggered;  and for type=55 (OFFLINE) it is the TBD
duration of the burst.

The "sc_ra" and "sc_dec" are the RA,Dec (J2000) coordinates
to which the spacecraft points.  This is the pointing direction of the s/c.
The units are 10^04 deg, ie the values where multiplied by 10000 and 
integerized.

The "time_error" field contains the accuracy of the GRB timing information
(units are 10^-4 seconds).  This is usually the sum of the time bin size
used for the image reconstruction and the propogation delay.  It is expected
(by the INTEGRAL MOC) that type=55 packets (OFFLINE) will be corrected
for propogation delays.

The "misc_att" field contains status and attitude information on the s/c.
The exact contents and format are still TBD at the INTEGRAL MOC.

There are a total of 23 "spare" items in the packet (usually filled
with zeros).  They are located at items 11-12, 17-18, and 20-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



================================================================================

TYPE=57 PACKET CONTENTS:

The SNEWS packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=57)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100)
long         4       trig_num     integer         Trigger num
long         5       event_tjd    [days]          Truncated Julian Day
long         6       event_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       event_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       event_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       event_sig    [evts]          Events [counts] (0 to infinity)
long         10      spare        integer         4 bytes for the future
long         11      event_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12      containent   [centi-%]       (int)(0.00 to 100.00 *100)
long         13      duration     [centi-sec]     (int)(0.0 to inf *100)
long         14-17   spare[4]     integer         16 bytes for the future
long         18      trig_id      bits            Trigger identification flags
long         19      misc         bits            Misc stuff packed in here
long         20-38   spare[19]    integer         76 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 57, which tells that this packet
is of type SNEWS and therefore indicates the contents and format
for the other 39 fields.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the event_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is the uniquely identifying serial number
assigned by the SNEWS software to each trigger.

The "event_tjd" is the Truncated Julian Day of the trigger,
eg. TJD=12640 is 01 Jan 2003.

The "event_sod" is the UT seconds-of-day (SOD) of the trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).  This is the beginning of of the 'duration' search window
of the successful trigger.

The "event_ra" and "event_dec" are the RA,Dec coordinates of the trigger/burst
as determined by the SNEWS software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "event_signal" is actually the integrated fluence of the burst/event
over the duration of the trigger.  The units are counts (ie number of neutrinos).
If this is an 'individual' notice sub-type, then it is the number of neutrinos
detected in that instrument.  If it is a 'coincidence' sub-type, then it is
the sum of the numbers of neutrinos detected in the contributing instruments.

The "event_error" is the radius of the circle that will contain on average
TBD% of the event locations.  The units are 0.0001-deg (ie the error was multiplied 
by 10000 and then integerized).

The "event_cont" is the confidence containment percentage for the quoted
event_error value.  It is stored in the packet in centi-percentage
(e.g. 98.5% would be an integer value of 9850).

The "duration" is the time interval of the search window of the event_times stream
looking for an increase.  The units are centi-seconds, ie fl.pt. seconds time 100,
then integerized.  For the "coincidence" subtype, this will always be 10.0 sec;
and for the "individual" subtype, it will be variable and be the delta_time
between the first neutrino detected in that instrument and the last detected.

The "trigger_id" field contains bit_flags which attempt to identify
the type of transient event that triggered the SNEWS system.
The bit packing of the "trigger_id" entry in the packet is:
Bit_Number     Item_name      Description
----------     ---------      -----------
0              Subtype        Notice sub-type: 0=Individual, 1=Coincidence
1              test_flag      Test-type: 0=Real, 1=Test
2              radec_undef    RA,Dec knowledge: 0=defined, 1=Undefined (no position known)
3-4                    
5              retract        0=No or 1=Yes, it is definitely not a GRB (a Retraction)

The "misc" field contains various bit_flags.
The bit packing is:
Bit_Number     Item_name      Description
----------     ---------      -----------
0              SuperK_part    SuperK contribution flag
1              SK_good        Quality_factor is 'good'
2              SK_poss        Quality_factor is 'possible'
3              SK_oride       Quality_factor is 'override'
4              SNO_part       SNO contribution flag
5              SNO_good       Quality_factor is 'good'
6              SNO_poss       Quality_factor is 'possible'
7              SNO_oride      Quality_factor is 'override'
8              LVD_part       LVD contribution flag
9              LVD_good       Quality_factor is 'good'
10             LVD_poss       Quality_factor is 'possible'
11             LVD_oride      Quality_factor is 'override'
12             ICE_part       ICE contribution flag
13             ICE_good       Quality_factor is 'good'
14             ICE_poss       Quality_factor is 'possible'
15             ICE_oride      Quality_factor is 'override'
16             TBD_part       TBD_instrument contribution flag
17             TBD_good       Quality_factor is 'good'
18             TBD_poss       Quality_factor is 'possible'
19             TBD_oride      Quality_factor is 'override'
20             TBD_part       TBD_instrument contribution flag
21             TBD_good       Quality_factor is 'good'
22             TBD_poss       Quality_factor is 'possible'
23             TBD_oride      Quality_factor is 'override'
24             TBD_part       TBD_instrument contribution flag
25             TBD_good       Quality_factor is 'good'
26             TBD_poss       Quality_factor is 'possible'
27             TBD_oride      Quality_factor is 'override'
28             TBD_part       TBD_instrument contribution flag
29             TBD_good       Quality_factor is 'good'
30             TBD_poss       Quality_factor is 'possible'
31             TBD_oride      Quality_factor is 'override'


There are a total of 24 "spare" items in the packet (usually filled
with zeros).  They are located at items 10, 14-17, and 20-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.


================================================================================

TYPE=58 PACKET CONTENTS:

The MILAGRO packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=58)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger num
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_sig    [evts]          Events [counts] (0 to infinity *10000)
long         10      bkg          [0.0001-evts]   Background events (0 to infinity *10000)
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12      signif       -               (int)(-log10(signif) *100)
long         13      duration     [centi-sec]     (int)(0.0 to inf *100)
long         14      ann_rate     [0.01*N/yr]     (int)(0.0 to inf *100)
long         15      zenith       [centi-deg]     (int)(0.0 to +90.0 *100)
long         16-17   spare[2]     integer         8 bytes for the future
long         18      trig_id      bits            Trigger identification flags
long         19      misc         bits            Misc stuff packed in here
long         20-38   spare[19]    integer         76 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 58, which tells that this packet
is of type MILAGRO and therefore indicates the contents and format
for the other 39 fields.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is the uniquely identifying serial number
assigned by the MILAGRO software to each trigger.

The "burst_tjd" is the Truncated Julian Day of the trigger,
eg. TJD=12640 is 01 Jan 2003.

The "burst_sod" is the UT seconds-of-day (SOD) of the trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).  This is the beginning of of the 'duration' search window
of the successful trigger.

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the trigger/burst
as determined by the MILAGRO software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "signal" is actually the integrated fluence of the burst
over the duration of the trigger.  The units are 'events' (ie counts).
Background events have NOT been subtracted.

The "background" is the counts seen in a 2-hr interval prior to the trigger.
This intrinsically floating point quantity have been multiplied by 10,000 and
then integerized to make an integer quantity with units of 0.0001-events.

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-deg (ie the error was multiplied 
by 10000 and then integerized).

The "signif" is the -100*log10(probability_of_false_detection).
It is only the statistical significance of the detection, or put another way,
-log10 of the probability that the source could be a natural fluctuation
within the Poisson background.   It is typically a small number (10^-12),
but since there are a large number of trials, this by itself is not an indication
of whether this is real GRB or just a chance fluctuation.  The annual_rate (see below)
will give a better handle on this aspect.  The number stored in this location is actually
the negative base_ten log of the significance multiplied by 100 and then integerized.

The "duration" is the time interval of the search window of the event_times stream
looking for an increase.  The units are centi-seconds, ie fl.pt. seconds time 100,
then integerized.

The "ann_rate" is the number of times per year that a fluctuation of this significance
at this duration interval is expected to be seen.  The units are 0.01/year
(ie the annual rate has been multiplied by 100, then integerized, and poked 
into the packet).

The "zenith" is the MILAGRO instrument zenith angle of the trigger (burst)
as determined by the MILAGRO software.  The units are centi-degrees.

The "trigger_id" field contains bit_flags which attempt to identify
the type of transient event that triggered the MILAGRO instrument.
The bit packing of the "trigger_id" entry in the packet is:
Bit_Number     Item_name      Description
----------     ---------      -----------
0              possible_grb   0=No or 1=Yes, it is a possible GRB
1              definite_grb   0=No or 1=Yes, it is definitely a GRB
2-14           x_x_x_x        spare
15             def_not_grb    0=No or 1=Yes, it is definitely not a GRB
16-31          x_x_x_x        spare

The "misc" field contains various bit_flags and the message sequence number. 
The bit packing of the "trigger_id" entry in the packet is:
Bit_Number     Item_name      Description
----------     ---------      -----------
0-3            short          Subtype: 1=Short,2=medium(TBD),3=long(TBD)
4-23           x_x_x_x        spare
24-31          seq_num        The sequence number of this message
The first 4 bits are the Notice subtype.  Currently, only the 'short' subtype
is defined, but there is provisions for other subtypes, tentatively identified
as 'medium' and 'long' timescales of trigger durations/methods.
The 'seq_num' is a sequentially assigned number for each trigger.
As ground-processing (automated and humans-in-the-loop) progresses,
successive messages may be issued.  This sequence number keeps track
of those updates.

There are a total of 21 "spare" items in the packet (usually filled
with zeros).  They are located at items 16-17, and 20-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.


================================================================================

TYPE=59 PACKET CONTENTS:

The KONUS_LIGHTCURVE packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=59)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       spare        integer         4 bytes for the future
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7-17    spare[11]    integer         44 bytes for the future
long         18      trig_id      bits            Trigger identification flags
long         19-21   spare[3]     integer         12 bytes for the future
quad_char    22-38   url          -               The URL for the lightcurve
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 59, which tells that this packet
is of type KONUS_LC and therefore indicates the contents and format
for the other 39 fields.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is the uniquely identifying serial number
assigned by the KONUS software to each trigger.
The Trigger_number started with s/n=150 around Oct 04.

The "burst_tjd" is the Truncated Julian Day of the trigger,
eg. TJD=12640 is 01 Jan 2003.

The "burst_sod" is the UT seconds-of-day (SOD) of the trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "trigger_id" field contains bit_flags which attempt to identify
the type of event that triggered the KONUS instrument.
The bit packing of the "trigger_id" entry in the packet is:
Bit_Number     Item_name      Description
----------     ---------      -----------
//0            possible_grb   0=No or 1=Yes, it is a possible GRB
//1            definite_grb   0=No or 1=Yes, it is definitely a GRB
2-14           x_x_x_x        spare
//15           def_not_grb    0=No or 1=Yes, it is definitely not a GRB
16-28          x_x_x_x        spare
29             temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30-31          x_x_x_x        spare

The "url" is just the filename portion of the URL -- the leading path
for the full URL is "http://gcn.gsfc.nasa.gov/gcn/notices_k".
This item in the packet spans 17 longwords (ie 68 bytes) and contains 
the ASCII string of the filename portion of the URL.  This string
can be up to 67 characters long, and will always be null-terminated.

There are a total of 15 "spare" items in the packet (usually filled
with zeros).  They are located at items 7-21.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.


================================================================================

TYPE=60 PACKET CONTENTS:

The SWIFT_BAT_GRB_ALERT packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=60)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       trig_tjd     [days]          Truncated Julian Day
long         6       trig_sod     [centi-sec]     (int)(sssss.sss *100)
long         7-15    spare[9]     integer         40 bytes for the future
long         16      lon_lat      2_shorts        (int)(Longitude,Lattitude *100)
long         17      trig_index   integer         Rate_Trigger index
long         18      soln_status  bits            Type of source/trigger found
long         19      misc         bits            Misc stuff packed in here
long         20      spare        integer         4 bytes for the future
long         21      rate_signif  [centi-sigma]   (int)(sig2noise *100)
long         22-38   spare[17]    integer         68 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
60 = SWIFT_BAT_GRB_ALERT, 61 = SWIFT_BAT_GRB_POSITION, 62 = SWIFT_BAT_GRB_NACK_POSITION,
63 = SWIFT_BAT_GRB_LIGHTCURVE. (Only the raw BAT Notices are listed here;
see later for the other Swift-XRT/UVOT Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the trig_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 2004).

The "trig_tjd" is the Truncated Julian Day of the Swift-BAT trigger,
eg. TJD=13370 is 01 Jan 2005.  (Note that at the time when this Alert Notice
is issued, it is not yet known if this trigger is due to a real GRB,
or some non-GRB cause (eg. failed or false trigger).)

The "trig_sod" is the UT seconds-of-day (SOD) of the Swift-BAT trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).  (Since this is the Alert Notice, it is not known yet
if this trigger is a real GRB or just a false trigger.)

The "lon_lat" is the Longitude and Lattitude of the s/c at the time of the BAT trigger.
This 4-byte quantity is composed of two 2-byte integers.  The high-order short
is the latitude multiplied by 100 and integerized; the low-order short
is the longitude multiplied by 100 and integerized; ie both values are in centi-degrees.

The "trig_index" is the index value (row_number in the BAT on-board flight s/w table)
of the trigger criteria that was the highest-significance successful trigger.

The "soln_status" (aka trigger_id) field contains (a) flag bits on the type of solution
that was found in the on-board image and about whether it matches anything in the
on-board source catalog, and (b) flag bits that are assigned in the GCN ground-processing.
The bit packing of the "soln_status" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0-28     -     spare          spare for future use
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30       G     test_submit    0=No or 1=Yes, this is a test submission (internal use only)
31       -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  Not assigned.
2^25  Not assigned.
2^26  Not assigned.
2^27  Not assigned.
2^28  Not assigned.
2^29  Not assigned.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      A Gnd-generated Notice is issued anytime humans during ground operations
      have determined if this Notice should be issued.  This will typically be used
      during the early phases of the mission before the automatic real-time distribution
      capability is enabled.
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "rate_signif" is the significance level of the initial 'rate trigger'.
This is the signal/noise (ie number of sigma) of the rate-trigger detection
multiplied by 100 and then integerized (ie units are centi-sigma).

There are a total of 28 "spare" items in the packet (usually filled
with zeros).  They are located at items 7-16, 20, and 22-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=61 PACKET CONTENTS:

The SWIFT_BAT_GRB_POS_ACK packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=61)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_flue   [counts]        Num events during trig window, 0 to inf
long         10      burst_ipeak  [cnts*ff]       Counts in image-plane peak, 0 to infinity
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12      phi          [centi-deg]     (int)(0.0 to 359.9999 *100)
long         13      theta        [centi-deg]     (int)(0.0 to +70.0 *100)
long         14      integ_time   [4mSec]         Duration of the trigger interval, 1 to inf
long         15      spare        integer         4 bytes for the future
long         16      lon_lat      2_shorts        (int)(Longitude,Lattitude *100)
long         17      trig_index   integer         Rate_Trigger index
long         18      soln_status  bits            Type of source/trigger found
long         19      misc         bits            Misc stuff packed in here
long         20      image_signif [centi-sigma]   (int)(sig2noise *100)
long         21      rate_signif  [centi-sigma]   (int)(sig2noise *100)
long         22      bkg_flue     [counts]        Num events during the bkg interval, 0 to inf
long         23      bkg_start    [centi-sec]     (int)(sssss.sss *100)
long         24      bkg_dur      [centi-sec]     (int)(0-80,000 *100)
long         25      cat_num      integer         On-board cat match ID number
long         26-35   spare[10]    integer         40 bytes for the future
long         36      merit_0-3    integers        Merit params 0,1,2,3 (-127 to +127)
long         37      merit_4-7    integers        Merit params 4,5,6,7 (-127 to +127)
long         38      merit_8-9    integers        Merit params 8,9     (-127 to +127)
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
60 = SWIFT_BAT_GRB_ALERT, 61 = SWIFT_BAT_GRB_POSITION, 62 = SWIFT_BAT_GRB_NACK_POSITION,
63 = SWIFT_BAT_GRB_LIGHTCURVE. (Only the raw BAT Notices are listed here;
see later for the other Swift-XRT/UVOT Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger (this new burst).
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "burst_tjd" is the Truncated Julian Day of the Swift-BAT burst trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the Swift-BAT burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).  The trigger time can be off by +/- 320 msec
for events that have a trigger duration less than 64 msec.  This has to do with the way
that the flight software is optimized for execution speed for evaluating trigger criteria.

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the BAT flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "burst_flue" is the number of events (burst+background events)
during the 'integ_time' time interval of the successful trigger criterion.

The "burst_ipeak" is the height of the peak in the sky-image plane (ie the result
of the FFT,MaskConvolution,InvFFT calculation).  The units are counts
after a multiplicative factor of about 0.5-0.7.

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).  [Initially, this value was hardwired 
at a constant value of 4arcmin (0.067deg) radius.  As the mission progressed,
this changed to 3 arcmin.  Eventually, it might become intensity-dependant.]

The "phi" and "theta" are the BAT instrument coordinates of the trigger (burst)
as determined by the BAT flight software program.  Phi is measured phi=0
along the +Y-axis of the s/c and increasing towards the -Z axis,
and theta is measured from the boresight of the BAT instrument (it would have
been better to call this the 'zenith' angle).

The "integ_time" is the duration of the sampling interval
of the successful trigger criteria.  The value is the number of 4msec ticks,
eg a value of 16 indicates a 64-msec trigger criterion.

The "lon_lat" is the Longitude and Lattitude of the s/c at the time of the BAT trigger.
This 4-byte quantity is composed of two 2-byte integers.  The high-order short
is the latitude multiplied by 100 and integerized; the low-order short
is the longitude multiplied by 100 and integerized; ie both values are in centi-degrees.

The "trig_index" is the index value (row_number in the BAT on-board flight s/w table)
of the trigger criteria that was the highest-significance successful trigger.

The "soln_status" (aka trigger_id) field contains (a) flag bits on the type of solution
that was found in the on-board image and about whether it matches anything in the
on-board source catalog, and (b) flag bits that are assigned in the GCN ground-processing.
The bit packing of the "soln_status" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        F     point_src      0=No or 1=Yes, a point source was found
1        F     grb            0=No or 1=Yes, it is a GRB
2        F     interesting    0=No or 1=Yes, it is an interesting src (ie a flaring known src)
3        F     flt_cat_src    0=No or 1=Yes, it is in the flight catalog (else unknown src)
4        F     image_trig     0=No or 1=Yes, it is an image trigger (else rate trig)
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (hi bkg level, ie near SAA)
7        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (low image significance; less then 7.0 sigma)
8        G     gnd_cat_src    0=No or 1=Yes, it is in the ground catalog
9        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (negative bkg slope, exit SAA)
10       G     st_loss_lock   0=No or 1=Yes, StarTracker not locked so trigger probably bogus
11       G     uncert_grb     0=No or 1=Yes, it is really probably not a GRBorTransient (VERY low image significance; less than 6.5 sigma)
12       G     blk_cat_src    0=No or 1=Yes, it is in the catalog of sources to be blocked (internal use only)
13       G     near_brt_star  0=No or 1=Yes, there is a nearby bright star (this is a duplicate of the "misc" 2^13).
14       G     was_subthresh  0=No or 1=Yes, this was originally a SubThresh, but it is now converted to a real BAT_POS
15       G     onboard_rmvd   0=No or 1=Yes, this is a source that has purposefully been removed from on-board catalog
16-27    -     spare          spare for future use
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30       G     test_submit    0=No or 1=Yes, this is a test submission (internal use only)
31       -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-11  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  Not assigned.
2^13  When this bit is a 1, it indicates that this position is near (less than 0.3deg)  a bright star (mag less than 6.5).
2^14  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the position error radius
      is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
      is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-19  Not assigned.
2^20  When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real BAT_POS.
2^21  When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
      during a time when the StarTracker had a Loss-of-Lock.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  When this bit is a 1, it means the Trig_Time was zero and so the s/c system clock
      in the TDRSS Message SecondaryHeader was used to fill the Burst_TJD and Burst_SOD fields.
      (This 0-Trig_Time scenario occurs during a ground-commanded GRB_TOO.)
2^24  When this bit is a 1, it indicates that the TDRSS Message was received on the ground
      more than 60 sec after the BAT Trigger time.  The most likely scenario for this kind of transmission delay
      is that the BAT Trigger occured during a Malindi downlink pass (when TDRSS messages are blocked
      from immediate transmission; they are buffered onboard until the end of the Malindi Pass).
2^25  This is an updated position.  This is a position notice that changes/improves
      the position specified in the original BAT_Position Notice.
2^26  Not assigned.
2^27  Not assigned.
2^28  When this bit is a 1, then this Notice was derived from a SERS message; else flight-generated.
      If none of the regular position-containing messages are received via the real-time
      TDRSS comm channel (eg BAT_Pos_Ack, BAT_LC, etc), then the SERS messages
      (which come from pipe-line processing of the Malindi playback downlinked data)
      will be used to generate a reconstituted BAT_Pos_Ack Notice.  But since
      the SERS message only contains a subset of the information is a regular TDRSS
      messages, these SERS-reconstituted Notices will have (tbd) fields undefined.
      These undefined fields are: tbd, tbd, tbd....
2^29  When this bit is a 1, then this Notice was reconstituted; else flight-generated.
      If a BAT_LC is received from the s/c before a BAT_Pos is received,
      then bits and pieces from other Notices will be used to generate a reconstituted
      BAT_Pos Notice and it will be issued (with this flag bit set to 1).
      But since the LC message only contains a subset of the information in a regular
      TDRSS BAT_POS messages, these LC-reconstituted Notices will have (tbd) fields undefined.
      These undefined fields are: tbd, tbd, tbd....
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      A Gnd-generated Notice is issued anytime humans during ground operations
      have determined if this Notice should be issued.  This will typically be used
      during the early phases of the mission before the automatic real-time distribution
      capability is enabled.  Once the burst position has been validated by humans,
      a BAT_Pos Notice will be issued (with this flag bit set to 1).
      After the Verification phase, there may be rare occaisions when a BAT_POS notice
      is (re)created by human-processing and will be distributed (with this bit set to 1). 
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "image_signif" is the significance level of the peak in the FFT image plane.
This is the signal/noise (ie number of sigma) of the grb peak detection
multiplied by 100 and then integerized (ie units are centi-sigma).

The "rate_signif" is the significance level of the initial 'rate trigger'.
This is the signal/noise (ie number of sigma) of the rate-trigger detection
multiplied by 100 and then integerized (ie units are centi-sigma).

The "bkg_flue" is the total number of events in the time interval used
for the background subtraction of the detector_rate_map (used for the image calc).
The units are counts.

The "bkg_start" is the starting time of the background interval.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).  Note that not all trigger criteria have a background interval
specified, so this "bkg_start" value may be zero for some bursts.

The "bkg_dur" is the duration of the background interval.
The units are in centi-seconds.

The "cat_num" is the catalog number in the on-board catalog for sources
that match a known source in the on-board catalog.  (Typically it is a number
in the low 30,000s.)

The "merit_0-3", "merit_4-7", and "merit_8-9" are the 10 merit parameters
for this burst.  Their values range from -127 to +127.  These 'merit params'
are different than the 'merit_value' that is in the SWIFT_FOM_OBS and SWIFT_SC_SLEW
messages.  There are 4, 4, & 2 values packed into these 3 longs.  The packing order
is "0" in the lowest_address byte in the long, "1" is in the next_lowest, etc.
The definition of the 10 parameters is:
Param   Description
0       Flag bit indicating GRB or not (1 or 0, resp).
1       Flag bit indicating Transient or not (1 or 0, resp); unknown src with T_trig>64sec.
2       Flag bit indicating Known_src or not (1 or 0, resp); Known_src matches something in on-board catalog.
3       Trigger duration (log2(t_trig/1024msec)).
4       Trigger energy range (0=15-25,1=15-50,2=25-100,3=50-350).
5       Image significance
6       Is it observable (-1 if w/in 30deg of Moon; -5, 20deg Moon; -100, 45deg Sun).
7       Flag bit indicating in a confused of obscur region (ie Gal Center or Plane).
8       Sun distance (-100*cos(sun_angular_dist)).
9       An offset param to bias for/against PPTs and TOOs wrt ATs (norm param).

There are a total of 13 "spare" items in the packet (usually filled
with zeros).  They are located at items 15-16 and 25-35.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=62 PACKET CONTENTS:

The SWIFT_BAT_GRB_POS_NACK packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=62)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       trig_tjd     [days]          Truncated Julian Day
long         6       trig_sod     [centi-sec]     (int)(sssss.sss *100)
long         7-13    spare[7]     integer         28 bytes for the future
long         14      integ_time   [4mSec]         Duration of the trigger interval, 1 to inf
long         15      spare        integer         4 bytes for the future
long         16      lon_lat      2_shorts        (int)(Longitude,Lattitude *100)
long         17      trig_index   integer         Rate_Trigger index
long         18      soln_status  bits            Type of source found
long         19      misc         bits            Misc stuff packed in here
long         20      image_signif [centi-sigma]   (int)(sig2noise *100)
long         21      rate_signif  [centi-sigma]   (int)(sig2noise *100)
long         22      bkg_flue     [counts]        Num events during the bkg interval, 0 to inf
long         23      bkg_start    [centi-sec]     (int)(sssss.sss *100)
long         24      bkg_dur      [centi-sec]     (int)(0-80,000 *100)
long         25-35   spare[11]    integer         44 bytes for the future
long         36      merit_0-3    integers        Merit params 0,1,2,3 (-127 to +127)
long         37      merit_4-7    integers        Merit params 4,5,6,7 (-127 to +127)
long         38      merit_8-9    integers        Merit params 8,9     (-127 to +127)
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
60 = SWIFT_BAT_GRB_ALERT, 61 = SWIFT_BAT_GRB_POSITION, 62 = SWIFT_BAT_GRB_NACK_POSITION,
63 = SWIFT_BAT_GRB_LIGHTCURVE. (Only the raw BAT Notices are listed here;
see later for the other Swift-XRT/UVOT Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "trig_tjd" is the Truncated Julian Day of the Swift-BAT trigger,
eg. TJD=13370 is 01 Jan 2005.

The "trig_sod" is the UT seconds-of-day (SOD) of the Swift-BAT trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "integ_time" is the duration of the sampling interval
of the successful trigger criteria.  The value is the number of 4msec ticks,
eg a value of 16 indicates a 64-msec trigger criterion.

The "lon_lat" is the Longitude and Lattitude of the s/c at the time of the BAT trigger.
This 4-byte quantity is composed of two 2-byte integers.  The high-order short
is the latitude multiplied by 100 and integerized; the low-order short
is the longitude multiplied by 100 and integerized; ie both values are in centi-degrees.

The "trig_index" is the index value (row_number in the BAT on-board flight s/w table)
of the trigger criteria that was the highest-significance successful trigger.

The "soln_status" field contains flag bits on the type of solution that would
found in the FFT sky image and about whether it matches anything in the
on-board source catalog.
The bit packing of the "soln_status" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        F     point_src      0=No or 1=Yes, a point source was found
1        F     grb            0=No or 1=Yes, it is a GRB
2        F     interesting    0=No or 1=Yes, it is an interesting src (ie a flaring known src)
3        F     flt_cat_src    0=No or 1=Yes, it is in the flight catalog (else unknown src)
4        F     image_trig     0=No or 1=Yes, it is an image trigger (else rate trig)
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12-21  Not assigned.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  Not assigned.
2^25  Not assigned.
2^26  Not assigned.
2^27  Not assigned.
2^28  When this bit is a 1, then this Notice was derived from a SERS message; else flight-generated.
      If the regular BAT_POS_NACK is not received via the real-time TDRSS comm channel,
      then the SERS message (which comes from pipe-line processing of the Malindi
      playback downlinked data) will be used to generate a reconstituted BAT_Pos_Nack Notice.
      But since the SERS message only contains a subset of the information is a regular TDRSS
      message, these SERS-reconstituted Notices will have (tbd) fields undefined.
      These undefined fields are: tbd, tbd, tbd....
2^29  Not assigned.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      A Gnd-generated Notice is issued anytime humans during ground operations
      have determined if the Notice should be issued.  This will typically be used
      during the early phases of the mission before the automatic real-time distribution
      capability is enabled.  Once the trigger has been determined to be non-GRB by humans,
      a BAT_Pos_Nack Notice will be issued (with this flag bit set to 1).
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "image_signif" is the significance level of the peak in the FFT image plane.
This is the signal/noise (ie number of sigma) of the grb peak detection
multiplied by 100 and then integerized (ie units are centi-sigma).
This field is always zero for BAT_Pos_Nack packets.

The "rate_signif" is the significance level of the initial 'rate trigger'.
This is the signal/noise (ie number of sigma) of the rate-trigger detection
multiplied by 100 and then integerized (ie units are centi-sigma).
This field is always zero for BAT_Pos_Nack packets.

The "bkg_flue" is the total number of events in the time interval used
for the background subtraction of the detector_rate_map (used for the image calc).
The units are counts.
This field is always zero for BAT_Pos_Nack packets.

The "bkg_start" is the starting time of the background interval.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).
This field is always zero for BAT_Pos_Nack packets.

The "bkg_dur" is the duration of the background interval.
The units are in centi-seconds.
This field is always zero for BAT_Pos_Nack packets.

The "merit_0-3", "merit_4-7", and "merit_8-9" are the 10 merit parameters
for this burst.  Their values range from -127 to +127.  These 'merit params'
are different than the 'merit_value' that is in the SWIFT_FOM_OBS and SWIFT_SC_SLEW
messages.  There are 4, 4, & 2 values packed into these 3 longs.  The packing order
is "0" in the lowest_address byte in the long, "1" is in the next_lowest, etc.
These fields are always zero for BAT_Pos_Nack packets.

There are a total of 20 "spare" items in the packet (usually filled
with zeros).  They are located at items 7-13, 15-16, and 25-35.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.


TYPE=63 PACKET CONTENTS:

The SWIFT_BAT_GRB_LC packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=63)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9-11    spare[3]     integer         12 bytes for the future
long         12      phi          [centi-deg]     (int)(0.0 to 359.9999 *100)
long         13      theta        [centi-deg]     (int)(0.0 to +70.0 *100)
long         14      delta_time   [centi-sec]     (int)(ssss.sss *100)
long         15      integ_time   [4mSec]         Duration of the trigger interval, 1 to inf
long         16      lon_lat      2_shorts        (int)(Longitude,Lattitude *100)
long         17      trig_index   integer         Rate_Trigger index
long         18      soln_status  bits            Type of source/trigger found
long         19      misc         bits            Misc stuff packed in here
long         20      image_signif [centi-sigma]   (int)(sig2noise *100)
long         21      rate_signif  [centi-sigma]   (int)(sig2noise *100)
quad_char    22-38   url          -               The URL for the lightcurve
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
60 = SWIFT_BAT_GRB_ALERT, 61 = SWIFT_BAT_GRB_POSITION, 62 = SWIFT_BAT_GRB_NACK_POSITION,
63 = SWIFT_BAT_GRB_LIGHTCURVE. (Only the raw BAT Notices are listed here;
see later for the other Swift-XRT/UVOT Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger (this new burst).
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "burst_tjd" is the Truncated Julian Day of the Swift-BAT burst trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the Swift-BAT burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the BAT flight software (J2000 epoch).  These will always be
the same values as in the SWIFT_BAT_POS_ACK packet.  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "phi" and "theta" are the BAT instrument coordinates of the trigger (burst)
as determined by the BAT flight software program.  Phi is measured phi=0
along the +Y-axis of the s/c and increasing towards the -Z axis,
and theta is measured from the boresight of the BAT instrument.

The "delta_time" is the difference between the first sample in the lightcurve
and the Trigger_time.  The units are centi-seconds (although they will always be whole sec).

The "integ_time" is the duration of the sampling interval
of the successful trigger criteria. This particular field is copied from the BAT_POS
notice.  The value is the number of 4msec ticks,
eg a value of 16 indicates a 64-msec trigger criterion.
(This 16-th 4-byte field is only defined/valid for packets if the 2^24 bit is set
in the 'misc' field.)

The "lon_lat" is the Longitude and Lattitude of the s/c at the time of the BAT trigger.
This 4-byte quantity is composed of two 2-byte integers.  The high-order short
is the latitude multiplied by 100 and integerized; the low-order short
is the longitude multiplied by 100 and integerized; ie both values are in centi-degrees.

The "trig_index" is the index value (row_number in the BAT on-board flight s/w table)
of the trigger criteria that was the highest-significance successful trigger.

The "soln_status" (aka trigger_id) field contains flag bits copied from the BAT_POS_ACK
ie (a) flag bits on the type of solution that was found in the on-board image and
about whether it matches anything in the on-board source catalog, and
(b) flag bits that are assigned in the GCN ground-processing.
(This 18-th 4-byte field is only defined/valid for packets (a) if the 2^24 bit is set
in the 'misc' field,  and (b) if it was generated after 03 May 05 (the time
when the distribution order of the BAT_POS and FOM_OBS packets was changed
to allow for the filling of this field and to allow for the filtering of FOM_OBS
based on these trigger_id bits).)
The bit packing of the "soln_status" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        F     point_src      0=No or 1=Yes, a point source was found
1        F     grb            0=No or 1=Yes, it is a GRB
2        F     interesting    0=No or 1=Yes, it is an interesting src (ie a flaring known src)
3        F     flt_cat_src    0=No or 1=Yes, it is in the flight catalog (else unknown src)
4        F     image_trig     0=No or 1=Yes, it is an image trigger (else rate trig)
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (hi bkg level, ie near SAA)
7        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (low image significance; less then 7.0 sigma)
8        G     gnd_cat_src    0=No or 1=Yes, it is in the ground catalog
9        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (negative bkg slope, exit SAA)
10       G     st_loss_lock   0=No or 1=Yes, StarTracker not locked so trigger probably bogus
11       G     uncert_grb     0=No or 1=Yes, it is really probably not a GRBorTransient (VERY low image significance; less than 6.5 sigma)
12       G     blk_cat_src    0=No or 1=Yes, it is in the catalog of sources to be blocked (internal use only)
13       G     near_brt_star  0=No or 1=Yes, there is a nearby bright star (this is a duplicate of the "misc" 2^13).
14       -     spare          spare for future use
15       G     onboard_rmvd   0=No or 1=Yes, this is a source that has purposefully been removed from on-board catalog
16-31    -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  Not assigned.
2^13  When this bit is a 1, it indicates that this position is near a bright star (mag less than 6.5).
2^14  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the position error radius
      is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
      is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-19  Not assigned.
2^20  When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real BAT_LC.
2^21  When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
      during a time when the StarTracker had a Loss-of-Lock.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  This includes "extended" data packets.
2^24  This bit is set if the 'soln_status' field was copied to here from BAT_POS_ACK.
2^25  When this bit is a 1, then this Notice was generated with the 3rd of 3 pkts missing.
2^26  When this bit is a 1, then this Notice was generated with the 2nd of 3 pkts missing.
2^27  When this bit is a 1, then this Notice was generated with the 1st of 3 pkts missing.
2^28  Not assigned.
2^29  This bit is set if this LightCurve Noticed was forced-out via the watchdog timeout.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      This will always 0 for the 'raw' form of this Notice (type=63) and
      1 for the ground-processed form (type=76) or the imported-form of type=63.
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "image_signif" is the significance level of the peak in the FFT image plane.
This is the signal/noise (ie number of sigma) of the grb peak detection
multiplied by 100 and then integerized (ie units are centi-sigma).
This field was copied from the BAT_POS notice.

The "rate_signif" is the significance level of the initial 'rate trigger'.
This is the signal/noise (ie number of sigma) of the rate-trigger detection
multiplied by 100 and then integerized (ie units are centi-sigma).
This field was copied from the BAT_POS notice.

The "url" is just the filename portion of the URL -- the leading path
for the full URL is "http://gcn.gsfc.nasa.gov/gcn/notices_s/".
This item in the packet spans 17 longwords (ie 68 bytes) and contains 
the ASCII string of the filename portion of the URL.  This string
can be up to 67 characters long, and will always be null-terminated.

There are a total of 6 "spare" items in the packet (usually filled
with zeros).  They are located at items 9-11, 15-16 and 18.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.


TYPE=64 PACKET CONTENTS:   NOT AVAILABLE TO THE PUBLIC

The SWIFT_BAT_SCALED_MAP packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=64)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       map_tjd      [days]          Truncated Julian Day
long         6       map_sod      [centi-sec]     (int)(sssss.sss *100)
long         7       point_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       point_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9-13    spare[5]     integer         20 bytes for the future
long         14      foregnd_dur  [mSec]          Duration of the foreground interval, 1 to inf
long         15      integ_time   [4mSec]         Duration of the trigger interval, 1 to inf
long         16      lon_lat      2_shorts        (int)(Longitude,Lattitude *100)
long         17      trig_index   integer         Rate_Trigger index [not assigned]
long         18      soln_status  bits            Type of source/trigger found
long         19      misc         bits            Misc stuff packed in here
long         20      image_signif [centi-sigma]   (int)(sig2noise *100)
long         21      rate_signif  [centi-sigma]   (int)(sig2noise *100)
quad_char    22-38   url          -               The URL for the ScaledMap
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "map_tjd" is the Truncated Julian Day when the map was generated.
eg. TJD=13370 is 01 Jan 2005.

The "map_sod" is the UT seconds-of-day (SOD) when the map was generated.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "point_ra" and "point_dec" are the RA,Dec coordinates of the pointing direction
of the s/c at the start/stop? of the integration interval for this map (J2000).
These intrinsically floating point quantities have been multiplied
by 10,000 and then integerized to make an integer quantity with units of 0.0001-degrees.

The "foregnd_dur" is the duration of the sampling interval
of the successful trigger criteria.  This field is native to the ScaledMap notice
(unlike the next field which is copied from BAT_POS).
The units are milliseconds.

The "integ_time" is the duration of the sampling interval
of the successful trigger criteria.  This particular field is copied from the BAT_POS
notice.  The value is the number of 4msec ticks,
eg a value of 16 indicates a 64-msec trigger criterion.
(This 16-th 4-byte field is only defined/valid if the 2^24 bit is set
in the 'misc' field.)

The "lon_lat" is the Longitude and Lattitude of the s/c at the time of the BAT trigger.
This 4-byte quantity is composed of two 2-byte integers.  The high-order short
is the latitude multiplied by 100 and integerized; the low-order short
is the longitude multiplied by 100 and integerized; ie both values are in centi-degrees.

The "trig_index" is the index value (row_number in the BAT on-board flight s/w table)
of the trigger criteria that was the highest-significance successful trigger.
This field is not yet (if ever) assigned.

The "soln_status" (aka trigger_id) field contains flag bits copied from the BAT_POS_ACK
ie (a) flag bits on the type of solution that was found in the on-board image and
about whether it matches anything in the on-board source catalog, and
(b) flag bits that are assigned in the GCN ground-processing.
(This 18-th 4-byte field is only defined/valid for packets (a) if the 2^24 bit is set
in the 'misc' field,  and (b) if it was generated after 03 May 05 (the time
when the distribution order of the BAT_POS and FOM_OBS packets was changed
to allow for the filling of this field and to allow for the filtering of FOM_OBS
based on these trigger_id bits).)
The bit packing of the "soln_status" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        F     point_src      0=No or 1=Yes, a point source was found
1        F     grb            0=No or 1=Yes, it is a GRB
2        F     interesting    0=No or 1=Yes, it is an interesting src (ie a flaring known src)
3        F     flt_cat_src    0=No or 1=Yes, it is in the flight catalog (else unknown src)
4        F     image_trig     0=No or 1=Yes, it is an image trigger (else rate trig)
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (hi bkg level, ie near SAA)
7        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (low image significance; less then 7.0 sigma)
8        G     gnd_cat_src    0=No or 1=Yes, it is in the ground catalog
9        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (negative bkg slope, exit SAA)
10       G     st_loss_lock   0=No or 1=Yes, StarTracker not locked so trigger probably bogus
11       G     uncert_grb     0=No or 1=Yes, it is really probably not a GRBorTransient (VERY low image significance; less than 6.5 sigma)
12       G     blk_cat_src    0=No or 1=Yes, it is in the catalog of sources to be blocked (internal use only)
13       G     near_brt_star  0=No or 1=Yes, there is a nearby bright star (mag less than 6.5).
14       -     spare          spare for future use
15       G     onboard_rmvd   0=No or 1=Yes, this is a source that has purposefully been removed from on-board catalog
16-31    -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  Not assigned.
2^13  When this bit is a 1, it indicates that this position is near a bright star (mag less than 6.5).
2^14  When this bit is a 1, it indicates that the distance between the BAT_Pos position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the position error radius
      is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15  When this bit is a 1, it indicates that the distance between the BAT_Pos position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
      is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-19  Not assigned.
2^20  When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real BAT_SM.
2^21  When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
      during a time when the StarTracker had a Loss-of-Lock.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  This bit is set if the 'soln_status' field was copied to here from BAT_POS_ACK.
2^25  Not assigned.
2^26  Not assigned.
2^27  Not assigned.
2^28  Not assigned.
2^29  This bit is set if this Scaled_Map Noticed was forced-out via the watchdog timeout.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "image_signif" is the significance level of the peak in the FFT image plane.
This is the signal/noise (ie number of sigma) of the grb peak detection
multiplied by 100 and then integerized (ie units are centi-sigma).
This field is copied from the BAT_Position Notice.

The "rate_signif" is the significance level of the initial 'rate trigger'.
This is the signal/noise (ie number of sigma) of the rate-trigger detection
multiplied by 100 and then integerized (ie units are centi-sigma).
This field is copied from the BAT_Position Notice.

The "url" is just the filename portion of the URL -- the leading path
for the full URL is "http://gcn.gsfc.nasa.gov/gcn/notices_s/".
This item in the packet spans 17 longwords (ie 68 bytes) and contains 
the ASCII string of the filename portion of the URL.  This string
can be up to 67 characters long, and will always be null-terminated.

There are a total of 6 "spare" items in the packet (usually filled
with zeros).  They are located at items 9-13 and 16.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=65 (and 46) PACKET CONTENTS:

The SWIFT_FOM_OBS (and SWIFT_TOO_FOM) packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=65 or =46)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       roll         [0.0001-deg]    (int)(0.0 to 360.0 *10000)
long         10      lon_lat      2_shorts        (int)(Longitude,Lattitude *100)
long         11-14   spare[4]     integer         16 bytes for the future
long         15      integ_time   [4mSec]         Duration of the trigger interval, 1 to inf
long         16      soln_status  bits            Type of source found
long         17      trig_index   integer         Rate_Trigger index
long         18      AT_slewFlags bits            Two flag bits packed here
long         19      misc         bits            Misc stuff packed in here
long         20      spare        integer         4 bytes for the future
long         21      rate_signif  [centi-sigma]   (int)(sig2noise *100)
long         22-37   spare[16]    integer         64 bytes for the future
long         38      merit        [centi-merit]   (int)(Merit_value *100)
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "burst_tjd" is the Truncated Julian Day of the Swift-BAT burst trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the Swift-BAT burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the BAT flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "roll" of the spacecraft (after this requested slew).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "lon_lat" is the Longitude and Lattitude of the s/c at the time of the BAT trigger.
This 4-byte quantity is composed of two 2-byte integers.  The high-order short
is the latitude multiplied by 100 and integerized; the low-order short
is the longitude multiplied by 100 and integerized; ie both values are in centi-degrees.

The "integ_time" is the duration of the sampling interval
of the successful trigger criteria. This particular field is copied from the BAT_POS
notice.  The value is the number of 4msec ticks,
eg a value of 16 indicates a 64-msec trigger criterion.
(This 16-th 4-byte field is only defined/valid for packets if the 2^24 bit is set
in the 'misc' field.)

The "soln_status" (aka trigger_id) field contains flag bits copied from the BAT_POS_ACK
ie (a) flag bits on the type of solution that was found in the on-board image and
about whether it matches anything in the on-board source catalog, and
(b) flag bits that are assigned in the GCN ground-processing.
(This 18-th 4-byte field is only defined/valid for packets (a) if the 2^24 bit is set
in the 'misc' field,  and (b) if it was generated after 03 May 05 (the time
when the distribution order of the BAT_POS and FOM_OBS packets was changed
to allow for the filling of this field and to allow for the filtering of FOM_OBS
based on these trigger_id bits).)
The bit packing of the "soln_status" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        F     point_src      0=No or 1=Yes, a point source was found
1        F     grb            0=No or 1=Yes, it is a GRB
2        F     interesting    0=No or 1=Yes, it is an interesting src (ie a flaring known src)
3        F     flt_cat_src    0=No or 1=Yes, it is in the flight catalog (else unknown src)
4        F     image_trig     0=No or 1=Yes, it is an image trigger (else rate trig)
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (hi bkg level, ie near SAA)
7        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (low image significance; less then 7.0 sigma)
8        G     gnd_cat_src    0=No or 1=Yes, it is in the ground catalog
9        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (negative bkg slope, exit SAA)
10       G     st_loss_lock   0=No or 1=Yes, StarTracker not locked so trigger probably bogus
11       G     uncert_grb     0=No or 1=Yes, it is really probably not a GRBorTransient (VERY low image significance; less than 6.5 sigma)
12       G     blk_cat_src    0=No or 1=Yes, it is in the catalog of sources to be blocked (internal use only)
13       G     near_brt_star  0=No or 1=Yes, there is a nearby bright star (this is a duplicate of the "misc" 2^13).
14       -     spare          spare for future use
15       G     onboard_rmvd   0=No or 1=Yes, this is a source that has purposefully been removed from on-board catalog
16-31    -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "trig_index" is the index value (row_number in the BAT on-board flight s/w table)
of the trigger criteria that was the highest-significance successful trigger.

The "at_slew_flags" field contains two flag bits related to the status
of the given burst wrt the Automated Target (AT) and Slewing.
The bits are:
2^0  Is this burst worthy of becoming the new Automated Target: 1=yes
2^1  Is this burst of sufficient merit to request a s/c slew: 1=yes
The AT is a special target that the Swift Observatory will keep coming back to
orbit after orbit without any ground commanding intervention.  It is distinct
from the PrePlanned Targets (PPTs) that are in the uploaded stored observing table.
Whenever the AT is observable (ie no observing constraint is in effect),
then the AT will override any previous PPT.  The override lasts for up to
a commandable amount of time -- typically 60,000 observed-seconds.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  Not assigned.
2^13  When this bit is a 1, it indicates that this position is near a bright star (mag less than 6.5).
2^14  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the position error radius
      is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
      is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-19  Not assigned.
2^20  When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real FOM.
2^21  When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
      during a time when the StarTracker had a Loss-of-Lock.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  This bit is set if the FOM_OBS packet was delayed (to come after
      the BAT_POS_ACK packet) so that the 'soln_status' field
      could be added to this packet (copied from BAT_POS_ACK).
2^24  This bit is set if the 'soln_status' field was copied to here from BAT_POS_ACK.
2^25  Not assigned.
2^26  Not assigned.
2^27  Not assigned.
2^28  Not assigned.
2^29  This bit is set if this FOM_OBS Noticed was forced-out via the watchdog timeout.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      A Gnd-generated Notice is issued anytime humans during ground operations
      have determined if this Notice should be issued.  This will typically be used
      during the early phases of the mission before the automatic real-time distribution
      capability is enabled.  Once the burst position has been validated by humans,
      a BAT_Pos Notice will be issued (with this flag bit set to 1).
      After the Verification phase, there may be rare occaisions when a FOM_OBS notice
      is (re)created by human-processing and will be distributed (with this bit set to 1). 
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "rate_signif" is the significance level of the initial 'rate trigger'.
This is the signal/noise (ie number of sigma) of the rate-trigger detection
multiplied by 100 and then integerized (ie units are centi-sigma).

The "merit_value" is the total calculated value for the given burst.
It is a fl.pt. quantity which can theoretically range from -infinity to
+infinity, but given normal operations, we expect it to range from about
-100 to +300.  And for the first 6-12 months of flight-ops, it will be
forced to be a constant value of 100 for all bursts.

There are a total of 23 "spare" items in the packet (usually filled
with zeros).  They are located at items 9-14, 20, and 22-37.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=66 (and 47) PACKET CONTENTS:

The SWIFT_SC_SLEW (and SWIFT_TOO_SC_SLEW) packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=66 or =47)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       roll         [0.0001-deg]    (int)(0.0 to 360.0 *10000)
long         10      lon_lat      2_shorts        (int)(Longitude,Lattitude *100)
long         11-12   spare[2]     integer         8 bytes for the future
long         13      wait_time    [centi-sec]     (int)(sssss.sss *100)
long         14      obs_time     [centi-sec]     (int)(sssss.sss *100)
long         15      integ_time   [4mSec]         Duration of the trigger interval, 1 to inf
long         16      soln_status  bits            Type of source/trigger found
long         17      trig_index   integer         Rate_Trigger index
long         18      slew_rtn     integer         0=will_slew, non-0=wont
long         19      misc         bits            Misc stuff packed in here
long         20      spare        integer         4 bytes for the future
long         21      rate_signif  [centi-sigma]   (int)(sig2noise *100)
long         22      bat_mode     bits            BAT configuration
long         23      xrt_mode     bits            XRT configuration
long         24      uvot_mode    bits            UVOT configuration
long         25-37   spare[13]    integer         52 bytes for the future
long         38      merit        [centi-merit]   Merit_value *100
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "burst_tjd" is the Truncated Julian Day of the Swift-BAT burst trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the Swift-BAT burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the BAT flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "roll" of the spacecraft (after this requested slew).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "lon_lat" is the Longitude and Lattitude of the s/c at the time of the BAT trigger.
This 4-byte quantity is composed of two 2-byte integers.  The high-order short
is the latitude multiplied by 100 and integerized; the low-order short
is the longitude multiplied by 100 and integerized; ie both values are in centi-degrees.

The "wait_time" is the number of seconds until the target becomes viewable.
A value of zero means that the spacecraft will slew immediately -- ie no waiting.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "obs_time" is the number of seconds the target is observable.  (This value
does not reflect any time spent inside the SAA.)
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "integ_time" is the duration of the sampling interval
of the successful trigger criteria. This particular field is copied from the BAT_POS
notice.  The value is the number of 4msec ticks,
eg a value of 16 indicates a 64-msec trigger criterion.
(This 16-th 4-byte field is only defined/valid for packets if the 2^24 bit is set
in the 'misc' field.)

The "soln_status" (aka trigger_id) field contains flag bits copied from the BAT_POS_ACK
ie (a) flag bits on the type of solution that was found in the on-board image and
about whether it matches anything in the on-board source catalog, and
(b) flag bits that are assigned in the GCN ground-processing.
(This 18-th 4-byte field is only defined/valid for packets (a) if the 2^24 bit is set
in the 'misc' field,  and (b) if it was generated after 03 May 05 (the time
when the distribution order of the BAT_POS and FOM_OBS packets was changed
to allow for the filling of this field and to allow for the filtering of FOM_OBS
based on these trigger_id bits).)
The bit packing of the "soln_status" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        F     point_src      0=No or 1=Yes, a point source was found
1        F     grb            0=No or 1=Yes, it is a GRB
2        F     interesting    0=No or 1=Yes, it is an interesting src (ie a flaring known src)
3        F     flt_cat_src    0=No or 1=Yes, it is in the flight catalog (else unknown src)
4        F     image_trig     0=No or 1=Yes, it is an image trigger (else rate trig)
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (hi bkg level, ie near SAA)
7        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (low image significance; less then 7.0 sigma)
8        G     gnd_cat_src    0=No or 1=Yes, it is in the ground catalog
9        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (negative bkg slope, exit SAA)
10       G     st_loss_lock   0=No or 1=Yes, StarTracker not locked so trigger probably bogus
11       G     uncert_grb     0=No or 1=Yes, it is really probably not a GRBorTransient (VERY low image significance; less than 6.5 sigma)
12       G     blk_cat_src    0=No or 1=Yes, it is in the catalog of sources to be blocked (internal use only)
13       G     near_brt_star  0=No or 1=Yes, there is a nearby bright star (this is a duplicate of the "misc" 2^13).
14       -     spare          spare for future use
15       G     onboard_rmvd   0=No or 1=Yes, this is a source that has purposefully been removed from on-board catalog
16-31    -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "trig_index" is the index value (row_number in the BAT on-board flight s/w table)
of the trigger criteria that was the highest-significance successful trigger.

Th "slew_rtn" is the return_code from the s/c for the given slew_request.
If value is zero, then the slew will be executed by the s/c;
if non-zero, then slew will not be executed.  The non-zero values are:
1 Sun constraint,
2 Earth_limb constraint,
3 Moon constraint,
4 Ram_vector constraint,
5 invalid slew_request parameter.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  Not assigned.
2^13  When this bit is a 1, it indicates that this position is near a bright star (mag less than 6.5).
2^14  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the position error radius
      is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
      is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-19  Not assigned.
2^20  When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real SC_SLEW.
2^21  When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
      during a time when the StarTracker had a Loss-of-Lock.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  This bit is set if the 'soln_status' field was copied to here from BAT_POS_ACK.
2^25  Not assigned.
2^26  Not assigned.
2^27  Not assigned.
2^28  Not assigned.
2^29  Not assigned.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      A Gnd-generated Notice is issued anytime humans during ground operations
      have determined if this Notice should be issued.  This will typically be used
      during the early phases of the mission before the automatic real-time distribution
      capability is enabled.  Once the burst position has been validated by humans,
      a BAT_Pos Notice will be issued (with this flag bit set to 1).
      After the Verification phase, there may be rare occaisions when a SC_SLEW notice
      is (re)created by human-processing and will be distributed (with this bit set to 1). 
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "rate_signif" is the significance level of the initial 'rate trigger'.
This is the signal/noise (ie number of sigma) of the rate-trigger detection
multiplied by 100 and then integerized (ie units are centi-sigma).

The 3 "modes" are configuration fields for each instrument.

The "merit_value" is the total calculated value for the given burst.
It is a fl.pt. quantity which can theoretically range from -infinity to
+infinity, but given normal operations, we expect it to range from about
-100 to +500.  And for the first 6-12 months of flight-ops, it will be
forced to be a constant value of 100 for all bursts.
The units are in centi-merit (ie the fl.pt. merit is multiplied by 100
and then integerized).

There are a total of 19 "spare" items in the packet (usually filled
with zeros).  They are located at items 10-12, 15-16, 20, and 25-37.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=67 PACKET CONTENTS:

The SWIFT_XRT_POS packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=67)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       data_tjd     [days]          Truncated Julian Day
long         6       data_sod     [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_flux   [flux]          (int)(xrt_flux *100)
long         10      spare        integer         4 bytes for the future
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12      X_TAM_I1     [centi-pixel]   (int)(tam[0]*100)
long         13      Y_TAM_I1     [centi-pixel]   (int)(tam[1]*100)
long         14      X_TAM_I2     [centi-pixel]   (int)(tam[2]*100)
long         15      Y_TAM_I2     [centi-pixel]   (int)(tam[3]*100)
long         16      hi_prec_err  [centi-arcsec]  Hi-precission burst_error
long         17      Amp_Wave     dual_int        AmpNum*256 + WaveformNum
long         18      trigger_id   bits            The type of event
long         19      misc         bits            Misc stuff packed in here
long         20      xrt-bat      [0.0001-deg]    Distance between XRT & BAT positions
long         21      det_signif   [centi-sigma]   (int)(det_signif *100)
long         22-38   spare[17]    integer         68 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
67 = SWIFT_XRT_POS, 68 = SWIFT_XRT_SPEC, 69 = SWIFT_XRT_IMAGE,
70 = SWIFT_XRT_LC, and 71 = SWIFT_XRT_NACK_POS. (Only the raw XRT Notices are listed here;
see before and later for the other Swift-BAT/UVOT Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the data_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "data_tjd" is the Truncated Julian Day of the start of the CCD image
from which this position was extracted,  eg. TJD=13370 is 01 Jan 2005.

The "data_sod" is the UT seconds-of-day (SOD) of the start of the CCD image
from which this position was extracted, which will be very close
to the Swift-BAT burst_sod.  The units are in centi-seconds
(ie the fl.pt. seconds were multiplied by 100 and then integerized).

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst/afterglow
as determined by the XRT flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "burst_flux" is the sum of pixel intensities that are between the low-level threshold
and an upper-level threshold  divided by the exposure time and a fudge factor.
Note that the pixels intensities have NOT had the bias subtraction made,
so there is an offset to these flux estimates.  [For now, the fudge factor is set to 1.]
This gives a crude relative brightness estimate of the afterglow source;
and is only intended for comparison of previous XRT detections.
After 14nov05 this field contains the approximate flux in CGS units [erg/cm2/sec]
multiplied by 10^14 and then integerized (eg if the field contains a value of 1230,
then the flux is 1.23x10^-11 erg/cm2/sec).

The "burst_error" is the radius of the circle that will contain on average
90% of the bursts afterglow positions.  It contains statistical plus
systematic contributions.  [The value was hardcoded to be 6arcsec
for all Notices at the beginning of the mission -- as experience built, 
this was replaced with a value that is dependant on the flux and/or significancce
of the detection.]  (See also the hi_prec_err below.)

The "tam_x/y_1/2 are the positions of the TAM (Telescope Alignment Monitor)
in the 1st and 2nd images.  The units are centi-tam_pixels; the values typically
range from 200.00 to 400.00.  [These values should remain roughly constant
from Notice to Notice, ie the XRT tube is not flexing over time or temperature.]

The "hi_prec_err" is the radius of the circle that will contain on average
90% of the bursts afterglow positions.  It contains statistical plus
systematic contributions.  This is different than the regular "burst_error"
in that the units are 'centi-arcsec' to remove quantization error of 0.36arcsec
introduced by the regular "burst_error" value.

The "amp_wave" field has two values contained in the 32 bits.
The lower 8 bits (2^0-7) are the 'waveform number' of the readout.
And the next higher 8 bits (2^8-15) is the amplifier used during the readout.
The waveform number is typically 134.  The amplifier number is typically 2.

The "soln_status" field contains flag bits on the type of solution that was found.
The bit packing of the "soln_status" entry in the packet is:
The bit packing is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        G     cosmic_ray     0=No or 1=Yes, this is probably a cosmic ray.
1        -     undef          Not yet defined.
2        -     undef          Not yet defined.
3        -     undef          Not yet defined.
4        -     undef          Not yet defined.
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-7      -     undef          Not yet defined.
8        G     gnd_cat_src    0=No or 1=Yes, BAT_loc is in the BAT ground catalog
9-13     -     undef          Not yet defined.
14       G     was_subthresh  0=No or 1=Yes, this was originally a SubThresh, but it is now converted to a real XRT_POS
15-27    -     undef          Not yet defined.
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30       G     test_submit    0=No or 1=Yes, this is a test submission (internal use only)
31       -     undef          Not yet defined.
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-9  Not assigned.
2^10  When this bit is a 1, it indicates that the centroided position was more than 100 rows or columns
      from the center of the FOV (ie likely not a real astrophysical peak).
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  When this bit is 1, it is in the catalog of sources to be blocked (internal use only).
2^13  When this bit is a 1, it indicates that this position is near (less than 0.3deg)  a bright star (mag less than 6.5).
2^14  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the position error radius
      is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
      is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-19  Not assigned.
2^20  When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real XRT_POS.
2^21  When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
      during a time when the StarTracker had a Loss-of-Lock.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  This bit is set if the XRT_POS packet was momentarily (few sec) delayed
      so that the XRT_IMAGE message could be interrogated to determine
      the 'gain' of the image that generated the xrt_position.
2^24  Not assigned.
2^25  This is an updated position.  This is a position notice that changes/improves
      the position specified in the original XRT_Position Notice.
2^26  Not assigned.
2^27  Not assigned.
2^28  When this bit is a 1, then this Notice was derived from a SERS message; else flight-generated.
      If the regular xrt_position message was not received via the real-time
      TDRSS comm channel, then the SERS message (which come from pipe-line processing
      of the Malindi playback downlinked data) will be used to generate a reconstituted
      XRT_Pos_Ack Notice.  But since the SERS message only contains a subset of the
      information is a regular TDRSS messages, these SERS-reconstituted Notices
      will have (tbd) fields undefined.  These undefined fields are: tbd, tbd, tbd....
2^29  When this bit is a 1, then this Notice was reconstituted from information
      from the XRT_IMAGE notice.  It was generated on the ground because the XRT_POS notice
      was not received on the ground after a fixed amount of time (~200 sec).  Presumably
      the original XRT_POS was lost due to a TDRSS telemetry gap.  We have reconstituted
      most of the contents of an XRT_POS notice from information from the XRT_IMAGE notice.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "xrt-bat" is the angular distance between the XRT position and the BAT position.
This intrinsically floating point quantity have been multiplied by 10,000 and
then integerized to make an integer quantity with units of 0.0001-degrees.

The "det_signif" is a measure of the significance of the afterglow detection.
It is the square root of the number of pixels above threshold.  Because of the
limited dynamic range of the pixel intensities in the CCD in this initial image,
the "det_signif" suffers from saturation problems.  Example: a det_signif of 5
means there were 25 pixels above threshold, but if there were 1000 pixels,
then the photon pile-up in those pixels will be significant and the "det_signif"
of 32 will not be an accurate measure of the significance (ie it will be under-valued).

There are a total of 10 "spare" items in the packet (usually filled
with zeros).  They are located at items 10, 18, 20, and 22-28.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=68 PACKET CONTENTS:

The SWIFT_XRT_SPEC packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=68)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       SpecStart_tjd[days]          Truncated Julian Day
long         6       SpecStart_sod[centi-sec]     (int)(sssss.sss *100)
long         7       bore_ra      [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       bore_dec     [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       LiveTime     [centi-sec]     (int)(sssss.sss *100)
long         10      SpecStopTJD  [days]          Truncated Julian Day
long         11      SpecStopSOD  [centi-sec]     (int)(sssss.sss *100)
long         12      mode         integer         XRT operational mode
long         13      waveform     integer         Waveform number (50 or 60)
long         14      bias         integer         Bias value (??? - ????)
long         15-18   spare[4]     integer         16 bytes for the future
long         19      misc         bits            Misc stuff packed in here
long         20      spare        integer         4 bytes for the future
long         21      term_code    integer         Termination condition code
quad_char    22-38   url          -               The URL for the spectrum
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
67 = SWIFT_XRT_POS, 68 = SWIFT_XRT_SPEC, 69 = SWIFT_XRT_IMAGE,
70 = SWIFT_XRT_LC, and 71 = SWIFT_XRT_NACK_POS. (Only the raw XRT Notices are listed here;
see before and later for the other Swift-BAT/UVOT Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "SpecStart_tjd" is the Truncated Julian Day of the start of the first
CCD integration in the spectrum accumulation, eg. TJD=13370 is 01 Jan 2005.

The "SpecStart_sod" is the UT seconds-of-day (SOD) of the start of the first
CCD integration in the spectrum accumulation.  The units are in centi-seconds
(ie the fl.pt. seconds were multiplied by 100 and then integerized).

The "bore_ra/dec" is the RA,dec of the XRT bore sight (J2000 epoch).
This is the center of the FOV of the XRT image.  These intrinsically floating point
quantities have been multiplied by 10,000 and then integerized to make
an integer quantity with units of 0.0001-degrees.

The "live_time" is the exposure time duration of the spectrum integration.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "SpecStop_tjd" is the Truncated Julian Day of the last CCD integration
in the spectrum accumulation, eg. TJD=13370 is 01 Jan 2005.

The "SpecStop_sod" is the UT seconds-of-day (SOD) of the last CCD integration
in the spectrum accumulation.  The units are in centi-seconds
(ie the fl.pt. seconds were multiplied by 100 and then integerized).

The "mode" is the CCD Readout mode.  The values are:
1  Null
2  Short image
3  Long image
4  Piled-up Photodiode
5  Low Rate Photodiode
6  Windowed Timing
7  Photo-counting
8  Raw data
9  Bias map
10 Stop

The "waveform" is the CCD waveform ID. The values are either 50 or 60.

The "bias" is the bias value of the last LRPD frame (ignore this for WT spectrum).
the units are ADU.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  When this bit is a 1, it is in the catalog of sources to be blocked (internal use only).
2^13  When this bit is a 1, it indicates that there is nearby bright star (mag less than 6.5).
2^14-19  Not assigned.
2^20  When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real XRT_SPEC.
2^21  When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
      during a time when the StarTracker had a Loss-of-Lock.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  Not assigned.
2^25  When this bit is a 1, then this Notice was generated with the 3rd of 3 pkts missing.
2^26  When this bit is a 1, then this Notice was generated with the 2nd of 3 pkts missing.
2^27  When this bit is a 1, then this Notice was generated with the 1st of 3 pkts missing.
2^28  Not assigned.
2^29  This bit is set if this XRT_SPECTRUM Noticed was forced-out via the watchdog timeout.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      This will always 0 for the 'raw' form of this Notice (type=68) and
      1 for the ground-processed form (type=77).
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "term_cond" is the termination condition of the lightcurve collection process.
The values are:
0  Normal,
1  Terminated by time,
2  Terminated by snapshot,
3  Terminated by entering SAA,
4  Spectrum generated at the LRPD-to-WT transition,
5  Spectrum generated at the WT-to-LRorPC transition.

The "url" is just the filename portion of the URL -- the leading path
for the full URL is "http://gcn.gsfc.nasa.gov/gcn/notices_s/".
This item in the packet spans 17 longwords (ie 68 bytes) and contains 
the ASCII string of the filename portion of the URL.  This string
can be up to 67 characters long, and will always be null-terminated.

There are a total of 5 "spare" items in the packet (usually filled
with zeros).  They are located at items 15-18, and 20.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=69 PACKET CONTENTS:

The SWIFT_XRT_IMAGE packet (aka postage-stamp image) consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=69)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       ImgStartTJD  [days]          Image Start Truncated Julian Day
long         6       ImgStartSOD  [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       n_bright     [pixels]        Num of bright pixels in the image
long         10      spare        integer         4 bytes for the future
long         11      cent_sdev    [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         12      cent_x       [centi-pixels]  (int)(xxx.xx *100)
long         13      cent_y       [centi-pixels]  (int)(yyy.yy *100)
long         14      iraw_x       [pixels]        ?????????
long         15      iraw_y       [pixels]        ?????????
long         16      roll         [0.0001-deg]    (int)(-180.0 to +180.0 *10000)
long         17      gain/mod/wav mixed           gain, mode, & waveform; ints
long         18      expo_time    [centi-sec]     (int)(sssss.sss *100)
long         19      misc         bits            Misc stuff packed in here
long         20      grb_in_xrt_y integer         ???????
long         21      grb_in_xrt_z integer         ???????
quad_char    22-38   url          -               The URL for the image
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
67 = SWIFT_XRT_POS, 68 = SWIFT_XRT_SPEC, 69 = SWIFT_XRT_IMAGE,
70 = SWIFT_XRT_LC, and 71 = SWIFT_XRT_NACK_POS. (Only the raw XRT Notices are listed here;
see before and later for the other Swift-BAT/UVOT Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "ImgStart_tjd" is the Truncated Julian Day of the start of the CCD image integration.
eg. TJD=13370 is 01 Jan 2005.

The "ImgStart_sod" is the UT seconds-of-day (SOD) start of the CCD image integration.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_ra/dec" is the RA,dec of the centroid of the source found
in the image (J2000 epoch).  These intrinsically floating point quantities
have been multiplied by 10,000 and then integerized to make
an integer quantity with units of 0.0001-degrees.

The "n_bright" is the number of bright pixels in the 51x51 postage-stamp image,
where bright means the pixel intensity is above the LLD and below the ULD thresholds.

The "cent_sdev" is the standard deviation of the centroid peak in the image.
The units are 0.0001-degrees (ie the fl.pt. std_dev was multiplied by 10000
and then integerized).

The "cent_x/y" is the centroid position in raw units.
The units are centi-pixels (ie the fl.pt. position was multiplied by 100
and then integerized).

The "iraw_x/y" are the row/column numbers (in units of CCD pixels) of the center
of the 51x51 pixel image that is this 'postage-stamp' subarray of the whole CCD.

The "roll" angle of the spacecraft.  This intrinsically floating point quantity
has been multiplied by 10,000 and then integerized to make an integer quantity
with units of 0.0001-degrees.

The "gain/mod/wav" is a triplet of 1-byte values in a single 4-byte quantity.
The "gain" is the gain of the amplifier used during the readout of the CCD.
It is packed in bits 2^16-23.  The value will be 1, 2, 4, 8, or 16.  If the gain
is greater than 1, then the "object" in the image is likely due to a cosmic ray,
and not due to a GRB afterglow.
The "mode" is the CCD Readout mode.  It is packed in bits 2^8-15.  The values are:
1  Null
2  Short image
3  Long image
4  Piled-up Photodiode
5  Low Rate Photodiode
6  Windowed Timing
7  Photo-counting
8  Raw data
9  Bias map
10 Stop
The "waveform" is the CCD waveform ID.  It is packed in bits 2^0-7.
The values are:
? ???????????
? ???????????
? ???????????

The "expo_time" is the nominal exposure time for this image.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-9  Not assigned.
2^10  When this bit is a 1, it indicates that the centroided position was more than 100 rows or columns
      from the center of the FOV (ie likely not a real astrophysical peak).
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  When this bit is a 1, it is in the catalog of sources to be blocked (internal use only).
2^13  When this bit is a 1, it indicates that this position is near a bright star (mag less than 6.5).
2^14  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the position error radius
      is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
      is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-19  Not assigned.
2^20  When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real XRT_IMAGE.
2^21  When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
      during a time when the StarTracker had a Loss-of-Lock.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  Not assigned.
2^25  When this bit is a 1, then this Notice was generated with the 3rd of 3 pkts missing.
2^26  When this bit is a 1, then this Notice was generated with the 2nd of 3 pkts missing.
2^27  When this bit is a 1, then this Notice was generated with the 1st of 3 pkts missing.
2^28  Not assigned.
2^29  This bit is set if this XRT_IMAGE Noticed was forced-out via the watchdog timeout.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      This will always 0 for the 'raw' form of this Notice (type=69) and
      1 for the ground-processed form (type=78).
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "grb_in_xrt_y/z" is the GRB x-ray afterglow position in XRT coordinates.
The units are ????????????

The "url" is just the filename portion of the URL -- the leading path
for the full URL is "http://gcn.gsfc.nasa.gov/gcn/notices_s/".
This item in the packet spans 17 longwords (ie 68 bytes) and contains 
the ASCII string of the filename portion of the URL.  This string
can be up to 67 characters long, and will always be null-terminated.

There is a total of 1 "spare" items in the packet (usually filled
with zeros).  It is located at item 10.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=70 PACKET CONTENTS:

The SWIFT_XRT_LC packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=70)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       start_tjd    [days]          Truncated Julian Day
long         6       start_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       bore_ra      [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       bore_dec     [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       live_time    [centi-sec]     (int)(sssss.sss *100)
long         10      stop_tjd     [days]          Truncated Julian Day
long         11      stop_sod     [centi-sec]     (int)(sssss.sss *100)
long         12-18   spare[7]     integer         28 bytes for the future
long         19      misc         bits            Misc stuff packed in here
long         20      n_bins       integer         Number of valid bins in lightcurve
long         21      term_cond    integer         Termination condition
long         20-21   spare[2]     integer         8 bytes for the future
quad_char    22-38   url          -               The URL for the lightcurve
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
67 = SWIFT_XRT_POS, 68 = SWIFT_XRT_SPEC, 69 = SWIFT_XRT_IMAGE,
70 = SWIFT_XRT_LC, and 71 = SWIFT_XRT_NACK_POS. (Only the raw XRT Notices are listed here;
see before and later for the other Swift-BAT/UVOT Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "start_tjd" is the Truncated Julian Day of the start of the first
CCD integration in the lightcurve accumulation, eg. TJD=13370 is 01 Jan 2005.

The "start_sod" is the UT seconds-of-day (SOD) of the start of the first
CCD integration in the lightcurve accumulation.  The units are in centi-seconds
(ie the fl.pt. seconds were multiplied by 100 and then integerized).

The "bore_ra/dec" is the RA,dec of the XRT bore sight (J2000 epoch).
This is the center of the FOV of the XRT.  These intrinsically floating point
quantities have been multiplied by 10,000 and then integerized to make
an integer quantity with units of 0.0001-degrees.

The "live_time" is the exposure time duration of the lightcurve integration.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "SpecStop_tjd" is the Truncated Julian Day of the last CCD integration
in the lightcurve accumulation, eg. TJD=13370 is 01 Jan 2005.

The "SpecStop_sod" is the UT seconds-of-day (SOD) of the last CCD integration
in the lightcurve accumulation.  The units are in centi-seconds
(ie the fl.pt. seconds were multiplied by 100 and then integerized).

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  When this bit is a 1, it is in the catalog of sources to be blocked (internal use only).
2^13  When this bit is a 1, there is a nearby bright star (mag less than 6.5).
2^14-19  Not assigned.
2^20  When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real XRT_LC.
2^21  When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
      during a time when the StarTracker had a Loss-of-Lock.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  Not assigned.
2^25  Not assigned.
2^26  Not assigned.
2^27  Not assigned.
2^28  Not assigned.
2^29  Not assigned.
2^30  Not assigned.
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "n_bins" is the number of valid bins in the collected lightcurve (0-100).

The "term_cond" is the termination condition of the lightcurve collection process.
The values are:
0  Normal (100 bins),
1  Terminated by time (1-99 bins),
2  Terminated by snapshot (1-99 bins),
3  Terminated by entering SAA (1-99 bins).

The "url" is just the filename portion of the URL -- the leading path
for the full URL is "http://gcn.gsfc.nasa.gov/gcn/notices_s/".
This item in the packet spans 17 longwords (ie 68 bytes) and contains 
the ASCII string of the filename portion of the URL.  This string
can be up to 67 characters long, and will always be null-terminated.

There are a total of 9 "spare" items in the packet (usually filled
with zeros).  They are located at items 12-18 and 20-21.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=71 PACKET CONTENTS:

The SWIFT_XRT_NACK_POS packet (aka centroid error) consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=71)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       data_tjd     [days]          Truncated Julian Day
long         6       data_sod     [centi-sec]     (int)(sssss.sss *100)
long         7       point_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       point_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       centroid_cnt [cnts]          Integer counts in centroid
long         10      min_cnt      integer         Minimum num evts needed in centroid
long         11      centroid_std [0.0001-deg]    StdDev of centroid
long         12      sig_max      [0.0001-deg]    Mx_Allowed_StdDev to be good
long         13-15   spare        integer         12 bytes for the future
long         16      ph2_iter     integer         Number of iteration attempts
long         17      max_iter     integer         Max allowed number of attempts
long         18      err_flag     integer         Centroid rtn code: 1,2,3
long         19      misc         bits            Misc stuff packed in here
long         20-38   spare[19]    integer         76 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
67 = SWIFT_XRT_POS, 68 = SWIFT_XRT_SPEC, 69 = SWIFT_XRT_IMAGE,
70 = SWIFT_XRT_LC, and 71 = SWIFT_XRT_NACK_POS. (Only the raw XRT Notices are listed here;
see before and later for the other Swift-BAT/UVOT Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "data_tjd" is the Truncated Julian Day when this data packet was generated on-board.
eg. TJD=13370 is 01 Jan 2005.

The "data_sod" is the UT seconds-of-day (SOD) when this data packet was generated on-board,
which will be very close to the Swift-BAT burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "point_ra" and "point_dec" are the RA,Dec coordinates (J2000)
of the pointing direction of the s/c at the start?/stop???
of the integration interval for the image.  These intrinsically floating point
quantities have been multiplied by 10,000 and then integerized to make
an integer quantity with units of 0.0001-degrees.

The "centroid_cnt" is the "calculated number of events" in the centroid.
The units are counts (or is this events????????).

The "min_count" is the minimum number of events needed to calculate
a proper centroid (ie a proper position).
The units are counts (or is this events????????).

The "centroid_std" is the standard deviation of any centroid found in the image.
The units are 0.0001-deg (ie the fl.pt. value multiplied by 10000 and
then integerized).

The "sig_max" is the maximum allowable std-deviation for a valid centroid.
The units are 0.0001-deg (ie the fl.pt. value multiplied by 10000 and
then integerized).

The "ph2_iter" is the number of iterations used in Phase 2 of the search
algorithm.

The "max_iter" is the maximum number of iterations allowed in Phase 2
of the search algorithm.

The "err_flag" is the error_code value for why a position was not found.
The values are:  1= no source found in image, 2= algorithm did not converge,
3= standard deviation too large, and 0xFFF= general error.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-4  Not assigned.
2^5    Ground-generated(=1), not Flight-generated(=0). Note that for this flagbit
       is in a nonstandard field (MISC instead of the usual TRIGGER_ID) for this one pkt type.
2^6-10 Not assigned.
2^11   When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
       were out of valid range (eg RA was 361 deg).
2^12   When this bit is a 1, it is in the catalog of sources to be blocked (internal use only).
2^13   When this bit is a 1, there is a nearby bright star (mag less than 6.5).
2^14   SPER date was used (by the UL processing) to determine this trigger is a non-burst trigger.
2^15   No SPER date was used (by the UL processing) but it is still determined that this is a non-burst trigger.
2^16-19  Not assigned.
2^20  When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real XRT_POS_NACK.
2^21   When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
       during a time when the StarTracker had a Loss-of-Lock.
2^22   When this bit is a 1, it indicates that this Notice was generated as a result
       of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
       and this Notice was generated as a direct result of that observation.)
2^23   Not assigned.
2^24   Not assigned.
2^25   Not assigned.
2^26   Not assigned.
2^27   Not assigned.
2^28   Not assigned.
2^29   test_submit    0=No or 1=Yes, this is a test submission (internal use only). Non-std location!
2^30   0=No or 1=Yes, this is a test submission (internal use only). Note that for this flagbit
       is in a nonstandard field (MISC instead of the usual TRIGGER_ID) for this one pkt type.
2^31   If there is a CRC error in one or more of the packets that went into
       the making of this Notice, then this bit is set to 1, else 0.

There are a total of 22 "spare" items in the packet (usually filled
with zeros).  They are located at items 13-15 and 20-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=72 PACKET CONTENTS:

The SWIFT_UVOT_IMAGE packet (aka DarkBurst, aka Genie) consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=72)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       ExpStart_tjd [days]          Truncated Julian Day
long         6       ExpStart_sod [centi-sec]     (int)(sssss.sss *100)
long         7       point_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       point_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       image_roll   [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         10      filter       integer         Which filter was used
long         11      expo_id      [sec]           Exposure_ID expressed in s/c_sec
long         12      X0           [det_coords]    0-2095
long         13      Y0           [det_coords]    0-2095
long         14      width        [det_coords]    0-2095
long         15      height       [det_coords]    0-2095
long         16      xy_grb       [det_coords]    0-2095; two packed
long         17      n_frames     integer         1-inf
long         18      swl_lwl      integers        2 4-bit integers
long         19      misc         bits            Misc stuff packed in here
long         20-21   spare[2]     integer         8 bytes for the future
quad_char    22-38   url          -               The URL for the image
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
72 = SWIFT_UVOT_IMAGE, and 73 = SWIFT_UVOT_SRCLIST (Only the raw UVOT Notices are listed here;
see before and later for the other Swift-BAT/XRT Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "ExpStart_tjd" is the Truncated Julian Day of the start of the CCD integration,
eg. TJD=13370 is 01 Jan 2005.

The "ExpStart_sod" is the UT seconds-of-day (SOD) of the start of the CCD integration.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100 and then integerized).

The "point_ra" and "point_dec" are the RA,Dec coordinates (J2000)
of the pointing direction of the s/c at the start?/stop???
of the integration interval for the image.  These intrinsically floating point
quantities have been multiplied by 10,000 and then integerized to make
an integer quantity with units of 0.0001-degrees.

The "image_roll" is the Roll of the target.
This intrinsically floating point quantity has been multiplied by 10,000
and then integerized to make an integer quantity with units of 0.0001-degrees.

The "filter" is the filter used for the image.  The values are:
0  Blocked
1  UV_Grism
2  UVW2
3  V
4  UVM2
5  Vis_Grism
6  UVW1
7  U
8  Magnifier
9  B
10 White
11 unknown

The "expo_id" is the exposure_ID expressed in spacecraft seconds.
(???what is range?  ambiguity????)

The "X/Y_offset" are the coordinates of pixel_zero in the Image subarray.
The units are detector coordinates: 0-2095.

The "width" and "height" are the sizes of the Image subarray.
The units are detector coordinates: 0-2095.

The "xy_grb" is the position of the GRB in unbinned detector units.  The source
of this position is determined by the 2^28 bit in the "misc" field.

The "n_frames" is the total number of read-out frames that went into
compiling this Image.

The "swl_lwl" is the 'short word length' and the 'long word length' used
in the compress of the as-transmitted image packet.  There is no compression
in the GCN-version of this Notice (so they are pretty much useless by the time
it gets to GCN distribution).

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-3   Four bits encoding the pixel binning, eg =0 means 1x1 binning (ie none), =1 mean 2x2 binning,
        =2 means 4x4 binning, up to =6 mean 64x64 binning.
2^4-10  The height of the Detector Window used in the "Blue" Processing Electronics.
2^11    When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
        were out of valid range (eg RA was 361 deg).
2^12    When this bit is a 1, it is in the catalog of sources to be blocked (internal use only).
2^13    When this bit is a 1, there is a nearby bright star (mag less than 6.5).
2^14-19  Not assigned.
2^20    When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real UVOT_IMAGE.
2^21    When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
        during a time when the StarTracker had a Loss-of-Lock.
2^22    When this bit is a 1, it indicates that this Notice was generated as a result
        of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
        and this Notice was generated as a direct result of that observation.)
2^23    Not assigned.
2^24    Not assigned.
2^25    Not assigned.
2^26    Not assigned.
2^27    Not assigned.
2^28    When this bit is a 1, then the source of the GRB Position came from an XRT Position command,
        else it came from the Window Position in the Mode command.
2^29    This bit is set if this UVOT_IMAGE Noticed was forced-out via the watchdog timeout.
2^30    When this bit is a 1, then this Notice was ground-generated; else flight-generated.
        This will always 0 for the 'raw' form of this Notice (type=72) and
        1 for the ground-processed form (type=79).
2^31    If there is a CRC error in one or more of the packets that went into
        the making of this Notice, then this bit is set to 1, else 0.

The "url" is just the filename portion of the URL -- the leading path
for the full URL is "http://gcn.gsfc.nasa.gov/gcn/notices_s/".
This item in the packet spans 17 longwords (ie 68 bytes) and contains 
the ASCII string of the filename portion of the URL.  This string
can be up to 67 characters long, and will always be null-terminated.

There are a total of 2 "spare" items in the packet (usually filled
with zeros).  They are located at items 20-21.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=73 PACKET CONTENTS:

The SWIFT_UVOT_SRCLIST packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=73)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       start_tjd    [days]          Truncated Julian Day
long         6       start_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       point_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       point_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       image_roll   [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         10      filter       integer         Which filter was used
long         11      bkg_mean     [0.001-dn]      Mean of the background
long         12      x_max        [det_coords]    0-2095
long         13      y_max        [det_coords]    0-2095
long         14      n_stars      integer         1-infinity
long         15      x_offset     [det_coords]    0-2095
long         16      y_offset     [det_coords]    0-2095
long         17      det_thresh   integer         0-????
long         18      photo_thresh integer         0-????
long         19      misc         bits            Misc stuff packed in here
long         20-22   spare[2]     integer         8 bytes for the future
quad_char    22-38   url          -               The URL for the image
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
72 = SWIFT_UVOT_IMAGE, and 73 = SWIFT_UVOT_SRCLIST (Only the raw UVOT Notices are listed here;
see before and later for the other Swift-BAT/XRT Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "Start_tjd" is the Truncated Julian Day of the start of the Finding Chart
CCD integration, eg. TJD=13370 is 01 Jan 2005.

The "Start_sod" is the UT seconds-of-day (SOD) of the start of the Finding Chart
CCD integration.  The units are in centi-seconds (ie the fl.pt. seconds were multiplied
by 100 and then integerized).

The "point_ra" and "point_dec" are the RA,Dec coordinates (J2000)
of the pointing direction of the s/c at the start?/stop???
of the integration interval for the image.  These intrinsically floating point
quantities have been multiplied by 10,000 and then integerized to make
an integer quantity with units of 0.0001-degrees.

The "image_roll" is the Roll of the target.
This intrinsically floating point quantity has been multiplied by 10,000
and then integerized to make an integer quantity with units of 0.0001-degrees.

The "filter" is the filter used for the image.  The values are:
0  Blocked
1  UV_Grism
2  UVW2
3  V
4  UVM2
5  Vis_Grism
6  UVW1
7  U
8  Magnifier
9  B
10 White
11 unknown

The "bkg_mean" is the mean value of the background level in the exposure.
This intrinsically floating point quantity has been multiplied by 1000
and then integerized to make an integer quantity with units of 0.001-degrees.

The "x/y_max"  are the maximum extent of the image window expressed
in detector coordinates (0-2095).

The "n_stars" is the total number of stars in the source list.

The "x/y_offset0" are the X and Y offsets of the image window expressed
in detector coordinates (0-2095).

The "det_thresh" is the detection threshold used in this exposure.
The units are "dn" (digital number), and the range is 0 to ????.

The "photo_thresh" is the photometry threshold used in this exposure.
The units are "dn" (digital number), and the range is 0 to ????.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  When this bit is a 1, it is in the catalog of sources to be blocked (internal use only).
2^13  When this bit is a 1, there is a nearby bright star (mag less than 6.5).
2^14-19  Not assigned.
2^20    When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real UVOT_SL.
2^21  When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
      during a time when the StarTracker had a Loss-of-Lock.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  Not assigned.
2^25  Not assigned.
2^26  Not assigned.
2^27  Not assigned.
2^28  Not assigned.
2^29  This bit is set if this UVOT_SrcList Noticed was forced-out via the watchdog timeout.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      This will always 0 for the 'raw' form of this Notice (type=73) and
      1 for the ground-processed form (type=80).
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "url" is just the filename portion of the URL -- the leading path
for the full URL is "http://gcn.gsfc.nasa.gov/gcn/notices_s/".
This item in the packet spans 17 longwords (ie 68 bytes) and contains 
the ASCII string of the filename portion of the URL.  This string
can be up to 67 characters long, and will always be null-terminated.

There are a total of 3 "spare" items in the packet (usually filled
with zeros).  They are located at items 20-22.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=74 PACKET CONTENTS:      [NOT YET AVAILABLE]

The SWIFT_FULL_DATA_INIT packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=74)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4-18    spare[15]    integer         60 bytes for the future
long         19      misc         bits            Misc stuff packed in here
long         20-21   spare[2]     integer         8 bytes for the future
quad_char    22-38   url          -               The URL for the data set
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
74 = SWIFT_FULL_DATA_INIT, 75 = SWIFT_FULL_DATA_UPDATE.
(Only the raw FULL_DATA Notices are listed here;
see above for the other Swift-BAT/XRT/UVOT Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "misc" field contains miscellaneous flag bits.  Currently, only
one bit is defined:
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      This will always be 1.

The "url" is the URL location of the newly arrived data set.
The "url" is just the filename portion of the URL -- the leading path
for the full URL is "http://gcn.gsfc.nasa.gov/gcn/notices_s/"(TBC).
This item in the packet spans 17 longwords (ie 68 bytes) and contains 
the ASCII string of the filename portion of the URL.  This string
can be up to 67 characters long, and will always be null-terminated.

There are a total of 17 "spare" items in the packet (usually filled
with zeros).  They are located at items 4-18 and 20-21.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=75 PACKET CONTENTS:      [NOT YET AVAILABLE]

The SWIFT_FULL_DATA_UPDATE packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=75)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4-18    spare[15]    integer         60 bytes for the future
long         19      misc         bits            Misc stuff packed in here
long         20-21   spare[2]     integer         8 bytes for the future
quad_char    22-38   url          -               The URL for the data set
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
74 = SWIFT_FULL_DATA_INIT, 75 = SWIFT_FULL_DATA_UPDATE.
(Only the raw FULL_DATA Notices are listed here;
see above for the other Swift-BAT/XRT/UVOT Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "misc" field contains miscellaneous flag bits.  Currently, only
one bit is defined:
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      This will always be 1.

The "url" is the URL location of the newly arrived data set.
The "url" is just the filename portion of the URL -- the leading path
for the full URL is "http://gcn.gsfc.nasa.gov/gcn/notices_s/"(TBC).
This item in the packet spans 17 longwords (ie 68 bytes) and contains 
the ASCII string of the filename portion of the URL.  This string
can be up to 67 characters long, and will always be null-terminated.

There are a total of 17 "spare" items in the packet (usually filled
with zeros).  They are located at items 4-18 and 20-21.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=76 PACKET CONTENTS:

The SWIFT_BAT_GRB_LC_PROCESSED packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=76)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9-11    spare[3]     integer         12 bytes for the future
long         12      phi          [centi-deg]     (int)(0.0 to 359.9999 *100)
long         13      theta        [centi-deg]     (int)(0.0 to +70.0 *100)
long         14      delta_time   [centi-sec]     (int)(ssss.sss *100)
long         15      spare        integer         4 bytes for the future
long         16      lon_lat      2_shorts        (int)(Longitude,Lattitude *100)
long         17      trig_index   integer         Rate_Trigger index
long         18      soln_status  bits            Type of source/trigger found
long         19      misc         bits            Misc stuff packed in here
long         20      image_signif [centi-sigma]   (int)(sig2noise *100)
long         21      rate_signif  [centi-sigma]   (int)(sig2noise *100)
quad_char    22-38   url          -               The URL for the lightcurve
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
76 = SWIFT_BAT_GRB_LIGHTCURVE_PROC, 77 = SWIFT_XRT_SPECTRUM_PROC,
78 = SWIFT_XRT_IMAGE_PROC, 79 = SWIFT_UVOT_IMAGE_PROC, and
80 = SWIFT_UVOT_SRCLIST_PROC. (Only the ground-processed Notices are listed here;
see before for all the other Swift Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "burst_tjd" is the Truncated Julian Day of the Swift-BAT burst trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the Swift-BAT burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the BAT flight software (J2000 epoch).  These will always be
the same values as in the SWIFT_BAT_POS_ACK packet.  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "phi" and "theta" are the BAT instrument coordinates of the trigger (burst)
as determined by the BAT flight software program.  Phi is measured phi=0
along the +Y-axis of the s/c and increasing towards the -Z axis,
and theta is measured from the boresight of the BAT instrument.

The "delta_time" is the difference between the first sample in the lightcurve
and the Trigger_time.  The units are centi-seconds (although they will always be whole sec).

The "lon_lat" is the Longitude and Lattitude of the s/c at the time of the BAT trigger.
This 4-byte quantity is composed of two 2-byte integers.  The high-order short
is the latitude multiplied by 100 and integerized; the low-order short
is the longitude multiplied by 100 and integerized; ie both values are in centi-degrees.

The "trig_index" is the index value (row_number in the BAT on-board flight s/w table)
of the trigger criteria that was the highest-significance successful trigger.

The "soln_status" (aka trigger_id) field contains flag bits copied from the BAT_POS_ACK
ie (a) flag bits on the type of solution that was found in the on-board image and
about whether it matches anything in the on-board source catalog, and
(b) flag bits that are assigned in the GCN ground-processing.
(This 18-th 4-byte field is only defined/valid for packets (a) if the 2^24 bit is set
in the 'misc' field,  and (b) if it was generated after 03 May 05 (the time
when the distribution order of the BAT_POS and FOM_OBS packets was changed
to allow for the filling of this field and to allow for the filtering of FOM_OBS
based on these trigger_id bits).)
The bit packing of the "soln_status" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        F     point_src      0=No or 1=Yes, a point source was found
1        F     grb            0=No or 1=Yes, it is a GRB
2        F     interesting    0=No or 1=Yes, it is an interesting src (ie a flaring known src)
3        F     flt_cat_src    0=No or 1=Yes, it is in the flight catalog (else unknown src)
4        F     image_trig     0=No or 1=Yes, it is an image trigger (else rate trig)
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (hi bkg level, ie near SAA)
7        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (low image significance; less then 7.0 sigma)
8        G     gnd_cat_src    0=No or 1=Yes, it is in the ground catalog
9        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (negative bkg slope, exit SAA)
10       G     st_loss_lock   0=No or 1=Yes, StarTracker not locked so trigger probably bogus
11       G     uncert_grb     0=No or 1=Yes, it is really probably not a GRBorTransient (VERY low image significance; less than 6.5 sigma)
12       G     blk_cat_src    0=No or 1=Yes, it is in the catalog of sources to be blocked (internal use only)
13       G     near_brt_star  0=No or 1=Yes, there is a nearby bright star (this is a duplicate of the "misc" 2^13).
14-31    -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  Not assigned.
//2^13  When this bit is a 1, it indicates that this position is near a bright star (mag less than 6.5).
//2^14  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
//      is less than the sum of the position error radius and the galaxy radius AND that the position error radius
//      is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
//2^15  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
//      is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
//      is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-19  Not assigned.
2^20  When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real BAT_PROC_LC.
2^21  When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
      during a time when the StarTracker had a Loss-of-Lock.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  This includes "extended" data packets.
2^24  This bit is set if the 'soln_status' field was copied to here from BAT_POS_ACK.
2^25  When this bit is a 1, then this Notice was generated with the 3rd of 3 pkts missing.
2^26  When this bit is a 1, then this Notice was generated with the 2nd of 3 pkts missing.
2^27  When this bit is a 1, then this Notice was generated with the 1st of 3 pkts missing.
2^28  When this bit is a 1, then this lightcurve contains GT 50 illegal values.
      This is probably an empty lightcurve for a long image trigger.
2^29  This bit is set if this original 'raw' LightCurve Noticed was forced-out via the watchdog timeout.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      This will always be 0 for the 'raw' form of this Notice (type=63) and
      1 for this ground-processed form (type=76).
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "image_signif" is the significance level of the peak in the FFT image plane.
This is the signal/noise (ie number of sigma) of the grb peak detection
multiplied by 100 and then integerized (ie units are centi-sigma).
This field was copied from the BAT_POS notice.

The "rate_signif" is the significance level of the initial 'rate trigger'.
This is the signal/noise (ie number of sigma) of the rate-trigger detection
multiplied by 100 and then integerized (ie units are centi-sigma).
This field was copied from the BAT_POS notice.

The "url" is just the filename portion of the URL -- the leading path
for the full URL is "http://gcn.gsfc.nasa.gov/gcn/notices_s/".
This item in the packet spans 17 longwords (ie 68 bytes) and contains 
the ASCII string of the filename portion of the URL.  This string
can be up to 67 characters long, and will always be null-terminated.

There are a total of 4 "spare" items in the packet (usually filled
with zeros).  They are located at items 9-11 and 15.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=77 PACKET CONTENTS:

The SWIFT_XRT_SPEC_PROCESSED packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=77)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       SpecStart_tjd[days]          Truncated Julian Day
long         6       SpecStart_sod[centi-sec]     (int)(sssss.sss *100)
long         7       bore_ra      [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       bore_dec     [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       LiveTime     [centi-sec]     (int)(sssss.sss *100)
long         10      SpecStopTJD  [days]          Truncated Julian Day
long         11      SpecStopSOD  [centi-sec]     (int)(sssss.sss *100)
long         12      mode         integer         XRT operational mode
long         13      waveform     integer         Waveform number (50 or 60)
long         14      bias         integer         Bias value (??? - ????)
long         15-18   spare[4]     integer         16 bytes for the future
long         19      misc         bits            Misc stuff packed in here
long         20      spare        integer         4 bytes for the future
long         21      term_code    integer         Termination condition code
quad_char    22-38   url          -               The URL for the spectrum
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
76 = SWIFT_BAT_GRB_LIGHTCURVE_PROC, 77 = SWIFT_XRT_SPECTRUM_PROC,
78 = SWIFT_XRT_IMAGE_PROC, 79 = SWIFT_UVOT_IMAGE_PROC, and
80 = SWIFT_UVOT_SRCLIST_PROC. (Only the ground-processed Notices are listed here;
see before for all the other Swift Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "SpecStart_tjd" is the Truncated Julian Day of the start of the first
CCD integration in the spectrum accumulation, eg. TJD=13370 is 01 Jan 2005.

The "SpecStart_sod" is the UT seconds-of-day (SOD) of the start of the first
CCD integration in the spectrum accumulation.  The units are in centi-seconds
(ie the fl.pt. seconds were multiplied by 100 and then integerized).

The "bore_ra/dec" is the RA,dec of the XRT bore sight (J2000 epoch).
This is the center of the FOV of the XRT image.  These intrinsically floating point
quantities have been multiplied by 10,000 and then integerized to make
an integer quantity with units of 0.0001-degrees.

The "live_time" is the exposure time duration of the spectrum integration.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "SpecStop_tjd" is the Truncated Julian Day of the last CCD integration
in the spectrum accumulation, eg. TJD=13370 is 01 Jan 2005.

The "SpecStop_sod" is the UT seconds-of-day (SOD) of the last CCD integration
in the spectrum accumulation.  The units are in centi-seconds
(ie the fl.pt. seconds were multiplied by 100 and then integerized).

The "mode" is the CCD Readout mode.  The values are:
1  Null
2  Short image
3  Long image
4  Piled-up Photodiode
5  Low Rate Photodiode
6  Windowed Timing
7  Photo-counting
8  Raw data
9  Bias map
10 Stop

The "waveform" is the CCD waveform ID. The values are either 50 or 60.

The "bias" is the bias value of the last LRPD frame (ignore this for WT spectrum).
the units are ADU.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  When this bit is a 1, it is in the catalog of sources to be blocked (internal use only).
2^13  When this bit is a 1, there is a nearby bright star (mag less than 6.5).
2^14-19  Not assigned.
2^20  When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real XRT_PROC_SPEC.
2^21  When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
      during a time when the StarTracker had a Loss-of-Lock.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  When this bit is a 1, the xrt_proc_sp{1,2}.fits file had an error in processing and does not exist.
2^25  Not assigned.
2^26  Not assigned.
2^27  Not assigned.
2^28  Not assigned.
2^29  This bit is set if this original 'raw' Spectrum Noticed was forced-out via the watchdog timeout.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      This will always be 0 for the 'raw' form of this Notice (type=68) and
      1 for the ground-processed form (type=77).
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "term_cond" is the termination condition of the lightcurve collection process.
The values are:
0  Normal,
1  Terminated by time,
2  Terminated by snapshot,
3  Terminated by entering SAA,
4  Spectrum generated at the LRPD-to-WT transition,
5  Spectrum generated at the WT-to-LRorPC transition.

The "url" is just the filename portion of the URL -- the leading path
for the full URL is "http://gcn.gsfc.nasa.gov/gcn/notices_s/".
This item in the packet spans 17 longwords (ie 68 bytes) and contains 
the ASCII string of the filename portion of the URL.  This string
can be up to 67 characters long, and will always be null-terminated.

There are a total of 5 "spare" items in the packet (usually filled
with zeros).  They are located at items 15-18, and 20.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=78 PACKET CONTENTS:

The SWIFT_XRT_IMAGE_PROCESSED packet (aka poststamp image) consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=78)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       ImgStartTJD  [days]          Image Start Truncated Julian Day
long         6       ImgStartSOD  [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       n_bright     [pixels]        Num of bright pixels in the image
long         10      spare        integer         4 bytes for the future
long         11      cent_sdev    [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         12      cent_x       [centi-pixels]  (int)(xxx.xx *100)
long         13      cent_y       [centi-pixels]  (int)(yyy.yy *100)
long         14      iraw_x       [pixels]        ?????????
long         15      iraw_y       [pixels]        ?????????
long         16      roll         [0.0001-deg]    (int)(-180.0 to +180.0 *10000)
long         17      gain/mod/wav mixed           gain, mode, & waveform; ints
long         18      expo_time    [centi-sec]     (int)(sssss.sss *100)
long         19      misc         bits            Misc stuff packed in here
long         20      grb_in_xrt_y integer         ???????
long         21      grb_in_xrt_z integer         ???????
quad_char    22-38   url          -               The URL for the image
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
76 = SWIFT_BAT_GRB_LIGHTCURVE_PROC, 77 = SWIFT_XRT_SPECTRUM_PROC,
78 = SWIFT_XRT_IMAGE_PROC, 79 = SWIFT_UVOT_IMAGE_PROC, and
80 = SWIFT_UVOT_SRCLIST_PROC. (Only the ground-processed Notices are listed here;
see before for all the other Swift Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "ImgStart_tjd" is the Truncated Julian Day of the start of the image integration.
eg. TJD=13370 is 01 Jan 2005.

The "ImgStart_sod" is the UT seconds-of-day (SOD) start of the image integration.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_ra/dec" is the RA,dec of the centroid of the source found
in the image (J2000 epoch).  These intrinsically floating point quantities
have been multiplied by 10,000 and then integerized to make
an integer quantity with units of 0.0001-degrees.

The "n_bright" is the number of bright pixels in the 51x51 postage-stamp image,
where bright means the pixel intensity is above the LLD and below the ULD thresholds.

The "cent_sdev" is the standard deviation of the centroid peak in the image.
The units are 0.0001-degrees (ie the fl.pt. std_dev was multiplied by 10000
and then integerized).

The "cent_x/y" is the centroid position in raw units.
The units are centi-pixels (ie the fl.pt. position was multiplied by 100
and then integerized).

The "iraw_x/y" are the row/column numbers (in units of CCD pixels) of the center
of the 51x51 pixel image that is this 'postage-stamp' subarray of the whole CCD.

The "roll" angle of the spacecraft.  This intrinsically floating point quantity
has been multiplied by 10,000 and then integerized to make an integer quantity
with units of 0.0001-degrees.

The "gain/mod/wav" is a triplet of 1-byte values in a single 4-byte quantity.
The "gain" is the gain of the amplifier used during the readout of the CCD.
It is packed in bits 2^16-23.  The value will be 1, 2, 4, 8, or 16.
The "mode" is the CCD Readout mode.  It is packed in bits 2^8-15.  The values are:
1  Null
2  Short image
3  Long image
4  Piled-up Photodiode
5  Low Rate Photodiode
6  Windowed Timing
7  Photo-counting
8  Raw data
9  Bias map
10 Stop
The "waveform" is the CCD waveform ID.  It is packed in bits 2^0-7.
The values are:
? ???????????
? ???????????
? ???????????

The "expo_time" is the nominal exposure time for this image.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  When this bit is a 1, it is in the catalog of sources to be blocked (internal use only).
2^13  When this bit is a 1, it indicates that this position is near a bright star (mag less than 6.5).
2^14  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the position error radius
      is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
      is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-19  Not assigned.
2^20  When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real XRT_PROC_IMAGE.
2^21  When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
      during a time when the StarTracker had a Loss-of-Lock.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  When this bit is a 1, the xrt_proc_image.fits file had an error in processing and does not exist.
2^25  Not assigned.
2^26  Not assigned.
2^27  Not assigned.
2^28  Not assigned.
2^29  This bit is set if this original 'raw' Image Noticed was forced-out via the watchdog timeout.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      This will always be 0 for the 'raw' form of this Notice (type=69) and
      1 for the ground-processed form (type=78).
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "grb_in_xrt_y/z" is the GRB x-ray afterglow position in XRT coordinates.
The units are ????????????

The "url" is just the filename portion of the URL -- the leading path
for the full URL is "http://gcn.gsfc.nasa.gov/gcn/notices_s/".
This item in the packet spans 17 longwords (ie 68 bytes) and contains 
the ASCII string of the filename portion of the URL.  This string
can be up to 67 characters long, and will always be null-terminated.

There is a total of 1 "spare" items in the packet (usually filled
with zeros).  It is located at item 10.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=79 PACKET CONTENTS:

The SWIFT_UVOT_IMAGE_PROCESSED packet (aka DarkBurst, aka Genie) consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=79)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       ExpStart_tjd [days]          Truncated Julian Day
long         6       ExpStart_sod [centi-sec]     (int)(sssss.sss *100)
long         7       point_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       point_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       image_roll   [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         10      filter       integer         Which filter was used
long         11      expo_id      [sec]           Exposure_ID expressed in s/c_sec
long         12      X0           [det_coords]    0-2095
long         13      Y0           [det_coords]    0-2095
long         14      width        [det_coords]    0-2095
long         15      height       [det_coords]    0-2095
long         16      xy_grb       [det_coords]    0-2095; two packed
long         17      n_frames     integer         1-inf
long         18      swl_lwl      integers        2 4-bit integers
long         19      misc         bits            Misc stuff packed in here
long         20-21   spare[2]     integer         8 bytes for the future
quad_char    22-38   url          -               The URL for the image
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
76 = SWIFT_BAT_GRB_LIGHTCURVE_PROC, 77 = SWIFT_XRT_SPECTRUM_PROC,
78 = SWIFT_XRT_IMAGE_PROC, 79 = SWIFT_UVOT_IMAGE_PROC, and
80 = SWIFT_UVOT_SRCLIST_PROC. (Only the ground-processed Notices are listed here;
see before for all the other Swift Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "ExpStart_tjd" is the Truncated Julian Day of the start of the CCD integration,
eg. TJD=13370 is 01 Jan 2005.

The "ExpStart_sod" is the UT seconds-of-day (SOD) of the start of the CCD integration.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100 and then integerized).

The "point_ra" and "point_dec" are the RA,Dec coordinates (J2000)
of the pointing direction of the s/c at the start?/stop???
of the integration interval for the image.  These intrinsically floating point
quantities have been multiplied by 10,000 and then integerized to make
an integer quantity with units of 0.0001-degrees.

The "image_roll" is the Roll of the target.
This intrinsically floating point quantity has been multiplied by 10,000
and then integerized to make an integer quantity with units of 0.0001-degrees.

The "filter" is the filter used for the image.  The values are:
0  Blocked
1  UV_Grism
2  UVW2
3  V
4  UVM2
5  Vis_Grism
6  UVW1
7  U
8  Magnifier
9  B
10 White
11 unknown

The "expo_id" is the exposure_ID expressed in spacecraft seconds.
(???what is range?  ambiguity????)

The "X/Y_offset" are the coordinates of pixel_zero in the Image subarray.
The units are detector coordinates: 0-2095.

The "width" and "height" are the sizes of the Image subarray.
The units are detector coordinates: 0-2095.

The "xy_grb" is the position of the GRB in unbinned detector units.  The source
of this position is determined by the 2^28 bit in the "misc" field.

The "n_frames" is the total number of read-out frames that went into
compiling this Image.

The "swl_lwl" is the 'short word length' and the 'long word length' used
in the compress of the as-transmitted image packet.  There is no compression
in the GCN-version of this Notice (so they are pretty much useless by the time
it gets to GCN distribution).

The "n_stars" is the total number of stars in the source list.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-3   Four bits encoding the pixel binning, eg =0 means 1x1 binning (ie none), =1 mean 2x2 binning,
        =2 means 4x4 binning, up to =6 mean 64x64 binning.
2^4-10  The height of the Detector Window used in the "Blue" Processing Electronics.
2^11    When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
        were out of valid range (eg RA was 361 deg).
2^12    When this bit is a 1, it is in the catalog of sources to be blocked (internal use only).
2^13    When this bit is a 1, there is a nearby bright star (mag less than 6.5).
2^14-19 Not assigned.
2^20    When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real UVOT_PROC_IMAGE.
2^21    When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
        during a time when the StarTracker had a Loss-of-Lock.
2^22    When this bit is a 1, it indicates that this Notice was generated as a result
        of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
        and this Notice was generated as a direct result of that observation.)
2^23    Not assigned.
2^24    When this bit is a 1, the uvot_sky_image.ps file had an error in processing and does not exist.
2^25    When this bit is a 1, the uvot_sources_image.fits file had an error in processing and does not exist.
2^26    When this bit is a 1, the uvot_catalog_image.fits file had an error in processing and does not exist.
2^27    When this bit is a 1, the uvot_field_image.ps file had an error in processing and does not exist.
2^28    When this bit is a 1, then the source of the GRB Position came from an XRT Position command,
        else it came from the Window Position in the Mode command.
2^29    This bit is set if this original 'raw' Image Noticed was forced-out via the watchdog timeout.
2^30    When this bit is a 1, then this Notice was ground-generated; else flight-generated.
        This will always be 0 for the 'raw' form of this Notice (type=72) and
        1 for the ground-processed form (type=79).
2^31    If there is a CRC error in one or more of the packets that went into
        the making of this Notice, then this bit is set to 1, else 0.

The "url" is just the filename portion of the URL -- the leading path
for the full URL is "http://gcn.gsfc.nasa.gov/gcn/notices_s/".
This item in the packet spans 17 longwords (ie 68 bytes) and contains 
the ASCII string of the filename portion of the URL.  This string
can be up to 67 characters long, and will always be null-terminated.

There are a total of 2 "spare" items in the packet (usually filled
with zeros).  They are located at items 20-21.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=80 PACKET CONTENTS:

The SWIFT_UVOT_SRCLIST_PROCESSED packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=80)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       start_tjd    [days]          Truncated Julian Day
long         6       start_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       point_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       point_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       image_roll   [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         10      filter       integer         Which filter was used
long         11      spare        integer         4 bytes for the future
long         12      x_max        [det_coords]    0-2095
long         13      y_max        [det_coords]    0-2095
long         14      n_stars      integer         1-infinity
long         15      x_offset     [det_coords]    0-2095
long         16      y_offset     [det_coords]    0-2095
long         17-18   spare[2]     integer         8 bytes for the future
long         19      misc         bits            Misc stuff packed in here
long         20-22   spare[2]     integer         8 bytes for the future
quad_char    22-38   url          -               The URL for the image
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
76 = SWIFT_BAT_GRB_LIGHTCURVE_PROC, 77 = SWIFT_XRT_SPECTRUM_PROC,
78 = SWIFT_XRT_IMAGE_PROC, 79 = SWIFT_UVOT_IMAGE_PROC, and
80 = SWIFT_UVOT_SRCLIST_PROC. (Only the ground-processed Notices are listed here;
see before for all the other Swift Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "Start_tjd" is the Truncated Julian Day of the start of the Finding Chart
CCD integration, eg. TJD=13370 is 01 Jan 2005.

The "Start_sod" is the UT seconds-of-day (SOD) of the start of the Finding Chart
CCD integration.  The units are in centi-seconds (ie the fl.pt. seconds were multiplied
by 100 and then integerized).

The "point_ra" and "point_dec" are the RA,Dec coordinates (J2000)
of the pointing direction of the s/c at the start?/stop???
of the integration interval for the image.  These intrinsically floating point
quantities have been multiplied by 10,000 and then integerized to make
an integer quantity with units of 0.0001-degrees.

The "image_roll" is the Roll of the target.
This intrinsically floating point quantity has been multiplied by 10,000
and then integerized to make an integer quantity with units of 0.0001-degrees.

The "filter" is the filter used for the image.  The values are:
0  Blocked
1  UV_Grism
2  UVW2
3  V
4  UVM2
5  Vis_Grism
6  UVW1
7  U
8  Magnifier
9  B
10 White
11 unknown

The "bkg_mean" is the mean value of the background level in the exposure.

The "x/y_max"  are the maximum extent of the image window expressed
in detector coordinates (0-2095).

The "n_stars" is the total number of stars in the source list.

The "x/y_offset0" are the X and Y offsets of the image window expressed
in detector coordinates (0-2095).

The "det_thresh" is the detection threshold used in this exposure.
The units are "dn" (digital number), and the range is 0 to ????.

The "photo_thresh" is the photometry threshold used in this exposure.
The units are "dn" (digital number), and the range is 0 to ????.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  When this bit is a 1, it is in the catalog of sources to be blocked (internal use only).
2^13  When this bit is a 1, there is a nearby bright star (mag less than 6.5).
2^14-19  Not assigned.
2^20  When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real UVOT_PROC_SL.
2^21  When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
      during a time when the StarTracker had a Loss-of-Lock.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  When this bit is a 1, the uvot_sky_srclist.ps file had an error in processing and does not exist.
2^25  When this bit is a 1, the uvot_sources_srclist.fits file had an error in processing and does not exist.
2^26  When this bit is a 1, the uvot_catalog_srclist.fits file had an error in processing and does not exist.
2^27  When this bit is a 1, the uvot_field_srclist.ps file had an error in processing and does not exist.
2^28  Not assigned.
2^29  This bit is set if this original 'raw' SrcList Noticed was forced-out via the watchdog timeout.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      This will always be 0 for the 'raw' form of this Notice (type=73) and
      1 for the ground-processed form (type=80).
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "url" is just the filename portion of the URL -- the leading path
for the full URL is "http://gcn.gsfc.nasa.gov/gcn/notices_s/".
This item in the packet spans 17 longwords (ie 68 bytes) and contains 
the ASCII string of the filename portion of the URL.  This string
can be up to 67 characters long, and will always be null-terminated.

There are a total of 3 "spare" items in the packet (usually filled
with zeros).  They are located at items 20-22.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=81 PACKET CONTENTS:

The SWIFT_UVOT_POS packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=81)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_mag    [arb]           (int)(uvot_mag *100)
long         10      filter       integer         Filter_value: x-yy
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12-15   spare[4]     integer         16 bytes for the future
long         16      hi_prec_err  [centi-arcsec]  hi precission error
long         17      spare        integer         24 bytes for the future
long         18      soln_status  bits            Type of source found
long         19      misc         bits            Misc stuff packed in here
long         20      mag_error    [arb]           (int)(mag_error *100)
long         21      uvot-xrt     [0.0001-deg]    Distance between XRT & UVOT pos
long         22-38   spare[17]    integer         68 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
76 = SWIFT_BAT_GRB_LIGHTCURVE_PROC, 77 = SWIFT_XRT_SPECTRUM_PROC,
78 = SWIFT_XRT_IMAGE_PROC, 79 = SWIFT_UVOT_IMAGE_PROC, and
80 = SWIFT_UVOT_SRCLIST_PROC. (Only the ground-processed Notices are listed here;
see before for all the other Swift Notices type values.)

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "burst_tjd" is the Truncated Julian Day of the Swift-UVOT data,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the Swift-UVOT data.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the trigger/burst
as determined by the UVOT ground software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "burst_mag" is the magnitude (in the specified filter) of the burst/afterglow.
The units are in centi-mag (ie the fl.pt. magnitude is multiplied by 100
and then integerized).

The "filter" is the filter used for the image.  The values are:
0  Blocked
1  UV_Grism
2  UVW2
3  V
4  UVM2
5  Vis_Grism
6  UVW1
7  U
8  Magnifier
9  B
10 White
11 unknown

The "burst_error" is the radius of the circle that will contain on average
90% of the bursts afterglow positions.  (See the "hi_prec_err" below.)

The "hi_prec_err" is the radius of the circle that will contain on average
90% of the bursts afterglow positions.  It contains statistical plus
systematic contributions.  This is different than the regular "burst_error"
in that the units are 'centi-arcsec' to remove quantization error of 0.36arcsec
introduced by the regular "burst_error" value.

The "soln_status" field contains flag bits on the type of solution that was found.
The bit packing of the "soln_status" entry in the packet is:
Bit_Number     Item_name      Description
----------     ---------      -----------
0              point_src      0=No or 1=Yes, a point source was found, 0=extended src
1              grb            0=No or 1=Yes, it is a GRB
2              undef          Not yet defined.
3              catalog_src    0=No or 1=Yes, it is in the catalog (else unknown src)
4              undef          Not yet defined.
5              def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-7            undef          Not yet defined.
8        G     gnd_cat_src    0=No or 1=Yes, BAT_loc is in the BAT ground catalog
9-27           undef          Not yet defined.
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30             test_submit    0=No or 1=Yes, this is a test submission (internal use only)
31             undef          Not yet defined.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-11  Not assigned.
2^12  When this bit is a 1, it is in the catalog of sources to be blocked (internal use only).
2^13  When this bit is a 1, it indicates that this position is near a bright star (mag less than 6.5).
//2^14  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
//      is less than the sum of the position error radius and the galaxy radius AND that the position error radius
//      is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
//2^15  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
//      is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
//      is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-21  Not assigned.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  Not assigned.
2^25  This is an updated position.  This is a position notice that changes/improves
      the position specified in the original UVOT_Position Notice.
2^26  Not assigned.
2^27  Not assigned.
2^28  Not assigned.
2^29  Not assigned.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "mag_error" is the uncertainty in the magnitude value (in the specified filter).
The units are in centi-mag (ie the fl.pt. mag_error is multiplied by 100
and then integerized).

The "uvot-xrt" is the angular distance between the UVOT position and the XRT position.
This intrinsically floating point quantity have been multiplied by 10,000 and
then integerized to make an integer quantity with units of 0.0001-degrees.

There are a total of 23 "spare" items in the packet (usually filled
with zeros).  They are located at items 12-15, 17, and 22-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.





TYPE=82 PACKET CONTENTS:

The SWIFT_BAT_GRB_POS_TEST packet consists of 40 four-byte quantities.
This is identical in form and content to SWIFT_BAT_GRB_POS_ACK(type=61)
in everything except the first 4-byte quantity: ie the pkt_type value
is 82 instead of 61.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=82)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_flue   [counts]        Num events during trig window, 0 to inf
long         10      burst_ipeak  [cnts*ff]       Counts in image-plane peak, 0 to infinity
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12      phi          [centi-deg]     (int)(0.0 to 359.9999 *100)
long         13      theta        [centi-deg]     (int)(0.0 to +70.0 *100)
long         14      integ_time   [4mSec]         Duration of the trigger interval, 1 to inf
long         15      spare        integer         4 bytes for the future
long         16      lon_lat      2_shorts        (int)(Longitude,Lattitude *100)
long         17      trig_index   integer         Rate_Trigger index
long         18      soln_status  bits            Type of source found
long         19      misc         bits            Misc stuff packed in here
long         20      image_signif [centi-sigma]   (int)(sig2noise *100)
long         21      rate_signif  [centi-sigma]   (int)(sig2noise *100)
long         22      bkg_flue     [counts]        Num events during the bkg interval, 0 to inf
long         23      bkg_start    [centi-sec]     (int)(sssss.sss *100)
long         24      bkg_dur      [centi-sec]     (int)(0-80,000 *100)
long         25-35   spare[11]    integer         44 bytes for the future
long         36      merit_0-3    integers        Merit params 0,1,2,3 (-127 to +127)
long         37      merit_4-7    integers        Merit params 4,5,6,7 (-127 to +127)
long         38      merit_8-9    integers        Merit params 8,9     (-127 to +127)
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The SWIFT_BAT_GRB_POS_TEST is 82.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger (this new burst).
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "burst_tjd" is the Truncated Julian Day of the Swift-BAT burst trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the Swift-BAT burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the BAT flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "burst_flue" is the number of events (burst+background events)
during the 'integ_time' time interval of the successful trigger criterion.

The "burst_ipeak" is the height of the peak in the sky-image plane (ie the result
of the FFT,MaskConvolution,InvFFT calculation).  The units are counts
after a multiplicative factor of 0.5-0.7.

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are centi-degrees (ie the fl.pt. error was multiplied
by 100 and then integerized).  [Initially, this value will be hardwired 
at a constant value of 4arcmin (0.067deg) radius.  As the mission progresses,
this will be converted to a value which is dependent on the initial flux
of the burst.]

The "phi" and "theta" are the BAT instrument coordinates of the trigger (burst)
as determined by the BAT flight software program.  Phi is measured phi=0
along the +Y-axis of the s/c and increasing towards the -Z axis,
and theta is measured from the boresight of the BAT instrument.

The "integ_time" is the duration of the sampling interval
of the successful trigger criteria.  The value is the number of 4msec ticks,
eg a value of 16 indicates a 64-msec trigger criterion.

The "lon_lat" is the Longitude and Lattitude of the s/c at the time of the BAT trigger.
This 4-byte quantity is composed of two 2-byte integers.  The high-order short
is the latitude multiplied by 100 and integerized; the low-order short
is the longitude multiplied by 100 and integerized; ie both values are in centi-degrees.
They will always be 0.00,0.00 for this Test notice.

The "trig_index" is the index value (row_number in the BAT on-board flight s/w table)
of the trigger criteria that was the highest-significance successful trigger.

The "soln_status" field contains flag bits on the type of solution that was
found in the FFT sky image and about whether it matches anything in the
on-board source catalog.
The bit packing of the "soln_status" entry in the packet is:
Bit_Number     Item_name      Description
----------     ---------      -----------
0              point_src      0=No or 1=Yes, a point source was found
1              grb            0=No or 1=Yes, it is a GRB
2              interesting    0=No or 1=Yes, it is an interesting src (else boring)
3              catalog_src    0=No or 1=Yes, it is in the catalog (else unknown src)
4              image_trig     0=No or 1=Yes, it is an image trigger (else rate trig)
13             near_brt_star  0=No or 1=Yes, there is a nearby bright star
For these Test Notices, the soln_status will always be 3 plus the bright_star flag.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10 Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  Not assigned.
2^13  When this bit is a 1, it indicates that this position is near a bright star (mag less than 6.5).
2^14  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the position error radius
      is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
      is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-24  Not assigned.
2^25  This is an updated position.  This is a position notice that changes/improves
      the position specified in the original BAT_Position Notice.
2^26-28 Not assigned.
2^29  When this bit is a 1, then this Notice was reconstituted; else flight-generated.
      If a BAT_LC is received from the s/c before a BAT_Pos is received,
      then bits and pieces from other Notices will be used to generate a reconstituted
      BAT_Pos Notice and it will be issued (with this flag bit set to 1).
      Always 0 for Test Notices.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      A Gnd-generated Notice is issued anytime humans during ground operations
      have determined if the Notice should be issued.  This will typically be used
      during the early phases of the mission before the automatic TDRSS capability is enabled.
      Once the burst position has been validated by humans, a BAT_Pos Notice will be issued
      (with this flag bit set to 1).
      Always 1 for Test Notices.
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "image_signif" is the significance level of the peak in the FFT image plane.
This is the signal/noise (ie number of sigma) of the grb peak detection.
It has NOT been pre-scaled -- the units are sigma.

The "rate_signif" is the significance level of the initial 'rate trigger'.
This is the signal/noise (ie number of sigma) of the rate-trigger detection
multiplied by 100 and then integerized (ie units are centi-sigma).

The "bkg_flue" is the total number of events in the time interval used
for the background subtraction of the detector_rate_map (used for the image calc).
The units are counts.

The "bkg_start" is the starting time of the background interval.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).  Note that not all trigger criteria have a background interval
specified, so this "bkg_start" value may be zero for some bursts.

The "bkg_dur" is the duration of the background interval.
The units are in centi-seconds.

The "merit_0-3", "merit_4-7", and "merit_8-9" are the 10 merit parameters
for this burst.  Their values range from -127 to +127.  These 'merit params'
are different than the 'merit_value' that is in the SWIFT_FOM_OBS and SWIFT_SC_SLEW
messages.  There are 4, 4, & 2 values packed into these 3 longs.  The packing order
is "0" in the lowest_address byte in the long, "1" is in the next_lowest, etc.

There are a total of 12 "spare" items in the packet (usually filled
with zeros).  They are located at items 15 and 25-35.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



PACKET ITEM DESCRIPTIONS for type=83:

The SWIFT_POINTDIR packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=83)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       slew_tjd     [days]          Truncated Julian Day
long         6       slew_sod     [centi-sec]     (int)(sssss.sss *100)
long         7       point_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       point_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       point_roll   [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         10      spare        integer         4 bytes for the future
long         11      bat_mode     integer         BAT inst-mode for AT response
long         12      xrt_mode     integer         XRT inst-mode for AT response
long         13      uvot_mode    integer         UVOT inst-mode for AT response
long         14      obs_time     [centi-sec]     (int)(sssss.sss *100)
long         15      merit        [centi-merit]   Merit_value *100
long         16-18   spare[3]     integer         12 bytes for the future
long         19      misc         bits            Misc stuff packed in here
long         20-21   spare[2]     integer         8 bytes for the future
quad_char    22-38   tgtname      -               The name of the target
long         39      pkt_term     integer         Pkt Termination (always = \n)



PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The SWIFT_POINTDIR type is 83.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 

The "slew_tjd" is the TJD when the next s/c slew starts
eg. TJD=13370 is 01 Jan 2005.

The "slew_sod" is the seconds-of-day (SOD) when the next s/c slew starts.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "point_ra", "point_dec" and "point_roll" are the RA,Dec and Roll (J2000) coordinates
to which the spacecraft will point after this slew.  This is the pointing
direction of the s/c.  The target_destiation accuracy of the s/c is 3arcmin worst case.
So for any given slew, the s/c will be actually looking at an RA,Dec location
which is within 0-3 arcmin of the location given in this packet.
The units are 10^04 deg, ie the values where multiplied by 10000 and integerized.

The "bat_mode", "xrt_mode", and "uvot_mode" are the 3 sets of flagbits
the determine how each instrument responds for data-taking for each AT burst response.
Each mode is in the bottom 16 bits fo each 4-byte field.

The "obs_time" is the amount of time the sc will observe that new location.
Since the "slew_sod" is the start of the slew to the new location,
in practice the sc will actually be on target 50-100 sec less than the amount
of time specified in this field.  The units are in centi-seconds
(ie the fl.pt. seconds were multiplied by 100 and then integerized).

The "merit_value" is the total calculated value for the given burst.
It is a fl.pt. quantity which can theoretically range from -infinity to
+infinity, but given normal operations, we expect it to range from about
-100 to +300.  And for the first 6-12 months of flight-ops, it will be
forced to be a constant value of 100 for all bursts.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-12  Not assigned.
2^13    When this bit is 1, there is a nearby bright star (mag less than 6.5).
2^14-29 Not assigned.
2^30    When this bit is a 1, then this Notice was ground-generated; else flight-generated.
        This will always be 1 since the POINTDIR information is extracted from ground processing
        of ground files.
2^31    Not assigned.

The "tgtname" is the name of the object that the sc will be observing next.
It is a name chosen by the science planners at the MOC.  The name does not
always fit the IAU standard naming convention (due to limitations in the 
planning s/w).  This item in the packet spans 17 longwords (ie 68 bytes) and
contains the ASCII string of the target_name.  This string can be up to
67 characters long, and will always be null-terminated.

There are a total of 7 "spare" items in the packet (usually filled
with zeros).  They are located at items 10 and 16-21.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.





TYPE=84 PACKET CONTENTS:

The SWIFT_BAT_TRANS packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=84)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       trans_tjd    [days]          Truncated Julian Day
long         6       trans_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       trans_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       trans_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       trans_flue   [counts]        Num events during trig window, 0 to inf
long         10      trans_ipeak  [cnts*ff]       Counts in image-plane peak, 0 to infinity
long         11      trans_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12      phi          [centi-deg]     (int)(0.0 to 359.9999 *100)
long         13      theta        [centi-deg]     (int)(0.0 to +70.0 *100)
long         14      integ_time   [4mSec]         Duration of the trigger interval, 1 to inf
long         15      spare        integer         4 bytes for the future
long         16      lon_lat      2_shorts        (int)(Longitude,Lattitude *100)
long         17      trig_index   integer         Rate_Trigger index
long         18      soln_status  bits            Type of source found
long         19      misc         bits            Misc stuff packed in here
long         20      image_signif [centi-sigma]   (int)(sig2noise *100)
long         21      rate_signif  [centi-sigma]   (int)(sig2noise *100)
long         22      bkg_flue     [counts]        Num events during the bkg interval, 0 to inf
long         23      bkg_start    [centi-sec]     (int)(sssss.sss *100)
long         24      bkg_dur      [centi-sec]     (int)(0-80,000 *100)
long         25-35   spare[11]    integer         44 bytes for the future
long         36      merit_0-3    integers        Merit params 0,1,2,3 (-127 to +127)
long         37      merit_4-7    integers        Merit params 4,5,6,7 (-127 to +127)
long         38      merit_8-9    integers        Merit params 8,9     (-127 to +127)
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The SWIFT_BAT_TRANS type is 84. 

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger (this new burst).
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "trans_tjd" is the Truncated Julian Day of the Swift-BAT transient trigger,
eg. TJD=13370 is 01 Jan 2005.

The "trans_sod" is the UT seconds-of-day (SOD) of the Swift-BAT transient trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "trans_ra" and "trans_dec" are the RA,Dec coordinates of the transient (J2000 epoch)
as determined by the BAT flight software.  These intrinsically floating point quantities
have been multiplied by 10,000 and then integerized to make an integer quantity
with units of 0.0001-degrees.

The "trans_flue" is the number of events (trans+background events)
during the 'integ_time' time interval of the successful trigger criterion.

The "trans_ipeak" is the height of the peak in the sky-image plane (ie the result
of the FFT,MaskConvolution,InvFFT calculation).  The units are counts
after a multiplicative factor of about 0.5-0.7.

The "trans_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).  [Initially, this value will be hardwired 
at a constant value of 4arcmin (0.067deg) radius.  As the mission progresses,
this will be converted to a value which is dependent on the initial flux
of the burst.]

The "phi" and "theta" are the BAT instrument coordinates of the transient
as determined by the BAT flight software program.  Phi is measured phi=0
along the +Y-axis of the s/c and increasing towards the -Z axis,
and theta is measured from the boresight of the BAT instrument.

The "integ_time" is the duration of the sampling interval
of the successful trigger criteria.  The value is the number of 4msec ticks,
eg a value of 16 indicates a 64-msec trigger criterion.

The "lon_lat" is the Longitude and Lattitude of the s/c at the time of the BAT trigger.
This 4-byte quantity is composed of two 2-byte integers.  The high-order short
is the latitude multiplied by 100 and integerized; the low-order short
is the longitude multiplied by 100 and integerized; ie both values are in centi-degrees.

The "trig_index" is the index value (row_number in the BAT on-board flight s/w table)
of the trigger criteria that was the highest-significance successful trigger.

The "soln_status" (aka trigger_id) field contains (a) flag bits on the type of solution
that was found in the on-board image and about whether it matches anything in the
on-board source catalog, and (b) flag bits that are assigned in the GCN ground-processing.
The bit packing of the "soln_status" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        F     point_src      0=No or 1=Yes, a point source was found
1        F     grb            0=No or 1=Yes, it is a GRB
2        F     interesting    0=No or 1=Yes, it is an interesting src (ie a flaring known src)
3        F     flt_cat_src    0=No or 1=Yes, it is in the flight catalog (else unknown src)
4        F     image_trig     0=No or 1=Yes, it is an image trigger (else rate trig)
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (hi bkg level, ie near SAA)
7        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (low image significance; less then 7.0 sigma)
8        G     gnd_cat_src    0=No or 1=Yes, it is in the ground catalog
9        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (negative bkg slope, exit SAA)
10       G     st_loss_lock   0=No or 1=Yes, StarTracker not locked so trigger probably bogus
11       G     uncert_grb     0=No or 1=Yes, it is really probably not a GRBorTransient (VERY low image significance; less than 6.5 sigma)
12       G     blk_cat_src    0=No or 1=Yes, it is in the catalog of sources to be blocked (internal use only)
13       G     near_brt_star  0=No or 1=Yes, there is a nearby bright star
14-27    -     spare          spare for future use
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30       G     test_submit    0=No or 1=Yes, this is a test submission (internal use only)
31       -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10 Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  Not assigned.
2^13  When this bit is a 1, it indicates that this position is near a bright star (mag less than 6.5).
2^14  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the position error radius
      is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
      is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-20  Not assigned.
2^21  When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
      during a time when the StarTracker had a Loss-of-Lock.
2^22-24  Not assigned.
2^25  This is an updated position.  This is a position notice that changes/improves
      the position specified in the original BAT_TRANS_Position Notice.
2^26-27 Not assigned.
2^28  When this bit is a 1, then this Notice was derived from a SERS message; else flight-generated.
      If none of the regular position-containing messages are received via the real-time
      TDRSS comm channel (eg BAT_Pos_Ack, BAT_LC, etc), then the SERS messages
      (which come from pipe-line processing of the Malindi playback downlinked data)
      will be used to generate a reconstituted BAT_Pos_Ack Notice.  But since
      the SERS message only contains a subset of the information is a regular TDRSS
      messages, these SERS-reconstituted Notices will have (tbd) fields undefined.
      These undefined fields are: tbd, tbd, tbd....
2^29  When this bit is a 1, then this Notice was reconstituted; else flight-generated.
      If a BAT_LC is received from the s/c before a BAT_Pos is received,
      then bits and pieces from other Notices will be used to generate a reconstituted
      BAT_Pos Notice and it will be issued (with this flag bit set to 1).
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      A Gnd-generated Notice is issued anytime humans during ground operations
      have determined if the Notice should be issued.  This will typically be used
      during the early phases of the mission before the automatic TDRSS capability is enabled.
      Once the burst position has been validated by humans, a BAT_Trans Notice will be issued
      (with this flag bit set to 1).
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "image_signif" is the significance level of the peak in the FFT image plane.
This is the signal/noise (ie number of sigma) of the grb peak detection
multiplied by 100 and then integerized (ie units are centi-sigma).

The "rate_signif" is the significance level of the initial 'rate trigger'.
This is the signal/noise (ie number of sigma) of the rate-trigger detection
multiplied by 100 and then integerized (ie units are centi-sigma).

The "bkg_flue" is the total number of events in the time interval used
for the background subtraction of the detector_rate_map (used for the image calc).
The units are counts.

The "bkg_start" is the starting time of the background interval.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).  Note that not all trigger criteria have a background interval
specified, so this "bkg_start" value may be zero for some bursts.

The "bkg_dur" is the duration of the background interval.
The units are in centi-seconds.

The "merit_0-3", "merit_4-7", and "merit_8-9" are the 10 merit parameters
for this burst.  Their values range from -127 to +127.  These 'merit params'
are different than the 'merit_value' that is in the SWIFT_FOM_OBS and SWIFT_SC_SLEW
messages.  There are 4, 4, & 2 values packed into these 3 longs.  The packing order
is "0" in the lowest_address byte in the long, "1" is in the next_lowest, etc.

There are a total of 12 "spare" items in the packet (usually filled
with zeros).  They are located at items 15 and 25-35.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.





TYPE=85 PACKET CONTENTS:   NOT AVAILABLE TO THE PUBLIC

The SWIFT_XRT_THRESHPIX packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=85)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       point_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       point_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       expo_time    [0.001-sec]     (int)(time*1000.0)
long         10      stop_date    [days]          Truncated Julian Day
long         11      stop_time    [centi-sec]     (int)(sssss.sss *100)
long         12      seq_num      integer         Serial number of message (1-3)
long         13-18   spare[6]     integer         24 bytes for the future
long         19      misc         bits            Misc stuff packed in here
long         20-38   spare[19]    integer         76 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)



PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...88
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The SWIFT_XRT_THRESHIX type is 85. 

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger (this new burst).
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "burst_tjd" is the Truncated Julian Day of the Swift-BAT transient trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the Swift-BAT transient trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "point_ra" and "point_dec" are the RA,Dec coordinates (J2000)
of the pointing direction of the s/c at the start?/stop???
of the integration interval for the image.  These intrinsically floating point
quantities have been multiplied by 10,000 and then integerized to make
an integer quantity with units of 0.0001-degrees.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12-19  Not assigned.
2^20  When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real XRT_TP.
2^21  Not assigned.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  Not assigned.
2^25  Not assigned.
2^26  Not assigned.
2^27  Not assigned.
2^28  Not assigned.
2^29  This bit is set if this XRT_ThreshPix Noticed was forced-out via the watchdog timeout.
2^30  Not assigned.
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

There are a total of 29 "spare" items in the packet (usually filled
with zeros).  They are located at items 9-18 and 20-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.




TYPE=86 PACKET CONTENTS:   NOT AVAILABLE TO THE PUBLIC

The SWIFT_XRT_THRESHPIX_PROC packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=86)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       point_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       point_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       expo_time    [0.001-sec]     (int)(time*1000.0)
long         10      stop_date    [days]          Truncated Julian Day
long         11      stop_time    [centi-sec]     (int)(sssss.sss *100)
long         12      seq_num      integer         Serial number of message (1-3)
long         13-18   spare[6]     integer         24 bytes for the future
long         19      misc         bits            Misc stuff packed in here
long         20-38   spare[19]    integer         76 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)



PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...88
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The SWIFT_XRT_THRESHIX_PROC type is 86. 

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger (this new burst).
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "burst_tjd" is the Truncated Julian Day of the Swift-BAT transient trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the Swift-BAT transient trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "point_ra" and "point_dec" are the RA,Dec coordinates (J2000)
of the pointing direction of the s/c at the start?/stop???
of the integration interval for the image.  These intrinsically floating point
quantities have been multiplied by 10,000 and then integerized to make
an integer quantity with units of 0.0001-degrees.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12-19 Not assigned.
2^20  When this bit is a 1, it indicates that this was originally a SubThresh, but it is now converted to a real XRT_PROC_TP.
2^21  Not assigned.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  Not assigned.
2^25  Not assigned.
2^26  Not assigned.
2^27  Not assigned.
2^28  Not assigned.
2^29  This bit is set if this original 'raw' ThreshPix Noticed was forced-out via the watchdog timeout.
2^30  Not assigned.
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

There are a total of 29 "spare" items in the packet (usually filled
with zeros).  They are located at items 9-18 and 20-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.





TYPE=87 PACKET CONTENTS:   NOT AVAILABLE TO THE PUBLIC

The SWIFT_XRT_SPER packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=87)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       point_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       point_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       expo_time    [0.001-sec]     (int)(time*1000.0)
long         10      stop_date    [days]          Truncated Julian Day
long         11      stop_time    [centi-sec]     (int)(sssss.sss *100)
long         12      num_pkt      integer         Number of pkts in integration
long         13-18   spare[6]     integer         24 bytes for the future
long         19      misc         bits            Misc stuff packed in here
long         20-38   spare[19]    integer         76 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)



PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...88
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The SWIFT_XRT_SPER type is 87. 

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger (this new burst).
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "burst_tjd" is the Truncated Julian Day of the Swift-BAT transient trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the Swift-BAT transient trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "point_ra" and "point_dec" are the RA,Dec coordinates (J2000)
of the pointing direction of the s/c at the start?/stop???
of the integration interval for the image.  These intrinsically floating point
quantities have been multiplied by 10,000 and then integerized to make
an integer quantity with units of 0.0001-degrees.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12-21  Not assigned.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  Not assigned.
2^25  Not assigned.
2^26  Not assigned.
2^27  Not assigned.
2^28  Not assigned.
2^29  This bit is set if this XRT_SPER Noticed was forced-out via the watchdog timeout.
2^30  Not assigned.
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

There are a total of 29 "spare" items in the packet (usually filled
with zeros).  They are located at items 9-18 and 20-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.






TYPE=88 PACKET CONTENTS:   NOT AVAILABLE TO THE PUBLIC

The SWIFT_XRT_SPER_PROC packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=88)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       point_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       point_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       expo_time    [0.001-sec]     (int)(time*1000.0)
long         10      stop_date    [days]          Truncated Julian Day
long         11      stop_time    [centi-sec]     (int)(sssss.sss *100)
long         12      seq_num      integer         Serial number of message (1-3)
long         13-18   spare[6]     integer         24 bytes for the future
long         19      misc         bits            Misc stuff packed in here
long         20-38   spare[19]    integer         76 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)



PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...88
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The SWIFT_XRT_SPER_PROC type is 88. 

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger (this new burst).
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "burst_tjd" is the Truncated Julian Day of the Swift-BAT transient trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the Swift-BAT transient trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "point_ra" and "point_dec" are the RA,Dec coordinates (J2000)
of the pointing direction of the s/c at the start?/stop???
of the integration interval for the image.  These intrinsically floating point
quantities have been multiplied by 10,000 and then integerized to make
an integer quantity with units of 0.0001-degrees.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-21  Not assigned.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  Not assigned.
2^25  Not assigned.
2^26  Not assigned.
2^27  Not assigned.
2^28  Not assigned.
2^29  This bit is set if this original 'raw' SPER Noticed was forced-out via the watchdog timeout.
2^30  Not assigned.
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

There are a total of 29 "spare" items in the packet (usually filled
with zeros).  They are located at items 9-18 and 20-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.




TYPE=89 PACKET CONTENTS:

The SWIFT_UVOT_POS_NACK packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=89)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       trig_tjd     [days]          Truncated Julian Day
long         6       trig_sod     [centi-sec]     (int)(sssss.sss *100)
long         7       src_ra       [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       src_dec      [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       mag_lim      [arb]           (int)(uvot_mag_lim *100)
long         10      filter       integer         Filter_value: x-yy
long         11      src_error    [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12      source       integer         1-3
long         13-17   spare[5]     integer         20 bytes for the future
long         18      soln_status  bits            Type of source found
long         19      misc         bits            Misc stuff packed in here
long         20      lim_sigma    [arb]           (int)(mag_lim_sigma *100)
long         21-38   spare[18]    integer         72 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...84
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger.
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "trig_tjd" is the Truncated Julian Day of the Swift-UVOT data,
eg. TJD=13370 is 01 Jan 2005.

The "trig_sod" is the UT seconds-of-day (SOD) of the Swift-UVOT data.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "src_ra" and "src_dec" are the RA,Dec coordinates (J2000) of the center
of the error circle that was searched to determine this limiting magnitude from "source".
These intrinsically floating point quantities have been multiplied by 10,000 and
then integerized to make an integer quantity with units of 0.0001-degrees.

The "mag_lim" is the lower limit magnitude (in the specified filter)
of the burst observation (ie the afterglow has to be fainter than the 'mag_lim' value).
The units are in centi-mag (ie the fl.pt. magnitude is multiplied by 100
and then integerized).

The "filter" is the filter used for the image.  The values are:
0  Blocked
1  UV_Grism
2  UVW2
3  V
4  UVM2
5  Vis_Grism
6  UVW1
7  U
8  Magnifier
9  B
10 White
11 unknown

The "src_error" is the radius of the location error circle that was searched in UVOT
to yield the quoted limiting magnitude.

The "source" field indicates the source of of the RA,Dec-location error circle
that was searched to yield the limiting magnitude for the UVOT non-detection.
The values are:
0  undefined
1  BAT
2  XRT
3  Other

The "soln_status" field contains flag bits on the type of solution that was found.
The bit packing of the "soln_status" entry in the packet is:
Bit_Number     Item_name      Description
----------     ---------      -----------
0              point_src      0=No or 1=Yes, a point source was found, 0=extended src
1              grb            0=No or 1=Yes, it is a GRB
2              undef          Not yet defined.
3              catalog_src    0=No or 1=Yes, it is in the catalog (else unknown src)
4              undef          Not yet defined.
5              def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-29           undef          Not yet defined.
30             test_submit    0=No or 1=Yes, this is a test submission (internal use only)
31             undef          Not yet defined.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-11  Not assigned.
2^12  When this bit is 1, it is in the catalog of sources to be blocked (internal use only).
2^13  When this bit is 1, there is a nearby bright star.
2^14-21  Not assigned.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  Not assigned.
2^24  Not assigned.
2^25  Not assigned.
2^26  Not assigned.
2^27  Not assigned.
2^28  Not assigned.
2^29  Not assigned.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "lim_sigma" is the number of simga that the mag_limit is quoted for.
The units are in centi-sigma (ie the fl.pt. mag_error is multiplied by 100
and then integerized).

There are a total of 28 "spare" items in the packet (usually filled
with zeros).  They are located at items 7-8, 11-18, and 21-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.




TYPE=98 PACKET CONTENTS:

The SWIFT_BAT_SUBTHRESHOLD packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=98)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_obs_num integers        Trigger num & Observation num
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_flue   [counts]        Num events during trig window, 0 to inf
long         10      burst_ipeak  [cnts*ff]       Counts in image-plane peak, 0 to infinity
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12      phi          [centi-deg]     (int)(0.0 to 359.9999 *100)
long         13      theta        [centi-deg]     (int)(0.0 to +70.0 *100)
long         14      integ_time   [4mSec]         Duration of the trigger interval, 1 to inf
long         15      spare        integer         4 bytes for the future
long         16      lon_lat      2_shorts        (int)(Longitude,Lattitude *100)
long         17      trig_index   integer         Rate_Trigger index
long         18      soln_status  bits            Type of source/trigger found
long         19      misc         bits            Misc stuff packed in here
long         20      image_signif [centi-sigma]   (int)(sig2noise *100)
long         21      rate_signif  [centi-sigma]   (int)(sig2noise *100)
long         22      bkg_flue     [counts]        Num events during the bkg interval, 0 to inf
long         23      bkg_start    [centi-sec]     (int)(sssss.sss *100)
long         24      bkg_dur      [centi-sec]     (int)(0-80,000 *100)
long         25      cat_num      integer         On-board cat match ID number
long         26-35   spare[10]    integer         40 bytes for the future
long         36      merit_0-3    integers        Merit params 0,1,2,3 (-127 to +127)
long         37      merit_4-7    integers        Merit params 4,5,6,7 (-127 to +127)
long         38      merit_8-9    integers        Merit params 8,9     (-127 to +127)
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...98
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  Please note that this type
is identical in format and content as type=61 (BAT_POS).  The only difference
is that these notices are due to the (so called) Sub-Threshold events.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_obs_num" is a pair of uniquely identifying serial numbers (Trigger_num and Observation_num)
assigned by the on-board BAT flight software to each trigger.
The lower 24 bits contain the Trigger_number, and the upper 8 bits
contain the Observation_number. 
The Observation_number is always 0 since these are always (by definition)
the first observation of this new trigger (this new burst).
The Trigger_number started with s/n=100,000 just after launch (Nov 04).

The "burst_tjd" is the Truncated Julian Day of the Swift-BAT burst trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the Swift-BAT burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).  The trigger time can be off by +/- 320 msec
for events that have a trigger duration less than 64 msec.  This has to do with the way
that the flight software is optimized for execution speed for evaluating trigger criteria.

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the BAT flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "burst_flue" is the number of events (burst+background events)
during the 'integ_time' time interval of the successful trigger criterion.

The "burst_ipeak" is the height of the peak in the sky-image plane (ie the result
of the FFT,MaskConvolution,InvFFT calculation).  The units are counts
after a multiplicative factor of about 0.5-0.7.

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).  [Initially, this value was hardwired 
at a constant value of 4arcmin (0.067deg) radius.  As the mission progressed,
this changed to 3 arcmin.  Eventually, it might become intensity-dependant.]

The "phi" and "theta" are the BAT instrument coordinates of the trigger (burst)
as determined by the BAT flight software program.  Phi is measured phi=0
along the +Y-axis of the s/c and increasing towards the -Z axis,
and theta is measured from the boresight of the BAT instrument.

The "integ_time" is the duration of the sampling interval
of the successful trigger criteria.  The value is the number of 4msec ticks,
eg a value of 16 indicates a 64-msec trigger criterion.

The "lon_lat" is the Longitude and Lattitude of the s/c at the time of the BAT trigger.
This 4-byte quantity is composed of two 2-byte integers.  The high-order short
is the latitude multiplied by 100 and integerized; the low-order short
is the longitude multiplied by 100 and integerized; ie both values are in centi-degrees.

The "trig_index" is the index value (row_number in the BAT on-board flight s/w table)
of the trigger criteria that was the highest-significance successful trigger.

The "soln_status" (aka trigger_id) field contains (a) flag bits on the type of solution
that was found in the on-board image and about whether it matches anything in the
on-board source catalog, and (b) flag bits that are assigned in the GCN ground-processing.
The bit packing of the "soln_status" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        F     point_src      0=No or 1=Yes, a point source was found
1        F     grb            0=No or 1=Yes, it is a GRB
2        F     interesting    0=No or 1=Yes, it is an interesting src (ie a flaring known src)
3        F     flt_cat_src    0=No or 1=Yes, it is in the flight catalog (else unknown src)
4        F     image_trig     0=No or 1=Yes, it is an image trigger (else rate trig)
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (hi bkg level, ie near SAA)
7        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (low image significance; less then 7.0 sigma)
8        G     gnd_cat_src    0=No or 1=Yes, it is in the ground catalog
9        G     uncert_grb     0=No or 1=Yes, it is probably not a GRBorTransient (negative bkg slope, exit SAA)
10       G     st_loss_lock   0=No or 1=Yes, StarTracker not locked so trigger probably bogus
11       G     uncert_grb     0=No or 1=Yes, it is really probably not a GRBorTransient (VERY low image significance; less than 6.5 sigma)
12       G     blk_cat_src    0=No or 1=Yes, it is in the catalog of sources to be blocked (internal use only)
13       G     near_brt_star  0=No or 1=Yes, there is a nearby bright star (this is a duplicate of the "misc" 2^13).
14-27    -     spare          spare for future use
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30       G     test_submit    0=No or 1=Yes, this is a test submission (internal use only)
31       -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0-10  Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  Not assigned.
2^13  When this bit is a 1, it indicates that this position is near a bright star (mag less than 6.5).
2^14  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the position error radius
      is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
      is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-20  Not assigned.
2^21  When this bit is a 1, it indicates that this is an Image-trigger AND that it occurred
      during a time when the StarTracker had a Loss-of-Lock.
2^22  When this bit is a 1, it indicates that this Notice was generated as a result
      of an uploaded TOO sequence.  (Swift is commanded to look at this RA,Dec location
      and this Notice was generated as a direct result of that observation.)
2^23  When this bit is a 1, it means the Trig_Time was zero and so the s/c system clock
      in the TDRSS Message SecondaryHeader was used to fill the Burst_TJD and Burst_SOD fields.
      (This 0-Trig_Time scenario occurs during a ground-commanded GRB_TOO.)
2^24  When this bit is a 1, it indicates that the TDRSS Message was received on the ground
      more than 60 sec after the BAT Trigger time.  The most likely scenario for this kind of transmission delay
      is that the BAT Trigger occured during a Malindi downlink pass (when TDRSS messages are blocked
      from immediate transmission; they are buffered onboard until the end of the Malindi Pass).
2^25  This is an updated position.  This is a position notice that changes/improves
      the position specified in the original BAT_Position Notice.
2^26  Not assigned.
2^27  Not assigned.
2^28  When this bit is a 1, then this Notice was derived from a SERS message; else flight-generated.
      If none of the regular position-containing messages are received via the real-time
      TDRSS comm channel (eg BAT_Pos_Ack, BAT_LC, etc), then the SERS messages
      (which come from pipe-line processing of the Malindi playback downlinked data)
      will be used to generate a reconstituted BAT_Pos_Ack Notice.  But since
      the SERS message only contains a subset of the information is a regular TDRSS
      messages, these SERS-reconstituted Notices will have (tbd) fields undefined.
      These undefined fields are: tbd, tbd, tbd....
2^29  When this bit is a 1, then this Notice was reconstituted; else flight-generated.
      If a BAT_LC is received from the s/c before a BAT_Pos is received,
      then bits and pieces from other Notices will be used to generate a reconstituted
      BAT_Pos Notice and it will be issued (with this flag bit set to 1).
      But since the LC message only contains a subset of the information in a regular
      TDRSS BAT_POS messages, these LC-reconstituted Notices will have (tbd) fields undefined.
      These undefined fields are: tbd, tbd, tbd....
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      A Gnd-generated Notice is issued anytime humans during ground operations
      have determined if this Notice should be issued.  This will typically be used
      during the early phases of the mission before the automatic real-time distribution
      capability is enabled.  Once the burst position has been validated by humans,
      a BAT_Pos Notice will be issued (with this flag bit set to 1).
      After the Verification phase, there may be rare occaisions when a BAT_POS notice
      is (re)created by human-processing and will be distributed (with this bit set to 1). 
2^31  If there is a CRC error in one or more of the packets that went into
      the making of this Notice, then this bit is set to 1, else 0.

The "image_signif" is the significance level of the peak in the FFT image plane.
This is the signal/noise (ie number of sigma) of the grb peak detection
multiplied by 100 and then integerized (ie units are centi-sigma).
By definition of this Notice type, the 'image_signif' value will never be 
greater than 6.50 sigma.

The "rate_signif" is the significance level of the initial 'rate trigger'.
This is the signal/noise (ie number of sigma) of the rate-trigger detection
multiplied by 100 and then integerized (ie units are centi-sigma).

The "bkg_flue" is the total number of events in the time interval used
for the background subtraction of the detector_rate_map (used for the image calc).
The units are counts.

The "bkg_start" is the starting time of the background interval.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).  Note that not all trigger criteria have a background interval
specified, so this "bkg_start" value may be zero for some bursts.

The "bkg_dur" is the duration of the background interval.
The units are in centi-seconds.

The "cat_num" is the catalog number in the on-board catalog for sources
that match a known source in the on-board catalog.  (Typically it is a number
in the low 30,000's.)

The "merit_0-3", "merit_4-7", and "merit_8-9" are the 10 merit parameters
for this burst.  Their values range from -127 to +127.  These 'merit params'
are different than the 'merit_value' that is in the SWIFT_FOM_OBS and SWIFT_SC_SLEW
messages.  There are 4, 4, & 2 values packed into these 3 longs.  The packing order
is "0" in the lowest_address byte in the long, "1" is in the next_lowest, etc.
The definition of the 10 parameters is:
Param   Description
0       Flag bit indicating GRB or not (1 or 0, resp).
1       Flag bit indicating Transient or not (1 or 0, resp); unknown src with T_trig>64sec.
2       Flag bit indicating Known_src or not (1 or 0, resp); Known_src matches something in on-board catalog.
3       Trigger duration (log2(t_trig/1024msec)).
4       Trigger energy range (0=15-25,1=15-50,2=25-100,3=50-350).
5       Image significance
6       Is it observable (-1 if w/in 30deg of Moon; -5, 20deg Moon; -100, 45deg Sun).
7       Flag bit indicating in a confused of obscur region (ie Gal Center or Plane).
8       Sun distance (-100*cos(sun_angular_dist)).
9       An offset param to bias for/against PPTs and TOOs wrt ATs (norm param).

There are a total of 13 "spare" items in the packet (usually filled
with zeros).  They are located at items 15-16 and 25-35.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.




TYPE=99 PACKET CONTENTS:

The SWIFT_BAT_SLEW_GRB_POSITION packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=99)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       id_num       integer         ID number
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_flue   [counts]        Num events during image window, 0 to inf
long         10      burst_ipeak  [cnts/sec]      Counts in image-plane peak, 0 to infinity
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12      spare        integer         4 bytes for the future
long         13      spare        integer         4 bytes for the future
long         14      integ_time   [4mSec]         Duration of the trigger interval, 1 to inf
long         15      spare        integer         4 bytes for the future
long         16      spare        integer         4 bytes for the future
long         17      trig_index   integer         Trigger criterion index
long         18      soln_status  bits            Type of source/trigger found
long         19      misc         bits            Misc stuff packed in here
long         20      image_signif [centi-sigma]   (int)(sig2noise *100)
long         21-38   spare[18]    integer         72 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 60, 61, 62, 63, ...98, 99
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  Please note that this type
is very similar but not identical in format and content as type=61 (BAT_POS).
These notices contain positions of bursts (and transients) detected by BAT
during intervals when Swift is slewing.  A separate notice type was created 
because there will be some delay (0.5 - 6 hrs: tlm downlink delays and 
ground-processing time) compared to the 10-20sec delay for the type=61 notices.
And there may well be a slightly larger position uncertainty compared
to type=61.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start from 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "id_num" is a uniquely identifying serial number assigned by Harvard.
It started at 1 with GRB 070326.

The "burst_tjd" is the Truncated Julian Day of the Swift-BAT burst trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the ground burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the BATSS ground-procesing software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "burst_flue" is the number of events (burst+background events)
during the 'integ_time' time interval of the successful trigger criterion.
The units are counts.

The "burst_ipeak" is the height of the peak in the sky-image plane.
The units are counts/sec.
Always 0 for now.

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).

The "integ_time" is the duration of the sampling interval
of the successful trigger criteria.  The value is the number of 4msec ticks,
eg a value of 16000 indicates a 64-sec trigger integration.

The "trig_index" is the value of the trigger criteria that had the highest evaluation.
The definitions of the various trigger criteria are listed in the table below:
INDEX  CRITERIA                                                              COMMENT
1-4    Undefined                                                             Undefined
5      S(15-50) > 6.5 sigma OR H(50-150) > 6.5 sigma                         High confidence of reality (silver-plated).
6      Non-simultaneous detections > 4.0 sigma over more than an orbit       Transient (ie too long for a GRB)
7      Non-simultaneous detections > 4.0 sigma within an orbit               Transient (ie too long for a GRB)
8      Simul (S(15-50) OR H(50-150)) > 6.0 sigma AND B(15-150) > 4.0 sigma   High confidence of reality (silver-plated).
9      Simul (S(15-50) OR H(50-150)) > 4.0 sigma AND B(15-150) > 6.0 sigma   High confidence of reality (silver-plated).
10     Simul S(15-50) > 4.0 sigma AND H(50-150) > 4.0 sigma                  Very high confidence of reality (gold-plated).

The "soln_status" (aka trigger_id) field contains (a) flag bits on the type of solution
that was found in the on-board image and about whether it matches anything in the
on-board source catalog, and (b) flag bits that are assigned in the GCN ground-processing.
The bit packing of the "soln_status" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        G     point_src      0=No or 1=Yes, a point source was found
1        G     grb            0=No or 1=Yes, it is definitely a GRB (or a hard x-ray transient, ie astrophysical) Index=10)
2        -     spare          not defined for this notice type
3        -     spare          not defined for this notice type
4        G     image_trig     0=No or 1=Yes, it is an image trigger (else rate trig) Always I-trigger for BATSS.
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6        -     spare          not defined for this notice type
7        -     spare          not defined for this notice type
8        G     gnd_cat_src    0=No or 1=Yes, it is in the ground catalog
9        -     spare          not defined for this notice type
10       -     spare          not defined for this notice type
11       -     spare          not defined for this notice type
12       G     blk_cat_src    0=No or 1=Yes, it is in the catalog of sources to be blocked (internal use only)
13       G     near_brt_star  0=No or 1=Yes, there is a nearby bright star (this is a duplicate of the "misc" 2^13).
14       G     prob_grb       0=No or 1=Yes, it is probably a GRB (or hard x-ray transient, ie astrophysical) (Index=8 or 9)
15-27    -     spare          spare for future use
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30       G     test_submit    0=No or 1=Yes, this is a test submission (internal use only)
31       -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned (they are ALL gnd-assigned for BAT_Slew_Pos);  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
The defined bits are:
2^0   When this bit is a 1, it indicates that photons in the 15-50 keV (Soft) band where used in the detection.
2^1   When this bit is a 1, it indicates that photons in the 50-150 keV (Hard) band where used in the detection.
2^3   When this bit is a 1, it indicates that photons in the 15-150 keV (Broad) band where used in the detection.
2^3-10 Not assigned.
2^11  When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Roll,Theta,Phi values
      were out of valid range (eg RA was 361 deg).
2^12  Not assigned.
2^13  When this bit is a 1, it indicates that this position is near a bright star (mag less than 6.5).
2^14  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the position error radius
      is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15  When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
      is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
      is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-24  Not assigned.
2^25  This is an updated position.  This is a position notice that changes/improves
      the position specified in the original BAT_Slew_Position Notice.
2^26-29  Not assigned.
2^30  When this bit is a 1, then this Notice was ground-generated; else flight-generated.
      By definition, all BATSS-generated notices are ground-generated (via the pipeline
      processing at Harvard).
2^31  Not assigned.

The "image_signif" is the significance level of the peak in the image plane.
This is the signal/noise (ie number of sigma) of the grb peak detection
multiplied by 100 and then integerized (ie units are centi-sigma).

There are a total of 20 "spare" items in the packet (usually filled
with zeros).  They are located at items 15-16 and 21-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.




================================================================================

TYPE=100 PACKET CONTENTS:
TYPE=101 PACKET CONTENTS:
TYPE=102 PACKET CONTENTS:

The SuperAGILE_GRB_WAKEUP/_GROUND/_REFINED packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=100-102)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_intenX [0.001-cnts]    Num events in each X 1-D
long         10      burst_intenY [0.001-cnts]    Num events in each Y 1-D
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12-17   spare[6]     integers        24 bytes for the future
long         18      trigger_id   bits            Type of source/trigger found
long         19      misc         bits            Misc stuff packed in here
long         20      signif       two_2byte_int   Misc stuff packed in here
long         21-38   spare[17]    integers        68 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 100, 101, 102, 107, 108, 109;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
100 = SuperAGILE_GRB_WAKEUP, 101 = SuperAGILE_GRB_GROUND, 102 = SuperAGILE_REFINED,
107 = AGILE_POINTDIR, 108 = SuperAGILE_TRANS, and 109 = SuperAGILE_GRB_POS_TEST. 

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of 0.1-secs since 01 Jan 2001.

The "burst_tjd" is the Truncated Julian Day of the AGILE burst trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the AGILE burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees (over-precision,
but this is the new standard scaling for all missions/instruments).

The "burst_intenX" is the number of events in the 15-45 keV band
in the X 1-D localization.  These intrinsically floating point quantities
have been multiplied by 1000 and then integerized to make an integer quantity
with units of 0.001-counts.

The "burst_intenY" is the number of events in the 15-45 keV band
in the Y 1-D localization.  These intrinsically floating point quantities
have been multiplied by 1000 and then integerized to make an integer quantity
with units of 0.001-counts.

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  It contains statical plus the systematic contribution.
The units are 0.0001-degrees (ie the fl.pt. error was multiplied by 10000 and
then integerized).

The "trigger_id" field contains (a) flag bits on the type of solution
that was found in the on-board (and SA-OPS) and (b) flag bits that are assigned
in the GCN ground-processing.
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        -     spare          spare for future use
1        F     grb            0=No or 1=Yes, it is a GRB
2-4      -     spare          spare for future use
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-12     -     spare          spare for future use
13       G     near_brt_star  0=No or 1=Yes, there is a nearby bright star (see MISC for correct location)
14-27    -     spare          spare for future use
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30       G     test_submit    0=No or 1=Yes, this is a test submission (internal use only)
31       -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
2^0-12  Not assigned.
2^13    When this bit is a 1, it indicates that this position is near (lss than 0.3deg)  a bright star (mag less than 6.5).
2^14    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the position error radius
        is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
        is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^30    When this bit is a 1, then this Notice was ground-generated; else flight-generated.
        A Gnd-generated Notice is issued anytime humans during ground operations
        have determined if this Notice should be issued.  This will typically be used
        during the early phases of the mission before the automatic real-time distribution
        capability is enabled.  Once the burst position has been validated by humans,
        a GRB_Pos Notice will be issued (with this flag bit set to 1).
        After the Verification phase, there still may be occaisions when a GRB_POS notice
        is (re)created by human-processing and will be distributed (with this bit set to 1). 
2^31    Not assigned.

The "signif" is composed of two 16-bit quantitites packed into a single 32-bit field.
The two quantities are the X-axis and Y-axis 1-dimentional significance detections.
The X-direction significance is packed in the bottom 16 bits, and the Y-direction
is packed in the upper 16 bits.  Prior to packing, both significances were multiplied
by 100 and integerized (i.e centi-sigma)..

There are a total of 17(tbr) "spare" items in the packet (usually filled
with zeros).  They are located at items 15-16(tbd) and 21-35.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.




TYPE=107 PACKET CONTENTS:

The AGILE_POINTDIR packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=107)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       spare        integer         4 bytes for the future
long         5       start_tjd    [days]          Truncated Julian Day
long         6       start_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       curr_ra      [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       curr_dec     [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9-11    spare[3]     integer         12 bytes for the future
long         12      stop_tjd     [days]          Truncated Julian Day
long         13      stop_sod     [centi-sec]     (int)(sssss.sss *100)
long         14-18   spare[5]     integer         20 bytes for the future
long         19      misc         bits            Misc stuff packed in here
long         20-38   spare[19]    integer         48 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


The "pkt_type" is an integer with a value of 100, 101, 102, 107, 108, 109;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
100 = SuperAGILE_GRB_WAKEUP, 101 = SuperAGILE_GRB_GROUND, 102 = SuperAGILE_REFINED,
107 = AGILE_POINTDIR, 108 = SuperAGILE_TRANS, and 109 = SuperAGILE_GRB_POS_TEST. 

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "start_tjd" is the Truncated Julian Day of the start of the AGILE pointing session.
It is NOT the "current" TJD.  The distinction being that the AGILE spacecraft
does "pointing sessions" for 2-4 weeks (mostly), and during that session
the instantaneous RA,Dec direction slowly drifts about 1 deg per day.
The Start and Stop dates/times give the beginning and end of that pointing session,
and the "Curr_RA/_Dec" give the RA,Dec pointing direction of the spacecraft
at the time of the Notice.

The "start_sod" is the UT seconds-of-day (SOD) of the start of the AGILE pointing session.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "curr_ra" and "curr_dec" are the RA,Dec coordinates of the current 
pointing direction (bore sight) of AGILE (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees (over-precision,
but this is the new standard scaling for all missions/instruments).

The "stop_tjd" is the Truncated Julian Day of the end of the AGILE pointing session.

The "stop_sod" is the UT seconds-of-day (SOD) of the end of the AGILE pointing session.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "misc" field contains miscellaneous flag bits.
2^0-29 Not assigned.
2^30   When this bit is a 1, then this Notice was ground-generated; else flight-generated.
       This notice type will ALWAYS be ground-generated.
2^31   Not assigned.

There are a total of 28 "spare" items in the packet (usually filled
with zeros).  They are located at items 4, 9-11, 14-19, and 20-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.




TYPE=108 PACKET CONTENTS:

The SuperAGILE_TRANS packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=108)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       trans_tjd    [days]          Truncated Julian Day
long         6       trans_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       trans_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       trans_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       trans_intenX [0.001-cnts]    Num events in each X 1-D
long         10      trans_intenY [0.001-cnts]    Num events in each Y 1-D
long         11      trans_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12-13   spare[2]     integers        8 bytes for the future
long         14      integ_time   [centi-sec]     Duration of the trigger interval, 1 to inf
long         15-17   spare[3]     integer         12 bytes for the future
long         18      trigger_id   bits            Type of source/trigger found
long         19      misc         bits            Misc stuff packed in here
long         20      signif       two_2byte_int   Misc stuff packed in here
long         21-38   spare[17]    integers        68 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 100, 101, 102, 107, 108, 109;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
100 = SuperAGILE_GRB_WAKEUP, 101 = SuperAGILE_GRB_GROUND, 102 = SuperAGILE_REFINED,
107 = AGILE_POINTDIR, 108 = SuperAGILE_TRANS, and 109 = SuperAGILE_GRB_POS_TEST. 

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of 0.1-secs since 01 Jan 2001.

The "trans_tjd" is the Truncated Julian Day of the AGILE burst trigger,
eg. TJD=13370 is 01 Jan 2005.

The "trans_sod" is the UT seconds-of-day (SOD) of the AGILE burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "trans_ra" and "trans_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees (over-precision,
but this is the new standard scaling for all missions/instruments).

The "trans_intenX" is the number of events in the 15-45 keV band
in the X 1-D localization.  These intrinsically floating point quantities
have been multiplied by 1000 and then integerized to make an integer quantity
with units of 0.001-counts.

The "trans_intenY" is the number of events in the 15-45 keV band
in the Y 1-D localization.  These intrinsically floating point quantities
have been multiplied by 1000 and then integerized to make an integer quantity
with units of 0.001-counts.

The "trans_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).

The "trigger_id" field contains (a) flag bits on the type of solution
that was found in the on-board (and SA-OPS) and (b) flag bits that are assigned
in the GCN ground-processing.
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0-4      -     spare          spare for future use
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-7      -     spare          spare for future use
//8        G     gnd_cat_src    0=No or 1=Yes, it is in the ground catalog
9-12     -     spare          spare for future use
13       G     near_brt_star  0=No or 1=Yes, there is a nearby bright star
14-29    -     spare          spare for future use
30       G     test_submit    0=No or 1=Yes, this is a test submission (internal use only)
31       -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
2^0-12  Not assigned.
2^13    When this bit is a 1, it indicates that this position is near (less than0.3deg)  a bright star (mag less than 6.5).
2^14    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the position error radius
        is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
        is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-29 Not assigned.
2^30    When this bit is a 1, then this Notice was ground-generated; else flight-generated.
        A Gnd-generated Notice is issued anytime humans during ground operations
        have determined if this Notice should be issued.  This will typically be used
        during the early phases of the mission before the automatic real-time distribution
        capability is enabled.  Once the burst position has been validated by humans,
        a GRB_Pos Notice will be issued (with this flag bit set to 1).
        After the Verification phase, there still may be occaisions when a GRB_POS notice
        is (re)created by human-processing and will be distributed (with this bit set to 1). 
2^31    Not assigned.

The "signif" is composed of two 16-bit quantitites packed into a single 32-bit field.
The two quantities are the X-axis and Y-axis 1-dimentional significance detections.
The X-direction significance is packed in the bottom 16 bits, and the Y-direction
is packed in the upper 16 bits.  Prior to packing, both significances were multiplied
by 100 and integerized (i.e centi-sigma)..

There are a total of 17(tbr) "spare" items in the packet (usually filled
with zeros).  They are located at items 15-16(tbd) and 21-35.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.





TYPE=109 PACKET CONTENTS:

The SuperAGILE_GRB_POS_TEST packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=109)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_intenX [0.001-cnts]    Num events in each X 1-D
long         10      burst_intenY [0.001-cnts]    Num events in each Y 1-D
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12-13   spare[2]     integers        8 bytes for the future
long         14      integ_time   [centi-sec]     Duration of the trigger interval, 1 to inf
long         15-17   spare[3]     integer         12 bytes for the future
long         18      trigger_id   bits            Type of source/trigger found
long         19      misc         bits            Misc stuff packed in here
long         20      signif       two_2byte_int   Misc stuff packed in here
long         21-38   spare[17]    integers        68 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 100, 101, 102, 107, 108, 109;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
100 = SuperAGILE_GRB_WAKEUP, 101 = SuperAGILE_GRB_GROUND, 102 = SuperAGILE_REFINED,
107 = AGILE_POINTDIR, 108 = SuperAGILE_TRANS, and 109 = SuperAGILE_GRB_POS_TEST. 

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of 0.1-secs since 01 Jan 2001.

The "burst_tjd" is the Truncated Julian Day of the AGILE burst trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the AGILE burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees (over-precision,
but this is the new standard scaling for all missions/instruments).

The "burst_intenX" is the number of events in the 15-45 keV band
in the X 1-D localization.  These intrinsically floating point quantities
have been multiplied by 1000 and then integerized to make an integer quantity
with units of 0.001-counts.

The "burst_intenY" is the number of events in the 15-45 keV band
in the Y 1-D localization.  These intrinsically floating point quantities
have been multiplied by 1000 and then integerized to make an integer quantity
with units of 0.001-counts.

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).

The "trigger_id" field contains (a) flag bits on the type of solution
that was found in the on-board (and SA-OPS) and (b) flag bits that are assigned
in the GCN ground-processing.
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0-4      -     spare          spare for future use
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-7      -     spare          spare for future use
//8        G     gnd_cat_src    0=No or 1=Yes, it is in the ground catalog
9-12     -     spare          spare for future use
13       G     near_brt_star  0=No or 1=Yes, there is a nearby bright star
14-27    -     spare          spare for future use
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30       G     test_submit    0=No or 1=Yes, this is a test submission (internal use only)
31       -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
2^0-12  Not assigned.
2^13    When this bit is a 1, it indicates that this position is near (less than 0.3deg)  a bright star (mag less than 6.5).
2^14    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the position error radius
        is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
        is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-29 Not assigned.
2^30    When this bit is a 1, then this Notice was ground-generated; else flight-generated.
        A Gnd-generated Notice is issued anytime humans during ground operations
        have determined if this Notice should be issued.  This will typically be used
        during the early phases of the mission before the automatic real-time distribution
        capability is enabled.  Once the burst position has been validated by humans,
        a GRB_Pos Notice will be issued (with this flag bit set to 1).
        After the Verification phase, there still may be occaisions when a GRB_POS notice
        is (re)created by human-processing and will be distributed (with this bit set to 1). 
2^31    Not assigned.

The "signif" is composed of two 16-bit quantitites packed into a single 32-bit field.
The two quantities are the X-axis and Y-axis 1-dimentional significance detections.
The X-direction significance is packed in the bottom 16 bits, and the Y-direction
is packed in the upper 16 bits.  Prior to packing, both significances were multiplied
by 100 and integerized (i.e centi-sigma)..

There are a total of 17(tbr) "spare" items in the packet (usually filled
with zeros).  They are located at items 15-16(tbd) and 21-35.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.







================================================================================

TYPE=110 PACKET CONTENTS:

The FERMI_GBM_ALERT packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=110)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       trig_tjd     [days]          Truncated Julian Day
long         6       trig_sod     [centi-sec]     (int)(sssss.sss *100)
long         7-8     spare[2]     integer         8 bytes for the future
long         9       algorithm    integer         Which loc calc algorithm used
long         10-13   spare[4]     integer         20 bytes for the future
long         14      trig_dur     [milli-sec]     Trigger Integration time [msec]
long         15      lo_chan      integer         ???
long         16      hi_chan      integer         ???
long         17      adc_lochan   integer         ???
long         18      adc_hichan   integer         ???
long         19      misc         bits            Misc stuff packed in here
long         20      rec_seq_num  integer         SerNum of the messages (1-~20)
long         21      trig_signif  [0.1-sigma]     Trigger significance
long         22      longitude    [arcmin]        Geo (East) Longitude of s/c
long         23      latitude     [arcmin]        Geo Latitude of s/c
long         24-25   spare[2]     integer         8 bytes of the trigger criterion
long         26      dets         bits            The 2 dets that triggered
long         27-38   spare[12]    integer         48 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 110, 111, 112, 117, 118, and 119;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
110 = FERMI_GBM_ALERT, 111 = FERMI_GBM_FLT_POSITION. 
112 = FERMI_GBM_GND_POS, 118 = FERMI_GBM_TRANS, and 119 = FERMI_GBM_POS_TEST. 

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the trig_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of seconds since 01 Jan 2001.

The "trig_tjd" is the Truncated Julian Day of the FERMI-GBM trigger,
eg. TJD=13370 is 01 Jan 2005.  (Note that at the time when this Alert Notice
is issued, it is not yet known if this trigger is due to a real GRB,
or some non-GRB cause (eg. failed or false trigger).)

The "trig_sod" is the UT seconds-of-day (SOD) of the FERMI-GBM trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).  (Since this is the Alert Notice, it is not known yet
if this trigger is a real GRB or just a false trigger.)

The "algorithm" is the index value identifying which location_calculation
algorithm was used for this event.

The "trig_dur" is the duration of the trigger criteria that initiated this event.
The units are in milli-seconds (ie the fl.pt. seconds were multiplied by 1000
and then integerized).

The "lo_chan" and "hi_chan" are ....

The "adc_lochan" and "adc_hichan" are ...

The "misc" field contains miscellaneous flag bits.
2^0-27  Not assigned.
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
2^30    When this bit is a 1, then this Notice was ground-generated; else flight-generated.
        A Gnd-generated Notice is issued anytime humans during ground operations
        have determined if this Notice should be issued.  This will typically be used
        during the early phases of the mission before the automatic real-time distribution
        capability is enabled.
2^31    Not assigned.

The "rec_seq_num" is the Record Sequence Number.  It is a packet serial number
spanning all the messages that come from the s/c during a given trigger.
It will start with a value of 1 for the FERMI_GBM_ALERT Notice and increment during 
the multiple GBM_POS Notices, etc.

The "trig_signif" is the significance of the trigger in units of 0.1 sigma.
It is the significance of the initial trigger (ie of the data in the trigger_time interval).
(This should not be confused with the "Data Significance" in the FLT_POS and GND_POS notices,
which is signifiance of the data in the ongoing integration time interval.)

The "longitude" is the East geographic longitude of the s/c at the time of the trigger.
The units are arcmin (ie divide the 4-byte integer by 60.0 to get fl.pt. degrees).
The "latitude" is the geographic latitude of the s/c at the time of the trigger.
The units are arcmin (ie divide the 4-byte integer by 60.0 to get fl.pt. degrees).

The "det" contains which two of the 14 detectors that resulted in this event.
There are 12 position-determining detectors and 2 spectrum-measuring detectors (BGO).
The packing seqeunce starts with Det0 in the 2^0 bit, Det1 in 2^1, ..., DetB in 2^11,
and the two BGO dets in 2^12 and 2^13.

There are a total of 10 "spare" items in the packet (usually filled
with zeros).  They are located at items 7-8, 10-13, 24-25, and 27-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=111 PACKET CONTENTS:

The FERMI_GBM_FLT_POS packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=111)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_flue   [counts]        Num events during trig window, 0 to inf
long         10      spare        integer         4 bytes for the future
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12      phi          [centi-deg]     (int)(0.0 to 359.9999 *100)
long         13      theta        [centi-deg]     (int)(0.0 to +100.0 *100)
long         14      trigTmScale  [milli-sec]     Trigger Time Scale
long         15-16   spare[2]     integer         8 bytes for the future
long         17      dataTmScale  [milli-sec]     Data Time Scale
long         18      soln_status  bits            Type of source/trigger found
long         19      misc         bits            Misc stuff packed in here
long         20      rec_seq_num  integer         SerNum of the messages (1-~40)
long         21      data_signif  [centi-sigma]   (int)(sig2noise *100)
long         22      loc_algor    integer         Location algorithm (1-???)
long         23      most_likely  integer         Mostly class ID & probability
long         24      2most_likely integer         2nd Mostly class ID & probability
long         25      hard_ratio   [centi-dn]      (int)(hardness_ratio *100)
long         26      dets         bits            The 2 dets that triggered
long         26-36   spare[11]    integers        44 bytes for the future
long         37      longitude    [arcmin]        Geo (East) Longitude of s/c
long         38      latitude     [arcmin]        Geo Latitude of s/c
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 110, 111, 112, 117, 118, and 119;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
110 = FERMI_GBM_ALERT, 111 = FERMI_GBM_FLT_POSITION. 
112 = FERMI_GBM_GND_POS, 118 = FERMI_GBM_TRANS, and 119 = FERMI_GBM_POS_TEST. 

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of seconds since 01 Jan 2001.

The "burst_tjd" is the Truncated Julian Day of the FERMI-GBM burst trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the FERMI-GBM burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the GBM flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees (over-precision,
but this is the new standard scaling for all missions/instruments).

The "burst_flue" is the number of events in the 50-300 keV band 
during the 'integ_time' time interval of the successful trigger criterion.
(is this bkg subtracted?????)

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).

The "phi" and "theta" are the GBM instrument coordinates of the trigger (burst)
as determined by the GBM flight software program.  Phi is measured phi=0
along the +X-axis of the s/c and increasing towards the +Y axis,
and theta is measured from the boresight of the LAT instrument (the +Z axis).
The units are in centi-degees (ie the fl.pt. degrees were multiplied by 100
and then integerized).

The "trigTmScale" is the binning (ie timesampling) of the countrate lightcurve
used for the inital countrate lightcurve trigger detection.
The units are in milli-seconds (ie the fl.pt. seconds were multiplied by 1000
and then integerized).

The "dataTmScale" is the binning (ie timesampling) of the countrate lightcurve
used during the iterative location calculation phase of the porcesing.
The units are in milli-seconds (ie the fl.pt. seconds were multiplied by 1000
and then integerized).

The "soln_status" (aka trigger_id) field contains (a) flag bits on the type of solution
that was found in the on-board image and about whether it matches anything in the
on-board source catalog, and (b) flag bits that are assigned in the GCN ground-processing.
These bits will be determined largely (but not completely) by the ClassID in the Most_Likely fields.
The bit packing of the "soln_status" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0-4      -     spare          spares for future use
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-11     -     spare          spares for future use
12       G     blk_cat_src    0=No or 1=Yes, it is in the catalog of sources to be blocked (internal use only)
13-27    -     spare          spares for future use
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30       G     test_submit    0=No or 1=Yes, this is a test submission (internal use only)
31       -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
2^0-10  Not asigned.
2^11    When this bit is a 1, it indicates that 1 (or more) of the RA,Dec,Lon,Lat values
        were out of valid range (eg RA was 361 deg).
2^12-23 Not assigned.
2^24    When this bit is a 1, then the Dets (slot 26) and Lon,Lat (slots 37,38) have been filled
        from the GBM_ALERT Notice.
2^25-29 Not assigned.
2^30    When this bit is a 1, then this Notice was ground-generated; else flight-generated.
        A Gnd-generated Notice is issued anytime humans during ground operations
        have determined if this Notice should be issued.  This will typically be used
        during the early phases of the mission before the automatic real-time distribution
        capability is enabled.  Once the burst position has been validated by humans,
        a GBM_Pos Notice will be issued (with this flag bit set to 1).
        After the Verification phase, there still may be occaisions when a GBM_POS notice
        is (re)created by human-processing and will be distributed (with this bit set to 1). 
2^31    Not assigned.

The "rec_seq_num" is the Record Sequence Number.  It is a serial number spanning
all the messages (of all types) that come from the s/c during a given trigger.
It will start with a value of 1 for the FERMI_GBM_ALERT Notice and increment during 
the multiple GBM_POS Notices, etc.

The "data_signif" is the significance level of the data in the on-going integrated data.
This is the signal/noise (ie number of sigma) of the rate-trigger detection
multiplied by 100 and then integerized (ie units are centi-sigma).
(This should not be confused with the "trigger Significance" in the ALERT Notice,
which is signifiance of the data in a just the initial trigger interval.)

The "loc_algorithm" field contains the version_number of the Flt S/W Location Algorithm
that was used to derive this RA,Dec location for this event.  The values are:
1   (Only one is defined so far in the FSW)
2   (Future use as on-orbit experience dictates)
3   (Future use as on-orbit experience dictates)

The "most_likely" field contains two values (2 shorts into the 1 long).
The least significant two bytes contains an the index value identifying
the source_object class of this event (eg GRB, solar flare, electron precip, etc).
The most significant two bytes contain the probability (ie confidence level) that
this class assignment is correct.  The range of the probability is 0.0 to 1.0;
and the units are in centi-probability (ie prob*100).
CLASS TABLE:
    //  Classes 0 to 3 are "single classes": the probabilities of these
    //  will be either 0 or 1, never an in between value.
    0  ERROR                - ????????????precise wording needed!!!!!!
    1  UNRELIABLE_LOCATION  - ????????????precise wording needed!!!!!!
    2  LOCAL_PARTICLES      - Local particles, equal rates in opposite detectors
    3  BELOW_HORIZON        - Distant particles, assumed to come from the horizon
    //  The remaining classes have probabilities calculated
    //  from Bayes Theorem: any value from 0.0 to 1.0 is possible.
    4  GRB                  - For bursts with good localizations (the desired case)
    5  GENERIC_SGR          - This is any SGR (except 1806-20)
    6  GENERIC_TRANSIENT    - Any astrophysical transient not included elsewhere
    7  DISTANT_PARTICLES    - Particles at a distance
    8  SOLAR_FLARE          - This is a Solar Flare event
    9  CYG_X1               - This trigger was caused by a CygX1 fluctuation
    10 SGR_1806_20          - This trigger came from SGR 1806-20
    11 GROJ_0422_32         - This trigger came from GRO J0422-32

The "2most_likely" field contains two values (2 shorts into the 1 long).
The least significant two bytes contains an the index value identifying
the second-most-likely source_object class of this event.
The most significant two bytes contain the probability (ie confidence level) that
this class assignment is correct.  The range of the probability is 0.0 to 1.0;
and the units are in centi-probability (ie prob*100).
The Class Table is the same as above.

The "hardness_ratio" is the hardness ratio (HR = Cnts(15-50keV) / Cnts(50-300keV)).
The units are in centi-dig_number (ie hard_ratio = (int)(HR*100)).

The "det" contains which two of the 14 detectors that resulted in this event.
There are 12 position-determining detectors and 2 spectrum-measuring detectors (BGO).
The packing seqeunce starts with Det0 in the 2^0 bit, Det1 in 2^1, ..., DetB in 2^11,
and the two BGO dets in 2^12 and 2^13.  This field is valid only if the 2^24 bit in MISC
is set.

The "longitude" is the East geographic longitude of the s/c at the time of the trigger.
The units are arcmin (ie divide the 4-byte integer by 60.0 to get fl.pt. degrees).
The "latitude" is the geographic latitude of the s/c at the time of the trigger.
The units are arcmin (ie divide the 4-byte integer by 60.0 to get fl.pt. degrees).

There are a total of 11(tbr) "spare" items in the packet (usually filled
with zeros).  They are located at items 15-16(tbd) and 25-36.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=112 PACKET CONTENTS:

The FERMI_GBM_GND_POS packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=112)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       burst_tjd    [days]          Truncated Julian Day
long         6       burst_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9-10    spare[2]     integers        8 bytes for the future
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12      phi          [centi-deg]     (int)(0.0 to 359.9999 *100)
long         13      theta        [centi-deg]     (int)(0.0 to +100.0 *100)
long         14      data_inteval [milli-sec]     Duration of the trigger interval, 1 to inf
long         15-17   spare[3]     integer         12 bytes for the future
long         18      soln_status  bits            Type of source/trigger found
long         19      misc         bits            Misc stuff packed in here
long         20      rec_seq_num  integer         SerNum of the messages (1-~40)
long         21      burst_signif [centi-sigma]   (int)(sig2noise *100)
long         22      loc_algor    integer         Location algorithm (1-???)
long         23-38   spare[16]    integers        64 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 110, 111, 112, 117, 118, and 119;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
110 = FERMI_GBM_ALERT, 111 = FERMI_GBM_FLT_POSITION. 
112 = FERMI_GBM_GND_POS, 118 = FERMI_GBM_TRANS, and 119 = FERMI_GBM_POS_TEST. 

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the burst_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of seconds since 01 Jan 2001.

The "burst_tjd" is the Truncated Julian Day of the FERMI-GBM burst trigger,
eg. TJD=13370 is 01 Jan 2005.

The "burst_sod" is the UT seconds-of-day (SOD) of the FERMI-GBM burst trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the GBM flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees (over-precision,
but this is the new standard scaling for all missions/instruments).

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).

The "phi" and "theta" are the GBM instrument coordinates of the trigger (burst)
as determined by the GBM flight software program.  Phi is measured phi=0
along the +X-axis of the s/c and increasing towards the +Y axis,
and theta is measured from the boresight of the LAT instrument (the +Z axis).
The units are in centi-degees (ie the fl.pt. degrees were multiplied by 100
and then integerized).

The "data_interval" is the interval over which the data were accumulated in the
MAXRATES packet (whatever the blazes that means -- every week it is a new name).
The units are in milli-seconds (ie the fl.pt. seconds were multiplied by 1000
and then integerized).

The "soln_status" (aka trigger_id) field contains (a) flag bits on the type of solution
that was found in the on-board image and about whether it matches anything in the
on-board source catalog, and (b) flag bits that are assigned in the GCN ground-processing.
These bits will be determined largely (but not completely) by the ClassID in the Most_Likely fields.
The bit packing of the "soln_status" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0-4      -     spare          spares for future use
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-11     -     spare          spares for future use
12       G     blk_cat_src    0=No or 1=Yes, it is in the catalog of sources to be blocked (internal use only)
13-27    -     spare          spares for future use
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30       G     test_submit    0=No or 1=Yes, this is a test submission (internal use only)
31       -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
2^0-10  spares.
2^11    When this bit is a 1, it indicates that 1 (or more) of the RA,Dec values
        were out of valid range (eg RA was 361 deg).
2^12-29 spares.
2^30    When this bit is a 1, then this Notice was ground-generated; else flight-generated.
        A Gnd-generated Notice is issued anytime humans during ground operations
        have determined if this Notice should be issued.  This will typically be used
        during the early phases of the mission before the automatic real-time distribution
        capability is enabled.  Once the burst position has been validated by humans,
        a GBM_Pos Notice will be issued (with this flag bit set to 1).
        After the Verification phase, there still may be occaisions when a GBM_POS notice
        is (re)created by human-processing and will be distributed (with this bit set to 1). 
2^31    spare.

The "rec_seq_num" is the Record Sequence Number.  It is a serial number spanning
all the messages (of all types) that come from the s/c during a given trigger.
It will start with a value of 1 for the FERMI_GBM_ALERT Notice and increment during 
the multiple GBM_POS Notices, etc.

The "burst_signif" is the significance level of the initial 'rate trigger'.
This is the signal/noise (ie number of sigma) of the rate-trigger detection
multiplied by 100 and then integerized (ie units are centi-sigma).

The "loc_algorithm" field contains the version_number of the Location Algorithm Gnd s/w
that was used to derive this RA,Dec location for this event.  The values are:
1   (Only one is defined so far in the Gnd SW)
2   (Future use as on-orbit experience dictates)
3   (Future use as on-orbit experience dictates)

There are a total of 17(tbr) "spare" items in the packet (usually filled
with zeros).  They are located at items 15-16(tbd) and 25-35.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.




TYPE=113 PACKET CONTENTS:

The FERMI_GBM_LC packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=113)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       trig_tjd     [days]          Truncated Julian Day
long         6       trig_sod     [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_inten  [counts]        Num events during trig window, 0 to inf
long         10-15   spare[6]     integers        24 bytes for the future
//long       12      phi          [centi-deg]     (int)(0.0 to 359.9999 *100)
//long       13      theta        [centi-deg]     (int)(0.0 to +100.0 *100)
//long       16      lon_lat      2_shorts        (int)(Longitude,Lattitude *100)
long         17      spare        integer         4 bytes for the future
long         18      soln_status  bits            Type of source/trigger found
long         19      misc         bits            Misc stuff packed in here
long         20      rec_seq_num  integer         SerNum of the messages (1-~20)
long         21-38   spare[18]    integer         72 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 110, 111, 112, 117, 118, and 119;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
110 = FERMI_GBM_ALERT, 111 = FERMI_GBM_FLT_POSITION. 
112 = FERMI_GBM_GND_POS, 118 = FERMI_GBM_TRANS, and 119 = FERMI_GBM_POS_TEST. 

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the trig_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of seconds since 01 Jan 2001.

The "burst_tjd" is the Truncated Julian Day of the FERMI-GBM trigger,
eg. TJD=13370 is 01 Jan 2005.  (Note that at the time when this Alert Notice
is issued, it is not yet known if this trigger is due to a real GRB,
or some non-GRB cause (eg. failed or false trigger).)

The "burst_sod" is the UT seconds-of-day (SOD) of the FERMI-GBM trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).  (Since this is the Alert Notice, it is not known yet
if this trigger is a real GRB or just a false trigger.)

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the GBM flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "burst_flue" is the number of events in the 50-300 keV band 
during the 'integ_time' time interval of the successful trigger criterion.
(is this bkg subtracted?????)

The "burst_inten" is the number of events in the 50-300 keV band
averaged over the two closed detectors and cosine-corrected.
(is this bkg subtracted?????)

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).

//The "phi" and "theta" are the GBM instrument coordinates of the trigger (burst)
//as determined by the GBM flight software program.  Phi is measured phi=0
//along the (TBC)+Y-axis of the s/c and increasing towards the -Z axis,
//and theta is measured from the boresight of the GBM instrument.
//The units are in centi-degees (ie the fl.pt. degrees were multiplied by 100
//and then integerized).

??????????????stuff here???????????

The "soln_status" (aka trigger_id) field contains (a) flag bits on the type of solution
that was found in the on-board image and about whether it matches anything in the
on-board source catalog, and (b) flag bits that are assigned in the GCN ground-processing.
The bit packing of the "soln_status" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0-4      -     spare          spares for future use
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-11     -     spare          spares for future use
12       G     blk_cat_src    0=No or 1=Yes, it is in the catalog of sources to be blocked (internal use only)
13-29    -     spare          spares for future use
30       G     test_submit    0=No or 1=Yes, this is a test submission (internal use only)
31       -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
2^0-10  spares.
2^11    When this bit is a 1, it indicates that 1 (or more) of the RA,Dec values
        were out of valid range (eg RA was 361 deg).
2^12-29 spares.
2^30    When this bit is a 1, then this Notice was ground-generated; else flight-generated.
        A Gnd-generated Notice is issued anytime humans during ground operations
        have determined if this Notice should be issued.  This will typically be used
        during the early phases of the mission before the automatic real-time distribution
        capability is enabled.  Once the burst position has been validated by humans,
        a GBM_Pos Notice will be issued (with this flag bit set to 1).
        After the Verification phase, there may be occaisions when a GBM_LC notice
        is (re)created by human-processing and will be distributed (with this bit set to 1). 
2^31    spare.

The "rec_seq_num" is the Record Sequence Number.  It is a serial number spanning
all the messages that come from the s/c during a given trigger.  It will start
with a value of 1 for the FERMI_GBM_ALERT Notice and increment during 
the multiple GBM_POS Notices, etc.

There are a total of 13(tbr) "spare" items in the packet (usually filled
with zeros).  They are located at items 15-16 and 25-35.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=114 PACKET CONTENTS:

Not for public disrtibution -- Fermi-GBM team only.

The FERMI_GBM_GND_INTERNAL packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Same as 112 except slots 23 and 24 are filled.

long         23      most_likely  integer         Mostly class ID and probability
long         24      2most_likely integer         2nd Mostly class ID and probability




TYPE=118 PACKET CONTENTS:

The FERMI_GBM_TRANS packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=118)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       trig_tjd     [days]          Truncated Julian Day
long         6       trig_sod     [centi-sec]     (int)(sssss.sss *100)
long         7       trans_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       trans_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       trans_inten  [counts]        Num events during trig window, 0 to inf
long         10      spare        integer         4 bytes for the future
long         11      trans_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12      phi          [centi-deg]     (int)(0.0 to 359.9999 *100)
long         13      theta        [centi-deg]     (int)(0.0 to +100.0 *100)
long         14      integ_time   [centi-sec]     Duration of the trigger interval, 1 to inf
long         15      spare        integer         4 bytes for the future
//long         16      lon_lat      2_shorts        (int)(Longitude,Lattitude *100)
long         17      spare        integer         4 bytes for the future
long         18      soln_status  bits            Type of source/trigger found
long         19      misc         bits            Misc stuff packed in here
long         20      rec_seq_num  integer         SerNum of the messages (1-~40)
long         21      burst_signif [centi-sigma]   (int)(sig2noise *100)
long         22      loc_algor    integer         Location algorithm (1-???)
long         23      most_likely  integer         Mostly class ID & probability
long         24      2most_likely integer         2nd Mostly class ID & probability
long         25      hard_ratio   [centi-dn]      (int)(hardness_ratio *100)
long         26-38   spare[13]    integers        52 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 110, 111, 112, 117, 118, and 119;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
110 = FERMI_GBM_ALERT, 111 = FERMI_GBM_FLT_POSITION. 
112 = FERMI_GBM_GND_POS, 118 = FERMI_GBM_TRANS, and 119 = FERMI_GBM_POS_TEST. 

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the trig_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of seconds since 01 Jan 2001.

The "trig_tjd" is the Truncated Julian Day of the FERMI-GBM trigger,
eg. TJD=13370 is 01 Jan 2005.  (Note that at the time when this Alert Notice
is issued, it is not yet known if this trigger is due to a real GRB,
or some non-GRB cause (eg. failed or false trigger).)

The "trig_sod" is the UT seconds-of-day (SOD) of the FERMI-GBM trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).  (Since this is the Alert Notice, it is not known yet
if this trigger is a real GRB or just a false trigger.)

The "trans_ra" and "trans_dec" are the RA,Dec coordinates of the trans
as determined by the GBM flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "trans_flue" is the number of events in the 50-300 keV band 
during the 'integ_time' time interval of the successful trigger criterion.
(is this bkg subtracted?????)

The "trans_inten" is the number of events in the 50-300 keV band
averaged over the two closed detectors and cosine-corrected.
(is this bkg subtracted?????)

The "trans_error" is the radius of the circle that will contain on average
TBD% of the transients.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).

The "phi" and "theta" are the GBM instrument coordinates of the trigger (transient)
as determined by the GBM flight software program.  Phi is measured phi=0
along the (TBC)+Y-axis of the s/c and increasing towards the -Z axis,
and theta is measured from the boresight of the LAT instrument.
The units are in centi-degees (ie the fl.pt. degrees were multiplied by 100
and then integerized).

The "integ_time" is the duration of the sampling interval
of the successful trigger criteria.  The units are in centi-seconds
(ie the fl.pt. seconds were multiplied by 100 and then integerized).

The "loc_algorithm" field contains the index value of which Location Algorithm
was used to derive this RA,Dec location for this event.  The values are:
1   (Only one is defined so far in the FSW; it really does not have a name)
2   (Future use as on-orbit experience dictates)
3   (Future use as on-orbit experience dictates)

The "most_likely" field contains two values (2 shorts into the 1 long).
The least significant two bytes contains an the index value identifying
the source_object class of this event (eg GRB, solar flare, electron precip, etc).
The most significant two bytes contain the probability (ie confidence level) that
this class assignment is correct.  The range of the probability is 0.0 to 1.0;
and the units are in centi-probability (ie prob*100).
CLASS TABLE:
    //  Classes 0 to 3 are "single classes": the probabilities of these
    //  will be either 0 or 1, never an in between value.
    0  ERROR                - ????????????precice wording needed!!!!!!
    1  UNRELIABLE_LOCATION  - ????????????precice wording needed!!!!!!
    2  LOCAL_PARTICLES      - Local particles, equal rates in opposite detectors
    3  BELOW_HORIZON        - Distant particles, assumed to come from the horizon
    //  The remaining classes have probabilities calculated
    //  from Bayes Theorem: any value from 0.0 to 1.0 is possible.
    4  GRB                  - For bursts with good localizations (the desired case)
    5  GENERIC_SGR          - This is any SGR (except 1806-20)
    6  GENERIC_TRANSIENT    - Any astrophysical transient not included elsewhere
    7  DISTANT_PARTICLES    - ????????????precice wording needed!!!!!!
    8  SOLAR_FLARE          - This is a Solar Flare event
    9  CYG_X1               - This trigger was caused by a CygX1 fluctuation
    10 SGR_1806_20          - This trigger came from SGR 1806-20
    11 GROJ_0422_32         - This trigger came from GRO J0422-32

The "2most_likely" field contains two values (2 shorts into the 1 long).
The least significant two bytes contains an the index value identifying
the second-most-likely source_object class of this event.
The most significant two bytes contain the probability (ie confidence level) that
this class assignment is correct.  The range of the probability is 0.0 to 1.0;
and the units are in centi-probability (ie prob*100).
The Class Table is the same as above.

//The "lon_lat" is the Longitude and Lattitude of the s/c at the time of the GBM trigger.
//This 4-byte quantity is composed of two 2-byte integers.  The high-order short
//is the latitude multiplied by 100 and integerized; the low-order short
//is the longitude multiplied by 100 and integerized; ie both values are in centi-degrees.

The "soln_status" (aka trigger_id) field contains (a) flag bits on the type of solution
that was found in the on-board image and about whether it matches anything in the
on-board source catalog, and (b) flag bits that are assigned in the GCN ground-processing.
The bit packing of the "soln_status" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0-4      -     spare          spares for future use
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-11     -     spare          spares for future use
12       G     blk_cat_src    0=No or 1=Yes, it is in the catalog of sources to be blocked (internal use only)
13-27    -     spare          spares for future use
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30       G     test_submit    0=No or 1=Yes, this is a test submission (internal use only)
31       -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
2^0-10  spares.
2^11    When this bit is a 1, it indicates that 1 (or more) of the RA,Dec values
        were out of valid range (eg RA was 361 deg).
2^12-29 spares.
2^30    When this bit is a 1, then this Notice was ground-generated; else flight-generated.
        A Gnd-generated Notice is issued anytime humans during ground operations
        have determined if this Notice should be issued.  This will typically be used
        during the early phases of the mission before the automatic real-time distribution
        capability is enabled.  Once the burst position has been validated by humans,
        a GBM_Pos Notice will be issued (with this flag bit set to 1).
        After the Verification phase, there may be rare occaisions when a GBM_POS notice
        is (re)created by human-processing and will be distributed (with this bit set to 1). 
2^31    spare.

The "rec_seq_num" is the Record Sequence Number.  It is a serial number spanning
all the messages that come from the s/c during a given trigger.  It will start
with a value of 1 for the FERMI_GBM_ALERT Notice and increment during 
the multiple GBM_POS Notices, etc.

The "burst_signif" is the significance level of the initial 'rate trigger'.
This is the signal/noise (ie number of sigma) of the rate-trigger detection
multiplied by 100 and then integerized (ie units are centi-sigma).

The "hardness_ratio" is the hardness ratio (HR = Cnts(15-50keV) / Cnts(50-300keV)).
The units are in centi-dig_number (ie hard_ratio = (int)(HR*100)).

There are a total of 13(tbr) "spare" items in the packet (usually filled
with zeros).  They are located at items 15-16 and 25-35.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.




TYPE=119 PACKET CONTENTS:

The FERMI_GBM_POS_TEST packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=119)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       trig_tjd     [days]          Truncated Julian Day
long         6       trig_sod     [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_inten  [counts]        Num events during trig window, 0 to inf
long         10      spare        integer         4 bytes for the future
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         7-15    spare[9]     integer         40 bytes for the future
//long         16      lon_lat      2_shorts        (int)(Longitude,Lattitude *100)
//long         17      trig_index   integer         Rate_Trigger index
//long         18      soln_status  bits            Type of source/trigger found
long         19      misc         bits            Misc stuff packed in here
long         20      spare        integer         4 bytes for the future
//long         21      rate_signif  [centi-sigma]   (int)(sig2noise *100)
long         22-38   spare[17]    integer         68 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 110, 111, 112, 117, 118, and 119;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
110 = FERMI_GBM_ALERT, 111 = FERMI_GBM_FLT_POSITION. 
112 = FERMI_GBM_GND_POS, 118 = FERMI_GBM_TRANS, and 119 = FERMI_GBM_POS_TEST. 

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the trig_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of seconds since 01 Jan 2001.
But for this test notice type, it is hardwired to be a fixed value of 99999.

The "trig_tjd" is the Truncated Julian Day of the FERMI-GBM trigger,
eg. TJD=13370 is 01 Jan 2005.  (Note that at the time when this Alert Notice
is issued, it is not yet known if this trigger is due to a real GRB,
or some non-GRB cause (eg. failed or false trigger).)

The "trig_sod" is the UT seconds-of-day (SOD) of the FERMI-GBM trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).  (Since this is the Alert Notice, it is not known yet
if this trigger is a real GRB or just a false trigger.)

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the GBM flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "burst_flue" is the number of events in the 50-300 keV band 
during the 'integ_time' time interval of the successful trigger criterion.
(is this bkg subtracted?????)

The "burst_inten" is the number of events in the 50-300 keV band
averaged over the two closed detectors and cosine-corrected.
(is this bkg subtracted?????)

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).

//The "phi" and "theta" are the GBM instrument coordinates of the trigger (burst)
//as determined by the GBM flight software program.  Phi is measured phi=0
//along the (TBC)+Y-axis of the s/c and increasing towards the -Z axis,
//and theta is measured from the boresight of the LAT instrument.

The "integ_time" is the duration of the sampling interval
of the successful trigger criteria.  The units are in centi-seconds
(ie the fl.pt. seconds were multiplied by 100 and then integerized).

The "loc_algorithm" field contains the index value of which Location Algorithm
was used to derive this RA,Dec location for this event.  The values are:
1   (Only one is defined so far in the FSW; it really does not have a name)
2   (Future use as on-orbit experience dictates)
3   (Future use as on-orbit experience dictates)

The "most_likely" field contains two values (2 shorts into the 1 long).
The least significant two bytes contains an the index value identifying
the source_object class of this event (eg GRB, solar flare, electron precip, etc).
The most significant two bytes contain the probability (ie confidence level) that
this class assignment is correct.  The range of the probability is 0.0 to 1.0;
and the units are in centi-probability (ie prob*100).
CLASS TABLE:
    //  Classes 0 to 3 are "single classes": the probabilities of these
    //  will be either 0 or 1, never an in between value.
    0  ERROR                - ????????????precice wording needed!!!!!!
    1  UNRELIABLE_LOCATION  - ????????????precice wording needed!!!!!!
    2  LOCAL_PARTICLES      - Local particles, equal rates in opposite detectors
    3  BELOW_HORIZON        - Distant particles, assumed to come from the horizon
    //  The remaining classes have probabilities calculated
    //  from Bayes Theorem: any value from 0.0 to 1.0 is possible.
    4  GRB                  - For bursts with good localizations (the desired case)
    5  GENERIC_SGR          - This is any SGR (except 1806-20)
    6  GENERIC_TRANSIENT    - Any astrophysical transient not included elsewhere
    7  DISTANT_PARTICLES    - ????????????precice wording needed!!!!!!
    8  SOLAR_FLARE          - This is a Solar Flare event
    9  CYG_X1               - This trigger was caused by a CygX1 fluctuation
    10 SGR_1806_20          - This trigger came from SGR 1806-20
    11 GROJ_0422_32         - This trigger came from GRO J0422-32

The "2most_likely" field contains two values (2 shorts into the 1 long).
The least significant two bytes contains an the index value identifying
the second-most-likely source_object class of this event.
The most significant two bytes contain the probability (ie confidence level) that
this class assignment is correct.  The range of the probability is 0.0 to 1.0;
and the units are in centi-probability (ie prob*100).
The Class Table is the same as above.

//The "lon_lat" is the Longitude and Lattitude of the s/c at the time of the GBM trigger.
//This 4-byte quantity is composed of two 2-byte integers.  The high-order short
//is the latitude multiplied by 100 and integerized; the low-order short
//is the longitude multiplied by 100 and integerized; ie both values are in centi-degrees.

The "soln_status" (aka trigger_id) field contains (a) flag bits on the type of solution
that was found in the on-board image and about whether it matches anything in the
on-board source catalog, and (b) flag bits that are assigned in the GCN ground-processing.
The bit packing of the "soln_status" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0-4      -     spare          spares for future use
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-11     -     spare          spares for future use
12       G     blk_cat_src    0=No or 1=Yes, it is in the catalog of sources to be blocked (internal use only)
13-27    -     spare          spares for future use
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30       G     test_submit    0=No or 1=Yes, this is a test submission (internal use only)
31       -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
2^0-10  spares.
2^11    When this bit is a 1, it indicates that 1 (or more) of the RA,Dec values
        were out of valid range (eg RA was 361 deg).
2^12-29 spares.
2^30    When this bit is a 1, then this Notice was ground-generated; else flight-generated.
        A Gnd-generated Notice is issued anytime humans during ground operations
        have determined if this Notice should be issued.  This will typically be used
        during the early phases of the mission before the automatic real-time distribution
        capability is enabled.  Once the burst position has been validated by humans,
        a GBM_Pos Notice will be issued (with this flag bit set to 1).
        After the Verification phase, there may be rare occaisions when a GBM_POS notice
        is (re)created by human-processing and will be distributed (with this bit set to 1). 
2^31    spare.

The "rec_seq_num" is the Record Sequence Number.  It is a serial number spanning
all the messages that come from the s/c during a given trigger.  It will start
with a value of 1 for the FERMI_GBM_ALERT Notice and increment during 
the multiple GBM_POS Notices, etc.

The "burst_signif" is the significance level of the initial 'rate trigger'.
This is the signal/noise (ie number of sigma) of the rate-trigger detection
multiplied by 100 and then integerized (ie units are centi-sigma).

The "hardness_ratio" is the hardness ratio (HR = Cnts(15-50keV) / Cnts(50-300keV)).
The units are in centi-dig_number (ie hard_ratio = (int)(HR*100)).

There are a total of 13(tbr) "spare" items in the packet (usually filled
with zeros).  They are located at items 15-16 and 25-35.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



WARNING:
GCN customers should not be using the specifications in this FERMI section
to develop any software just yet.  These Fermi-LAT specs are in the state of flux,
and will likely change.  Wait at least until Dec 08 for things to settle.  SDB 09nov08



TYPE=120 PACKET CONTENTS:

The FERMI_LAT_GRB_POS_INI packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=120)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       trig_tjd     [days]          Truncated Julian Day
long         6       trig_sod     [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_inten  [counts]        Num events during trig window, 0 to inf
long         10      inten_4      4_bytes         Evt_cnts in 4 energy bands
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12-13   spare[2]     integer         8 bytes for the future //poss phi,theta
long         14      int_time     [msec]          Integration time
long         15-16   spare[2]     integer         8 bytes for the future
long         17      trig_index   integer         Trigger index
long         18      Trig_ID      bits            LAT burst candidate, 1=yes,0=no
long         19      misc         bits            Misc stuff packed in here
long         20      rec_seq_num  integer         SerNum of the messages (1-~40)
long         21-24   spare[4]     integer         16 bytes for the future
long         25      temp_stat    integer         (int)(4*(-log10(probability)))
long         26      image_stat   integer         (int)(4*(-log10(probability)))
long         27-38   spare[12]    integer         48 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 120, 121, 122, and 123;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
120 = FERMI_LAT_GRB_POS_INI, 121 = FERMI_LAT_POS_UPD. 
122 = FERMI_LAT_GRB_POS_DIAG, and 123 = FERMI_LAT_TRANS.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the trig_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of seconds since 01 Jan 2001.

The "trig_tjd" is the Truncated Julian Day of the FERMI-LAT trigger,
eg. TJD=14466 is 01 Jan 2008.

The "trig_sod" is the UT seconds-of-day (SOD) of the FERMI-LAT trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized). The trigger time can be off by TBD msec.  This uncertainty
is governed by the variable trigger window duration, which is defined in terms
of a fixed number of events rather than an interval of time.

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the LAT flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "burst_inten" is the total number of events in the standard 4 energy bands
during the 'int_time' time interval of the reporting time to date.

The "inten_4" contains 4 unsigned_char counts of the number of events
in the standard 4 energy bands during the 'int_time' interval.
The lsb contains the number of events in the 0-100 MeV band,
the next lsb contains number of events in the 100MeV-1GeV band,
3rd has 1-10GeV, and the msb has the number of events in the greater_than_10GeV band.

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).

//The "phi" and "theta" is the location of the source in LAT instrument coordinates.
//Theta is the angle off the bore sight.  And phi is the azimuthal angle
//with 0 starting at..... measured CW(tbd)....

The "int_time" is the time interval between the first and last photons
which went into the successful trigger criteria.  The units are milli-seconds.

The "trig_index" is the index value of the trigger criterion that provided
the successful trigger (precise definition is TBD).

The "trig_id" field contains (a) flag bits on the type of solution
that was found on-board and (b) flag bits that are assigned in the GCN ground-processing.
The bit packing of the "trig_id" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        F     G-vs-L         0=BurstID_from_GBM, 1=from_LAT
1        F     gam_used       0=all gammas used, or 1=only gammas above a cut used inloc method
2-4      -     spare          spare for future use
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-27     -     spare          spare for future use
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30-31    -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
2^0     A 1 means a Repoint_Request was made to the s/c. [Not defined for INI]
2^1-10  spare.
2^11    When this bit is a 1, it indicates that 1 (or more) of the RA,Dec values
        were out of valid range (eg RA was 361 deg).
2^12    spare.
2^13    When this bit is a 1, it indicates that this position is near (less then 0.3deg)  a bright star (mag less than 6.5).
2^14    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the position error radius
        is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
        is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-31 spare.

The "rec_seq_num" is the Record Sequence Number.  It is a packet serial number
spanning all the messages that come from the s/c during a given trigger.
It will start with a value of 1 for the FERMI_GBM_ALERT Notice and increment during 
the multiple GBM_POS Notices, etc.

The "temp_stat" is the measure of the temporal test statistic.
The value is 4*(-log10(temporal_probability)).  The bigger the number,
the more likely the trigger is a real GRB.  The Fermi-LAT team
has determined that sum of the Temporal and Image Stats >120 is a good working threshold.

The "image_stat" is the measure of the image test statistic.
The value is 4*(-log10(spatial_probability)).  The bigger the number,
the more likely the trigger is a real GRB.  The Fermi-LAT team
has determined that sum of the Temporal and Image Stats >120 is a good working threshold.

There are a total of 21(tbr) "spare" items in the packet (usually filled
with zeros).  They are located at items 12-13, 15, 20 and 22-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.




TYPE=121 PACKET CONTENTS:

The FERMI_LAT_GRB_POS_UPD packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=121)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       trig_tjd     [days]          Truncated Julian Day
long         6       trig_sod     [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_inten  [counts]        Num events during trig window, 0 to inf
long         10      inten_4      4_bytes         Evt_cnts in 4 energy bands
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12-13   spare[2]     integer         8 bytes for the future //poss phi,theta
long         14      int_time     [msec]          Integration time
long         15-16   spare[2]     integer         8 bytes for the future
long         17      trig_index   integer         Trigger index
long         18      Trig_ID      bits            LAT burst candidate, 1=yes,0=no
long         19      misc         bits            Misc stuff packed in here
long         20      rec_seq_num  integer         SerNum of the messages (1-~40)
long         21-24   spare[4]     integer         16 bytes for the future
long         25      temp_stat    integer         (int)(4*(-log10(probability)))
long         26      image_stat   integer         (int)(4*(-log10(probability)))
long         27-38   spare[12]    integer         48 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 120, 121, 122, and 123;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
120 = FERMI_LAT_GRB_POS_INI, 121 = FERMI_LAT_POS_UPD. 
122 = FERMI_LAT_GRB_POS_DIAG, and 123 = FERMI_LAT_TRANS.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the trig_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of seconds since 01 Jan 2001.

The "trig_tjd" is the Truncated Julian Day of the FERMI-LAT trigger,
eg. TJD=14466 is 01 Jan 2008.

The "trig_sod" is the UT seconds-of-day (SOD) of the FERMI-LAT trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized). The trigger time can be off by TBD msec.  This uncertainty
is governed by the variable trigger window duration, which is defined in terms
of a fixed number of events rather than an interval of time.

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the LAT flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "burst_inten" is the total number of events in the standard 4 energy bands
during the 'int_time' time interval of the reporting time to date.

The "inten_4" contains 4 unsigned_char counts of the number of events
in the standard 4 energy bands during the 'int_time' interval.
The lsb contains the number of events in the 0-100 MeV band,
the next lsb contains number of events in the 100MeV-1GeV band,
3rd has 1-10GeV, and the msb has the number of events in the greater_than_10GeV band.

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).

//The "phi" and "theta" is the location of the source in LAT instrument coordinates.
//Theta is the angle off the bore sight.  And phi is the azimuthal angle
//with 0 starting at..... measured CW(tbd)....

The "int_time" is the time interval between the first and last photons
which went into the successful trigger criteria.  The units are milli-seconds.

The "trig_index" is the index value of the trigger criterion that provided
the successful trigger (precise definition is TBD).

The "trig_id" field contains (a) flag bits on the type of solution
that was found on-board and (b) flag bits that are assigned in the GCN ground-processing.
The bit packing of the "trig_id" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        F     G-vs-L         0=BurstID_from_GBM, 1=from_LAT
1        F     gam_used       0=all gammas used, or 1=only gammas above a cut used inloc method
2-4      -     spare          spare for future use
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-27     -     spare          spare for future use
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30-31    -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
2^0     When this bit is a 1, then a Repoint_Request was made to the s/c.
2^1-10  spare.
2^11    When this bit is a 1, it indicates that 1 (or more) of the RA,Dec values
        were out of valid range (eg RA was 361 deg).
2^12    spare.
2^13    When this bit is a 1, it indicates that this position is near (less than 0.3deg)  a bright star (mag less than 6.5).
2^14    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the position error radius
        is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
        is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-31 spare.

The "rec_seq_num" is the Record Sequence Number.  It is a packet serial number
spanning all the messages that come from the s/c during a given trigger.
It will start with a value of 1 for the FERMI_GBM_ALERT Notice and increment during 
the multiple GBM_POS Notices, etc.

The "temp_stat" is the measure of the temporal test statistic.
The value is 4*(-log10(temporal_probability)).  The bigger the number,
the more likely the trigger is a real GRB.  The Fermi-LAT team
has determined that sum of the Temporal and Image Stats >120 is a good working threshold.

The "image_stat" is the measure of the image test statistic.
The value is 4*(-log10(spatial_probability)).  The bigger the number,
the more likely the trigger is a real GRB.  The Fermi-LAT team
has determined that sum of the Temporal and Image Stats >120 is a good working threshold.

There are a total of 21(tbr) "spare" items in the packet (usually filled
with zeros).  They are located at items 12-13, 15, 20 and 22-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=122 PACKET CONTENTS:

The FERMI_LAT_GRB_POS_DIAG packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=122)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       trig_tjd     [days]          Truncated Julian Day
long         6       trig_sod     [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_inten  [counts]        Num events during trig window, 0 to inf
long         10      inten_4      4_bytes         Evt_cnts in 4 energy bands
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12-13   spare[2]     integer         8 bytes for the future //poss phi,theta
long         14      int_time     [msec]          Integration time
long         15-16   spare[2]     integer         8 bytes for the future
long         17      trig_index   integer         Trigger index
long         18      Trig_ID      bits            LAT burst candidate, 1=yes,0=no
long         19      misc         bits            Misc stuff packed in here
long         20      rec_seq_num  integer         SerNum of the messages (1-~40)
long         21-24   spare[4]     integer         16 bytes for the future
long         25      temp_stat    integer         (int)(4*(-log10(probability)))
long         26      image_stat   integer         (int)(4*(-log10(probability)))
long         27-38   spare[12]    integer         48 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 120, 121, 122, and 123;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
120 = FERMI_LAT_GRB_POS_INI, 121 = FERMI_LAT_POS_UPD. 
122 = FERMI_LAT_GRB_POS_DIAG, and 123 = FERMI_LAT_TRANS.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the trig_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of seconds since 01 Jan 2001.

The "trig_tjd" is the Truncated Julian Day of the FERMI-LAT trigger,
eg. TJD=14466 is 01 Jan 2008.

The "trig_sod" is the UT seconds-of-day (SOD) of the FERMI-LAT trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized). The trigger time can be off by TBD msec.  This uncertainty
is governed by the variable trigger window duration, which is defined in terms
of a fixed number of events rather than an interval of time.

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the LAT flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "burst_inten" is the total number of events in the standard 4 energy bands
during the 'int_time' time interval of the reporting time to date.

The "inten_4" contains 4 unsigned_char counts of the number of events
in the standard 4 energy bands during the 'int_time' interval.
The lsb contains the number of events in the 0-100 MeV band,
the next lsb contains number of events in the 100MeV-1GeV band,
3rd has 1-10GeV, and the msb has the number of events in the greater_than_10GeV band.

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).

//The "phi" and "theta" is the location of the source in LAT instrument coordinates.
//Theta is the angle off the bore sight.  And phi is the azimuthal angle
//with 0 starting at..... measured CW(tbd)....

The "int_time" is the time interval between the first and last photons
which went into the successful trigger criteria.  The units are milli-seconds.

The "trig_index" is the index value of the trigger criterion that provided
the successful trigger (precise definition is TBD).

The "trig_id" field contains (a) flag bits on the type of solution
that was found on-board and (b) flag bits that are assigned in the GCN ground-processing.
The bit packing of the "trig_id" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        F     G-vs-L         0=BurstID_from_GBM, 1=from_LAT
1        F     gam_used       0=all gammas used, or 1=only gammas above a cut used inloc method
2-4      -     spare          spare for future use
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-27     -     spare          spare for future use
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30-31    -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
2^0     When this bit is a 1, then a Repoint_Request was made to the s/c.
2^1-10  spare.
2^11    When this bit is a 1, it indicates that 1 (or more) of the RA,Dec values
        were out of valid range (eg RA was 361 deg).
2^12    spare.
2^13    When this bit is a 1, it indicates that this position is near (less than 0.3deg)  a bright star (mag less than 6.5).
2^14    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the position error radius
        is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
        is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-31  spare.

The "rec_seq_num" is the Record Sequence Number.  It is a packet serial number
spanning all the messages that come from the s/c during a given trigger.
It will start with a value of 1 for the FERMI_GBM_ALERT Notice and increment during 
the multiple GBM_POS Notices, etc.

The "temp_stat" is the measure of the temporal test statistic.
The value is 4*(-log10(temporal_probability)).  The bigger the number,
the more likely the trigger is a real GRB.  The Fermi-LAT team
has determined that sum of the Temporal and Image Stats >120 is a good working threshold.

The "image_stat" is the measure of the image test statistic.
The value is 4*(-log10(spatial_probability)).  The bigger the number,
the more likely the trigger is a real GRB.  The Fermi-LAT team
has determined that sum of the Temporal and Image Stats >120 is a good working threshold.

There are a total of 21(tbr) "spare" items in the packet (usually filled
with zeros).  They are located at items 12-13, 15, 20 and 22-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=123 PACKET CONTENTS:

The FERMI_LAT_TRANS packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=123)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       trig_tjd     [days]          Truncated Julian Day
long         6       trig_sod     [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_inten  [counts]        Num events during trig window, 0 to inf
long         10      inten_4      4_bytes         Evt_cnts in 4 energy bands
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12-13   spare[2]     integer         8 bytes for the future //poss phi,theta
long         14      int_time     [msec]          Integration time
long         15-16   spare[2]     integer         8 bytes for the future
long         17      trig_index   integer         Trigger index
long         18      Trig_ID      bits            LAT burst candidate, 1=yes,0=no
long         19      misc         bits            Misc stuff packed in here
long         20      rec_seq_num  integer         SerNum of the messages (1-~40)
long         21-24   spare[4]     integer         16 bytes for the future
long         25      temp_stat    integer         (int)(4*(-log10(probability)))
long         26      image_stat   integer         (int)(4*(-log10(probability)))
long         27-38   spare[12]    integer         48 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 120, 121, 122, and 123;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
120 = FERMI_LAT_GRB_POS_INI, 121 = FERMI_LAT_POS_UPD. 
122 = FERMI_LAT_GRB_POS_DIAG, and 123 = FERMI_LAT_TRANS.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the trig_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of seconds since 01 Jan 2001.

The "trig_tjd" is the Truncated Julian Day of the FERMI-LAT trigger,
eg. TJD=14466 is 01 Jan 2008.

The "trig_sod" is the UT seconds-of-day (SOD) of the FERMI-LAT trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized). The trigger time can be off by TBD msec.  This uncertainty
is governed by the variable trigger window duration, which is defined in terms
of a fixed number of events rather than an interval of time.

The "trans_ra" and "trans_dec" are the RA,Dec coordinates of the transient
as determined by the LAT flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "burst_inten" is the total number of events in the standard 4 energy bands
during the 'int_time' time interval of the reporting time to date.

The "inten_4" contains 4 unsigned_char counts of the number of events
in the standard 4 energy bands during the 'int_time' interval.
The lsb contains the number of events in the 0-100 MeV band,
the next lsb contains number of events in the 100MeV-1GeV band,
3rd has 1-10GeV, and the msb has the number of events in the greater_than_10GeV band.

The "trans_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).

//The "phi" and "theta" is the location of the source in LAT instrument coordinates.
//Theta is the angle off the bore sight.  And phi is the azimuthal angle
//with 0 starting at..... measured CW(tbd)....

The "int_time" is the time interval between the first and last photons
which went into the successful trigger criteria.  The units are milli-seconds.

The "trig_index" is the index value of the trigger criterion that provided
the successful trigger (precise definition is TBD).

The "trig_id" field contains (a) flag bits on the type of solution
that was found on-board and (b) flag bits that are assigned in the GCN ground-processing.
The bit packing of the "trig_id" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        F     G-vs-L         0=BurstID_from_GBM, 1=from_LAT
1        F     gam_used       0=all gammas used, or 1=only gammas above a cut used inloc method
2-4      -     spare          spare for future use
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-27     -     spare          spare for future use
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30-31    -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
2^0     When this bit is a 1, then a Repoint_Request was made to the s/c.
2^1-10  spare.
2^11    When this bit is a 1, it indicates that 1 (or more) of the RA,Dec values
        were out of valid range (eg RA was 361 deg).
2^12    spare.
2^13    When this bit is a 1, it indicates that this position is near (less than 0.3deg)  a bright star (mag less than 6.5).
2^14    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the position error radius
        is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
        is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^1-31  spare.

The "rec_seq_num" is the Record Sequence Number.  It is a packet serial number
spanning all the messages that come from the s/c during a given trigger.
It will start with a value of 1 for the FERMI_GBM_ALERT Notice and increment during 
the multiple GBM_POS Notices, etc.

The "temp_stat" is the measure of the temporal test statistic.
The value is 4*(-log10(temporal_probability)).  The bigger the number,
the more likely the trigger is a real GRB.  The Fermi-LAT team
has determined that sum of the Temporal and Image Stats >120 is a good working threshold.

The "image_stat" is the measure of the image test statistic.
The value is 4*(-log10(spatial_probability)).  The bigger the number,
the more likely the trigger is a real GRB.  The Fermi-LAT team
has determined that sum of the Temporal and Image Stats >120 is a good working threshold.

There are a total of 21(tbr) "spare" items in the packet (usually filled
with zeros).  They are located at items 12-13, 15, 20 and 22-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.




TYPE=124 PACKET CONTENTS:

The FERMI_LAT_GRB_POS_TEST packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=124)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       trig_tjd     [days]          Truncated Julian Day
long         6       trig_sod     [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_inten  [counts]        Num events during trig window, 0 to inf
long         10      inten_4      4_bytes         Evt_cnts in 4 energy bands
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12-13   spare[2]     integer         8 bytes for the future //poss phi,theta
long         14      int_time     [msec]          Integration time
long         15-16   spare[2]     integer         8 bytes for the future
//long       16      lon_lat      2_shorts        (int)(Longitude,Lattitude *100)
long         17      trig_index   integer         Trigger index
long         18      Trig_ID      bits            LAT burst candidate, 1=yes,0=no
long         19      misc         bits            Misc stuff packed in here
long         20      rec_seq_num  integer         SerNum of the messages (1-~40)
long         21-24   spare[4]     integer         16 bytes for the future
long         25      temp_signif  integer         (int)(4*(-log10(probability)))
long         26      image_signif integer         (int)(4*(-log10(probability)))
long         27-38   spare[12]    integer         48 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 120, 121, 122, 123, and 124;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
120 = FERMI_LAT_GRB_POS_INI, 121 = FERMI_LAT_POS_UPD. 
122 = FERMI_LAT_GRB_POS_DIAG, 123 = FERMI_LAT_TRANS, and
124 = FERMI_LAT_GRB_POS_TEST.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the trig_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of seconds since 01 Jan 2001.
But for this test notice type, it is hardwired to be a fixed value of 99999.

The "trig_tjd" is the Truncated Julian Day of the FERMI-LAT trigger,
eg. TJD=14466 is 01 Jan 2008.

The "trig_sod" is the UT seconds-of-day (SOD) of the FERMI-LAT trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized). The trigger time can be off by TBD msec.  This uncertainty
is governed by the variable trigger window duration, which is defined in terms
of a fixed number of events rather than an interval of time.

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the LAT flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "burst_inten" is the total number of events in the standard 4 energy bands
during the 'int_time' time interval of the reporting time to date.

The "inten_4" contains 4 unsigned_char counts of the number of events
in the standard 4 energy bands during the 'int_time' interval.
The lsb contains the number of events in the 0-100 MeV band,
the next lsb contains number of events in the 100MeV-1GeV band,
3rd has 1-10GeV, and the msb has the number of events in the greater_than_10GeV band.

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).

//The "phi" and "theta" is the location of the source in LAT instrument coordinates.
//Theta is the angle off the bore sight.  And phi is the azimuthal angle
//with 0 starting at..... measured CW(tbd)....

The "int_time" is the time interval between the first and last photons
which went into the successful trigger criteria.  The units are milli-seconds.

The "trig_index" is the index value of the trigger criterion that provided
the successful trigger (precise definition is TBD).

The "trig_id" field contains (a) flag bits on the type of solution
that was found on-board and (b) flag bits that are assigned in the GCN ground-processing.
The bit packing of the "trig_id" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        F     G-vs-L         0=BurstID_from_GBM, 1=from_LAT
1        F     gam_used       0=all gammas used, or 1=only gammas above a cut used inloc method
2-4      -     spare          spare for future use
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-27     -     spare          spare for future use
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30-31    -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
2^0     When this bit is a 1, then a Repoint_Request was made to the s/c.
2^1-10  spare.
2^11    When this bit is a 1, it indicates that 1 (or more) of the RA,Dec values
        were out of valid range (eg RA was 361 deg).
2^12    spare.
2^13    When this bit is a 1, it indicates that this position is near (less than 0.3deg)  a bright star (mag less than 6.5).
2^14    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the position error radius
        is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
        is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^1-31  spare.

The "rec_seq_num" is the Record Sequence Number.  It is a packet serial number
spanning all the messages that come from the s/c during a given trigger.
It will start with a value of 1 for the FERMI_GBM_ALERT Notice and increment during 
the multiple GBM_POS Notices, etc.

The "temp_stat" is the measure of the temporal test statistic.
The value is 4*(-log10(temporal_probability)).  The bigger the number,
the more likely the trigger is a real GRB.  The Fermi-LAT team
has determined that sum of the Temporal and Image Stats >120 is a good working threshold.

The "image_stat" is the measure of the image test statistic.
The value is 4*(-log10(spatial_probability)).  The bigger the number,
the more likely the trigger is a real GRB.  The Fermi-LAT team
has determined that sum of the Temporal and Image Stats >120 is a good working threshold.

There are a total of 21(tbr) "spare" items in the packet (usually filled
with zeros).  They are located at items 12-13, 15, 20 and 22-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=125 PACKET CONTENTS:

The FERMI_OBS_REQUEST packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=125)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       point_tjd    [days]          Truncated Julian Day
long         6       point_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       point_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       point_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9-12    spare[4]     integer         16 bytes for the future
long         13      dwell_time   [centi-sec]     (int)(sssss.sss *100)
long         14-18   spare[5]     integer         20 bytes for the future
long         19      misc         bits            Misc stuff packed in here
long         20-38   spare[19]    integer         76 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 125,
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the point_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of seconds since 01 Jan 2001.

The "point_tjd" is the Truncated Julian Day of the FERMI-LAT request to the s/c
to repoint to the newly detected target by the LAT (ie an autonomous report request (ARR),
eg. TJD=14466 is 01 Jan 2008.

The "point_sod" is the UT seconds-of-day (SOD) of the FERMI-LAT request to the s/c
to repoint to the newly detected target by the LAT (ie an autonomous report request (ARR),
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "point_ra" and "point_dec" are the RA,Dec coordinates of the request
as determined by the LAT flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "dwell_time" is the observation duration of the request.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "misc" field contains miscellaneous flag bits.
2^0-10  spare.
2^11    When this bit is a 1, it indicates that 1 (or more) of the RA,Dec values
        were out of valid range (eg RA was 361 deg).
2^12-29 spare.
2^30    When this bit is a 1, then this Notice was ground-generated; else flight-generated.
        A Gnd-generated Notice is issued anytime humans during ground operations
        have determined if this Notice should be issued.
2^31    spare.

There are a total of ?? "spare" items in the packet (usually filled
with zeros).  They are located at items (TBR)9-14, 20, and 22-37.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=126 PACKET CONTENTS:

The FERMI_SC_SLEW packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=126)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       point_tjd    [days]          Truncated Julian Day
long         6       point_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       point_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       point_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9-12    spare[2]     integer         8 bytes for the future
long         13      dwell_time   [centi-sec]     (int)(sssss.sss *100)
long         14-18   spare[5]     integer         20 bytes for the future
long         19      misc         bits            Misc stuff packed in here
long         20-38   spare[19]    integer         76 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 126
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the point_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of seconds since 01 Jan 2001.

The "point_tjd" is the Truncated Julian Day of the FERMI-LAT request to the s/c
to repoint to the newly detected target by the LAT (ie an autonomous report request (ARR),
eg. TJD=14466 is 01 Jan 2008.

The "point_sod" is the UT seconds-of-day (SOD) of the FERMI-LAT request to the s/c
to repoint to the newly detected target by the LAT (ie an autonomous report request (ARR),
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "point_ra" and "point_dec" are the RA,Dec coordinates of the request
as determined by the LAT flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "dwell_time" is the observation duration of the request.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized).

The "misc" field contains miscellaneous flag bits.
2^0-10  spare.
2^11    When this bit is a 1, it indicates that 1 (or more) of the RA,Dec values
        were out of valid range (eg RA was 361 deg).
2^12-29 spare.
2^30    When this bit is a 1, then this Notice was ground-generated; else flight-generated.
        A Gnd-generated Notice is issued anytime humans during ground operations
        have determined if this Notice should be issued.
2^31    spare.

There are a total of 19(tbr) "spare" items in the packet (usually filled
with zeros).  They are located at items (tbr)10-12, 15-16, 20, and 25-37.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.



TYPE=127 PACKET CONTENTS:

The FERMI_LAT_GND_REF packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=127)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       trig_tjd     [days]          Truncated Julian Day
long         6       trig_sod     [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       burst_inten  [counts]        Num events during trig window, 0 to inf
long         10      inten_4      4_bytes         Evt_cnts in 4 energy bands
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12-13   spare[2]     integer         8 bytes for the future //poss phi,theta
long         14      int_time     [msec]          Integration time
long         15-16   spare[2]     integer         8 bytes for the future
//long       16      lon_lat      2_shorts        (int)(Longitude,Lattitude *100)
long         17      trig_index   integer         Trigger index
long         18      Trig_ID      bits            LAT burst candidate, 1=yes,0=no
long         19      misc         bits            Misc stuff packed in here
long         20-24   spare[5]     integer         20 bytes for the future
long         25      temp_stat    integer         (int)(4*(-log10(probability)))
long         26      image_stat   integer         (int)(4*(-log10(probability)))
long         27-38   spare[12]    integer         48 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 120, 121, 122, and 123;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
120 = FERMI_LAT_GRB_POS_INI, 121 = FERMI_LAT_POS_UPD. 
122 = FERMI_LAT_GRB_POS_DIAG, and 123 = FERMI_LAT_TRANS.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the trig_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of seconds since 01 Jan 2001.

The "trig_tjd" is the Truncated Julian Day of the FERMI-LAT trigger,
eg. TJD=14466 is 01 Jan 2008.

The "trig_sod" is the UT seconds-of-day (SOD) of the FERMI-LAT trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized). The trigger time can be off by TBD msec.  This uncertainty
is governed by the variable trigger window duration, which is defined in terms
of a fixed number of events rather than an interval of time.

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the LAT flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "burst_inten" is the total number of events in the standard 4 energy bands
during the 'int_time' time interval of the reporting time to date.

The "inten_4" contains 4 unsigned_char counts of the number of events
in the standard 4 energy bands during the 'int_time' interval.
The lsb contains the number of events in the 0-100 MeV band,
the next lsb contains number of events in the 100MeV-1GeV band,
3rd has 1-10GeV, and the msb has the number of events in the greater_than_10GeV band.

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).

//The "phi" and "theta" is the location of the source in LAT instrument coordinates.
//Theta is the angle off the bore sight.  And phi is the azimuthal angle
//with 0 starting at..... measured CW(tbd)....

The "int_time" is the time interval between the first and last photons
which went into the successful trigger criteria.  The units are milli-seconds.

The "trig_index" is the index value of the trigger criterion that provided
the successful trigger (precise definition is TBD).

The "trig_id" field contains (a) flag bits on the type of solution
that was found on-board and (b) flag bits that are assigned in the GCN ground-processing.
The bit packing of the "trig_id" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        F     G-vs-L         0=BurstID_from_GBM, 1=from_LAT
1        F     gam_used       0=all gammas used, or 1=only gammas above a cut used inloc method
2-27     -     spare          spare for future use
28       G     spatial_coinc  0=No or 1=Yes, there was a spatial coincidence with another event
29       G     temporal_coinc 0=No or 1=Yes, there was a temporal coincidence with another event
30-31    -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
2^0     When this bit is a 1, then a Repoint_Request was made to the s/c.
2^1-12  spare.
2^13    When this bit is a 1, it indicates that this position is near (less than 0.3deg)  a bright star (mag less than 6.5).
2^14    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the position error radius
        is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
        is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-31  spare.

The "temp_stat" is the measure of the temporal test statistic.
The value is 4*(-log10(temporal_probability)).  The bigger the number,
the more likely the trigger is a real GRB.  The Fermi-LAT team
has determined that sum of the Temporal and Image Stats >120 is a good working threshold.

The "image_stat" is the measure of the image test statistic.
The value is 4*(-log10(spatial_probability)).  The bigger the number,
the more likely the trigger is a real GRB.  The Fermi-LAT team
has determined that sum of the Temporal and Image Stats >120 is a good working threshold.

There are a total of 21(tbr) "spare" items in the packet (usually filled
with zeros).  They are located at items 12-13, 15, 20 and 22-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.




TYPE=128 PACKET CONTENTS:

The FERMI_LAT_GND_TRIG packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=128)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       trig_tjd     [days]          Truncated Julian Day
long         6       trig_sod     [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9-10    spare[2]     integer         8 bytes for the future
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12      phi          [centi-deg]     (int)(0.0 to 359.9999 *100)
long         13      theta        [centi-deg]     (int)(0.0 to +100.0 *100)
long         14-17   spare[4]     integer         16 bytes for the future
long         18      Trig_ID      bits            LAT burst candidate, 1=yes,0=no
long         19      misc         bits            Misc stuff packed in here
long         20-25   spare[6]     integer         24 bytes for the future
long         26      trig_signif  integer         Triggger signifiance [centi-sigma]
long         27-38   spare[12]    integer         48 bytes for the future
long         39      pkt_term     integer         Pkt Termination (always = \n)


PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 120, 121, 122, and 123;
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).  The types are:
120 = FERMI_LAT_GRB_POS_INI, 121 = FERMI_LAT_POS_UPD. 
122 = FERMI_LAT_GRB_POS_DIAG, and 123 = FERMI_LAT_TRANS.

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the trig_sod (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "trig_num" is a uniquely identifying number for each trigger.
It is the number of seconds since 01 Jan 2001.

The "trig_tjd" is the Truncated Julian Day of the FERMI-LAT trigger,
eg. TJD=14466 is 01 Jan 2008.

The "trig_sod" is the UT seconds-of-day (SOD) of the FERMI-LAT trigger.
The units are in centi-seconds (ie the fl.pt. seconds were multiplied by 100
and then integerized). The trigger time can be off by TBD msec.  This uncertainty
is governed by the variable trigger window duration, which is defined in terms
of a fixed number of events rather than an interval of time.

The "burst_ra" and "burst_dec" are the RA,Dec coordinates of the burst (or transient)
as determined by the LAT flight software (J2000 epoch).  These intrinsically
floating point quantities have been multiplied by 10,000 and then integerized
to make an integer quantity with units of 0.0001-degrees.

The "burst_error" is the radius of the circle that will contain on average
TBD% of the bursts.  The units are 0.0001-degrees (ie the fl.pt. error was multiplied
by 10000 and then integerized).

The "phi" and "theta" is the location of the source in LAT instrument coordinates.
Theta is the angle off the bore sight.  And phi is the azimuthal angle
with 0 starting at..... measured CW(tbd)....

The "trig_id" field contains (a) flag bits on the type of solution
that was found on-board and (b) flag bits that are assigned in the GCN ground-processing.
The bit packing of the "trig_id" entry in the packet is:
BitNum  F-v-G  Item_name      Description
------  ----   ---------      -----------
0        F     G-vs-L         0=BurstID_from_GBM, 1=from_LAT
1        F     gam_used       0=all gammas used, or 1=only gammas above a cut used inloc method
2-4      -     spare          spare for future use
5        G     def_not_grb    0=No or 1=Yes, it is definitely not a GRB (a Retraction)
6-31     -     spare          spare for future use
The columns are:  "BitNum" is the 2^N location within the 4-byte word; "F-v-G" is Flight-assigned vs
Ground-assigned;  "Item_name" is the short-description name of the quantity;  and
"Description" is the longer description of the quantity.

The "misc" field contains miscellaneous flag bits.
2^0     When this bit is a 1, then a Repoint_Request was made to the s/c.
2^1-12  spare.
2^13    When this bit is a 1, it indicates that this position is near (less than 0.3deg)  a bright star (mag less than 6.5).
2^14    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the position error radius
        is smaller than the galaxy radius.  This position is inside the (circularized) NGC galaxy (or nearly in).
2^15    When this bit is a 1, it indicates that the distance between the position and the center of the galaxy
        is less than the sum of the position error radius and the galaxy radius AND that the galaxy radius
        is smaller than the position error radius.  This galaxy is inside the position error circle (or nearly in).
2^16-29 spare.
2^30    When this bit is a 1, then this Notice was ground-generated; else flight-generated.
        A Gnd-generated Notice is issued anytime humans during ground operations
        have determined if this Notice should be issued.
2^31    spare.


The "trig_signif" is the significance level of the detection.
This is the signal/noise (ie number of sigma) of the detection
multiplied by 100 and then integerized (ie units are centi-sigma).


There are a total of 21(tbr) "spare" items in the packet (usually filled
with zeros).  They are located at items 12-13, 15, 20 and 22-38.

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.





TYPE=129 PACKET CONTENTS:

The FERMI_POINTDIR packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=129)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       -
long         5       start_tjd    [days]          Truncated Julian Day
long         6       start_sod    [centi-sec]     (int)(sssss.sss *100)
long         7       start_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       start_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9       delta_t      [sec]           Typically 120 sec
long         10      ra_dec_1dt   [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         11      ra_dec_2dt   [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         12      ra_dec_3dt   [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         13      ra_dec_4dt   [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         14      ra_dec_5dt   [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         15      ra_dec_6dt   [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         16      ra_dec_7dt   [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         17      ra_dec_8dt   [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         18      ra_dec_9dt   [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         19      ra_dec_10dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         20      ra_dec_11dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         21      ra_dec_12dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         22      ra_dec_13dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         23      ra_dec_14dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         24      ra_dec_15dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         25      ra_dec_16dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         26      ra_dec_17dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         27      ra_dec_18dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         28      ra_dec_19dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         29      ra_dec_20dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         30      ra_dec_21dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         31      ra_dec_22dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         32      ra_dec_23dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         33      ra_dec_24dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         34      ra_dec_25dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         35      ra_dec_26dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         36      ra_dec_27dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         37      ra_dec_28dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         38      ra_dec_29dt  [two 0.1-deg]   (int)(RA*10) in Hi, (int)(Dec*10) in Lo
long         39      pkt_term     integer         Pkt Termination (always = \n)

PACKET ITEM DESCRIPTIONS:

The "pkt_type" is an integer with a value of 129
that tells which type of packet this is and therefore what the contents are
(the contents change between the various types).

The "pkt_sernum" is the serial number for that packet type.  Each packet type
has its own sequential serial numbering.  They all start at 1
when the GCN program starts up.

The "pkt_hop_cnt" is a sequential numbering scheme that is incremented by 1
for each machine that the packet passes through (starting from 0 on the
machine of origin -- sometimes PK and sometimes capella).  It is used
in checking the hand-shake processing through the PK, CC, and capella machines
within the GCN system.  Since the loss of GRO (May 2000), and therefore
the elimination of the PK and CC front-end processors, this hopcount item
is defunct -- all packets start on capella with a hopcount value of 0.

The "pkt_sod" is UT seconds-of-day when the packet was created/sent from
the GCN computer.  Do not confuse this with the "start_sod" (see below).
The value is multiplied by 100 and integerized (i.e. the units are centi-sec; 10 msec).

The "start_tjd" is the Truncated Julian Day of the of the first RA,Dec pointing sample
(ie "point_ra" and "point_dec").

The "start_sod" is the UT seconds-of-day (SOD) of the first RA,Dec pointing sample
(ie "point_ra" and "point_dec").  The units are in centi-seconds (ie the fl.pt. seconds
were multiplied by 100 and then integerized).

The "point_ra" and "point_dec" are the RA,Dec pointing coordinates of FERMI
at the time specified by "start_tjd" and "start_sod".  J2000 epoch.
These intrinsically floating point quantities have been multiplied by 10,000
and then integerized to make an integer quantity with units of 0.0001-degrees.

The "delta_time" is the amount of time between the ra,dec pointing samples.
The units are integer seconds.  (It is believed that this value will always
be 120 sec, but do not count on it, ie have your software check the delta_time value
for every packet received.)

The "saa_ra_dec_Ndt" are a series of 29 (N=1 to 29) SAA_flag,RA,Dec values
for the FERMI s/c pointing sampled every "delta_time" sec (SAA_flag indicates
the s/c is inside the SAA region, and the RA,Dec values (J2000) are the pointing
direction of the LAT instrument).  Example:
"saa_ra_dec_1dt" is the SAA_flag,RA,Dec pointing at "start_sod+1*delta_time";
"saa_ra_dec_2dt" would be the pointing direction at "start_sod+2*delta_time"; etc.
The SAA,RA,Dec values are packed into a single 4-byte slot.
The SAA_flag occurpies the 2^31 bit, RA occupies bits 30-16, and the Dec
is in the lower 2 bytes (bits 15-0).
The RA,Dec values are in units of deci-degrees (ie the fl.pt. degress
were multiplied by 10 and then intergerized).

The "pkt_term" is the packet termination character.  It is an ASCII
newline (decimal value 10) in the last byte of the last 4-byte long
in the packet.  This highly specialized termination character was required
by the firewall machine at LLNL in the very early days of operation.
It has since become a permanent fixture as multiple sites are now operating,
and it is not wise to play with format/content changes.  And it still
does function as a fixed-content termination value for validity checking.




TYPE=130 PACKET CONTENTS:

This packet is for GCN programs internal use only.  The packet is never itself
distributed to socket sites.  This packet is used to signal to the GCN programs
to produce the full-format email Notice (to got to sites requesting that Notice
Type and format).

The SIMBAD-NED packet consists of 40 four-byte quantities.
The order and contents are listed in the table below:

Declaration  Index   Item         Units           Comments
Type                 Name
-----------  -----   ---------    ----------      ----------------
long         0       pkt_type     integer         Packet type number (=130)
long         1       pkt_sernum   integer         1 thru infinity
long         2       pkt_hop_cnt  integer         Incremented by each node
long         3       pkt_sod      [centi-sec]     (int)(sssss.sss *100) 
long         4       trig_num     integer         Trigger number
long         5       trig_tjd     [days]          Truncated Julian Day
long         6       trig_sod     [centi-sec]     (int)(sssss.sss *100)
long         7       burst_ra     [0.0001-deg]    (int)(0.0 to 359.9999 *10000)
long         8       burst_dec    [0.0001-deg]    (int)(-90.0 to +90.0 *10000)
long         9-10    spare[2]     integer         8 bytes for the future
long         11      burst_error  [0.0001-deg]    (int)(0.0 to 180.0 *10000)
long         12      otype        integer         Original Type number
long         13-21   spare[2]     integer         8 bytes for the future
long         22      fname        char            Filename
long         39      pkt_term     integer         Pkt Termination (always = \n)

[tbd]



================================================================================

COORDINATES EPOCH and QUANTIZATION COMPARISON:

The table below contains the epochs used for the various RA,Dec locations
given within the various packets within the entire GCN socket_packet process.
This table gives a rapid comparison, and allows the "pattern" of epoch-usage
to be seen (granted, there are two exceptions to this "pattern").  Current epoch
was used in the early days of operations when there was only the
BATSE-based Position Notices, and then when other sources came into existance
the Current epoch pattern was maintained for the "center locations".
But since some of these other sources also had other RA,Dec coordinate
information (notably the center of an IPN annulus), which were historically
reported in J2000 epoch, that precident was then followed.  With the addition
of the Swift Notices, the J2000 convention has been maintained.

The table also contains the quantization factors for each set of coordinates
locations in the various packets (centers and corners, etc).  The quantization
in the value in angular degrees in each integerized coordinate location
(i.e. the value in the packet is (int)(value/quant) ).


TYPE#    SOURCE_TYPE             CENTER_LOC  CORNERS_LOC    CENTER_LOC  CORNERS_LOC
NUMBER   TYPE                    EPOCH       EPOCH          QUANT       QUANT
 
 1       BATSE_ORIGINAL          Current     n/a            0.01        n/a
 2       Test                    Current     n/a            0.01        n/a
11       BATSE_MAXBC             Current     n/a            0.01        n/a
22       BATSE_FINAL             Current     n/a            0.01        n/a
24       BATSE_LOCBURST          Current     n/a            0.01        n/a
25       ALEXIS                  Current     n/a            0.01        n/a
27       XTE-PCA                 Current     n/a            0.0001      n/a
29       XTE-ASM                 Current     J2000          0.0001      0.0001
30       COMPTEL                 J2000 (1)   J2000          0.01        0.01
31       IPN_RAW                 J2000       J2000          0.0001      0.0001
32       IPN_SEGMENT             J2000 (2)   J2000 (3)      0.0001      0.0001
34       SAX-WFC                 Current     n/a            0.0001      n/a
36       SAX-NFI                 Current     n/a            0.0001      n/a
37       ASM_XTRANS              Current     J2000          0.0001      0.0001
39       IPN_POSITION            Current     J2000          0.0001      0.0001
41       HETE_S/C_UPDATE         Current     J2000          0.0001      0.0001
42       HETE_S/C_LAST           Current     J2000          0.0001      0.0001
43       HETE_GNDANA             Current     J2000          0.0001      0.0001
44       HETE_Test               Current     J2000          0.0001      0.0001
45       GRB_COUNTERPART         J2000 (4)   n/a            0.0001      n/a
53       INTEGRAL_WAKEUP         Current     n/a            0.0001      n/a
54       INTEGRAL_REFINED        Current     n/a            0.0001      n/a
55       INTEGRAL_OFFLINE        Current     n/a            0.0001      n/a
57       SNEWS                   J2000 (4)   n/a            0.0001      n/a
58       MILAGRO                 J2000 (4)   n/a            0.0001      n/a
61       SWIFT_BAT_GRB_POS       J2000 (5)   n/a            0.0001      n/a
62       SWIFT_BAT_GRB_POS_NACK  n/a         n/a            n/a         n/a
63       SWIFT_BAT_GRB_LC        J2000 (5)   n/a            0.0001      n/a
64       SWIFT_BAT_SCALEDMAP     J2000 (5)   n/a            0.0001      n/a
65       SWIFT_FOM_OBS           J2000 (5)   n/a            0.0001      n/a
66       SWIFT_SC_SLEW           J2000 (5)   n/a            0.0001      n/a
67       SWIFT_XRT_POS           J2000 (5)   n/a            0.0001      n/a
68       SWIFT_XRT_SPEC          J2000 (5)   n/a            0.0001      n/a
69       SWIFT_XRT_IMAGE         J2000 (5)   n/a            0.0001      n/a
70       SWIFT_XRT_LC            J2000 (5)   n/a            0.0001      n/a
71       SWIFT_XRT_NACK_POS      J2000 (5)   n/a            0.0001      n/a
72       SWIFT_UVOT_IMAGE        J2000 (5)   n/a            0.0001      n/a
73       SWIFT_UVOT_SRCLIST      J2000 (5)   n/a            0.0001      n/a
76       SWIFT_BAT_GRB_PROC_LC   J2000 (5)   n/a            0.0001      n/a
77       SWIFT_XRT_PROC_SPEC     J2000 (5)   n/a            0.0001      n/a
78       SWIFT_XRT_PROC_IMAGE    J2000 (5)   n/a            0.0001      n/a
79       SWIFT_UVOT_PROC_IMAGE   J2000 (5)   n/a            0.0001      n/a
80       SWIFT_UVOT_PROC_SLIST   J2000 (5)   n/a            0.0001      n/a
81       SWIFT_UVOT_POS          J2000 (5)   n/a            0.0001      n/a
82       SWIFT_BAT_GRB_POS_TEST  J2000 (5)   n/a            0.0001      n/a
83       SWIFT_POINDIR           J2000 (5)   n/a            0.0001      n/a
84       SWIFT_BAT_TRANS         J2000 (5)   n/a            0.0001      n/a
89       SWIFT_UVOT_POS_NACK     J2000 (5)   n/a            0.0001      n/a
98       SWIFT_BAT_SUBTHRESH_POS J2000 (5)   n/a            0.0001      n/a
99       SWIFT_BAT_SLEW_GRB_POS  J2000 (5)   n/a            0.0001      n/a
100      AGILE_GRB_POS_WAKEUP    J2000 (?)   n/a            0.0001      n/a
101      AGILE_GRB_POS_GROUND    J2000 (?)   n/a            0.0001      n/a
102      AGILE_GRB_POS_REFINED   J2000 (?)   n/a            0.0001      n/a
109      AGILE_GRB_POS_TEST      J2000 (?)   n/a            0.0001      n/a
110      FERMI_GBM_ALERT         J2000 (6)   n/a            0.0001      n/a
111      FERMI_GBM_FLT_POS       J2000 (6)   n/a            0.0001      n/a
112      FERMI_GBM_GND_POS       J2000 (6)   n/a            0.0001      n/a
113      FERMI_GBM_LC            J2000 (6)   n/a            0.0001      n/a
118      FERMI_GBM_TRANS         J2000 (6)   n/a            0.0001      n/a
119      FERMI_GBM_POS_TEST      J2000 (6)   n/a            0.0001      n/a
120      FERMI_LAT_GRB_POS_INI   J2000 (6)   n/a            0.0001      n/a
121      FERMI_LAT_GRB_POS_UPD   J2000 (6)   n/a            0.0001      n/a
122      FERMI_LAT_GRB_POS_DIAG  J2000 (6)   n/a            0.0001      n/a
123      FERMI_LAT_TRANS         J2000 (6)   n/a            0.0001      n/a
124      FERMI_LAT_GRB_POS_TEST  J2000 (6)   n/a            0.0001      n/a
125      FERMI_OBS_REQUEST       J2000 (6)   n/a            0.0001      n/a
126      FERMI_SC_SLEW           J2000 (6)   n/a            0.0001      n/a
127      FERMI_LAT_GND_REF       J2000 (6)   n/a            0.0001      n/a
128      FERMI_LAT_GND_TRIG      J2000 (6)   n/a            0.0001      n/a
129      FERMI_POINTDIR          J2000 (6)   n/a            0.0001 (7)  n/a
130      SIMBAD/NED_RESULTS      n/a         n/a            n/a         n/a


Notes:
(1) J2000 is used for the "center" location which is in contradiction
to the rest of the packets in the system.  This deviation from standard practice
was an oversight on my part.
(2) J2000 is used for both the "center of the IPN annulus" location
and for the "maximum probability" location.  This "center of the annulus"
is not really the same kind of entity as the "center of burst" locations
in the rest of the GCN packets.  However, the "max prob" is essentially
the same kind of entity as the "center of burst" locations
in the rest of the GCN packets.  This deviation from standard practice
was an oversight on my part.
(3) J2000 is used for the "1,2,3-sigma" locations along the IPN segment
(which is the closest matchup to the "corners of a box" locations
of the other Notices types).
(4) J2000 is used for all the GRB_COUNTERPART, SNEWS and MILAGRO RA,Dec positions
because that is the new standard epoch being used.  The switch from Current
to J2000 is being motivated by the Swift mission.
(5) J2000 is used for all the Swift RA,Dec positions/pointings/etc
because that is the native epoch used by the mission, and if I converted it
back to Current epoch to be consistant with all the prior GCN packets contents
then the conversion would introduce errors comparable to the uncertainties
in the NFI-based positions (especially the UVOT positions which are 0.3arcsec).
(6) J2000 is used for all the FERMI RA,Dec positions/pointings/etc
because that is the new standard epoch being used within GCN.
(7) The Initial/Starting RA,Dec Pointing Direction is quantized at 0.0001 deg,
but the 29 RA,Dec values into the future are quantized at 0.1 deg.


Return to GCN (BACODINE) homepage.
This file was last modified on 07-Mar-09.