Go to the documentation of this file.
2 from telemetry
import ccsdspy
7 __version__ =
'3.0.0_2024-02-26'
13 Given a CCSDSPY packet list, get the start or end time
17 all_packets : List of bytes
18 is_stime : True for start time, False for end time
25 range_order =
range(len(all_packets))
if is_stime
else reversed(
range(len(all_packets)))
29 packet = all_packets[i]
33 for k, v
in header.items():
37 if header[
'CCSDS_PACKET_LENGTH'] > 16378:
41 if len(data) < header[
'CCSDS_PACKET_LENGTH'] + 1:
44 if (header[
'CCSDS_SECONDARY_FLAG'] == 1
51 return time.strftime(
'%Y-%m-%dT%H:%M:%S.%f')
57 print(
"Running l0info_hkt (version: %s) \n" % __version__)
60 print(
"Reading PACE S-band data file.")
65 headerInfo = readFileHeader(fh)
68 if (headerInfo[
"SCID"] != b
"PACE"):
69 print(
'Not a valid PACE L0 file')
80 print(
"start_time=%s" % stime)
81 print(
"stop_time=%s" % etime)
84 output.write(
"start_time=%s\n" % stime)
85 output.write(
"stop_time=%s\n" % etime)
87 except Exception
as e:
def read_primary_headers(file)
def split_packet_bytes(file, include_primary_header=True)
def get_timestamp(all_packets, is_stime=True)
void print(std::ostream &stream, const char *format)
def l0info_hkt(args, fh, output)
def tai58_as_datetime(tai58)