NAME
GCN::Packet::Parse - module which parses valid GCN binary messages
SYNOPSIS
$message = new Astro::GCN::Parse( Packet => $packet );
DESCRIPTION
The module parses incoming GCN binary packet and parses it, it will correct parse TYPE_IM_ALIVE and all (most?) SWIFT related packets.
REVISION
$Id: Parse.pm,v 1.1.1.1 2005/05/03 19:23:00 voevent Exp $
METHODS
Constructor
- new
-
Create a new instance from a hash of options
$message = new Astro::GCN::Parse( Packet => $packet );
returns a reference to an message object.
Accessor Methods
- type
-
Return the packet type
$pkt_type = $message->type();
- serial_number
-
Return the packet serial number
$pkt_sernum = $message->serial_number();
- hop_count
-
Return the packet hop count which is incremented by each node
$pkt_hop_cnt = $message->hop_count();
- gcn_sod
-
Return the time (seconds of day) when the packet was sent from the GCN.
$sod = $message->gcn_sod();
- is_swift
-
Returns true if the packet originates from SWIFT, or undef if not
if ( defined $message->is_swift() ) { . . . }
- trigger_num
-
Return the trigger number (SWIFT packets only)
$trigger_num = $message->trigger_num();
- obs_num
-
Return the obs number (SWIFT packets only)
$obs_num = $message->obs_num();
- tjd
-
Return the truncated Julian Date of the observation. The precise defintion of this varies depending on the type of the original packet.
$julian_date = $message->tjd();
For now this method will only return a value for SWIFT packets.
- data_sod
-
Return the time (seconds of day) when the data originated at the instrument. The precise defintion of this varies depending on the type of the original packet.
$sod = $message->data_sod();
For now this method will only return a value for SWIFT packets.
- ra
-
Return the RA in "hh mm ss.ss" format. The precise defintion of this varies depending on the type of the original packet.
$ra = $message->ra();
For now this method will only return a value for SWIFT packets.
- dec
-
Return the Declination in "+dd mm ss.ss" format. The precise defintion of this varies depending on the type of the original packet.
$dec = $message->dec();
For now this method will only return a value for SWIFT packets.
- burst_error
-
Return the error in RA & Declination in arc minutes. The precise defintion of the original values of RA & Declination will vary depending on the type of the original packet.
$error = $message->burst_error();
For now this method will only return a value for the relevant SWIFT packets, these being types 61, 67, 81 and 84.
- ra_degrees
-
Return the RA in degrees. The precise defintion of this varies depending on the type of the original packet.
$ra = $message->ra_degrees();
For now this method will only return a value for SWIFT packets.
- dec_degrees
-
Return the Declination in degrees. The precise defintion of this varies depending on the type of the original packet.
$dec = $message->dec_degrees();
For now this method will only return a value for SWIFT packets.
- burst_error_degrees
-
Return the error in RA & Declination in degrees. The precise defintion of the original values of RA & Declination will vary depending on the type of the original packet.
$error = $message->burst_error_degrees();
For now this method will only return a value for the relevant SWIFT packets, these being types 61, 67, 81 and 84.
- solution_status
-
Return the type of solution for relevant BAT messages.
$soln_status = $message->solution_status();
This method will only return a value for the relevant SWIFT packets, these being types 61, 62, 82 and 84.
- bat_ipeak
-
Return the height of the peak in the sky-image plane in counts
$error = $message->burst_error();
This is valid for SWIFT BAT only (packet types 61 or 82)
- uvot_mag
-
Return the magnitude of the SWIFT UVOT pointing
$error = $message->uvot_mag();
This is valid for SWIFT UVOT only (packet types 81)
General Methods
- configure
-
Configures the object, takes an options hash as an argument
$message->configure( %options );
Does nothing if the hash is not supplied. This is called directly from the constructor during object creation
- packet
-
Read the binary packet and convert,
$message->packet( $binary_packet );
takes the GCN native binary packet and converts to local format, then parses known packet types and makes the information available via the accessor methods.
COPYRIGHT
Copyright (C) 2005 University of Exeter. All Rights Reserved.
This program was written as part of the eSTAR project and is free software; you can redistribute it and/or modify it under the terms of the GNU Public License.
AUTHORS
Alasdair Allan <aa@astro.ex.ac.uk>,