Skip to content
Snippets Groups Projects
Commit e589ed75 authored by Bruce Flynn's avatar Bruce Flynn
Browse files

fix more modis sort issues.

parent 69e6bf9b
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@ class PktType(Enum):
Day = 0
Night = 1
Eng1 = 2
Eng2 = 3
Eng2 = 4
class CalType(Enum):
......@@ -73,7 +73,7 @@ def _scancount(p):
def _pkttype(p):
v = bytes(p.secondary_header)[8] >> 4 & 0x7
if v > 3:
if v > 4:
return None
return PktType(v)
......@@ -129,9 +129,14 @@ def _modis_sort_key(p):
elif i.type == "cal":
type_idx = i.source.type.value
frame_sort = i.source.frame_count
else:
type_idx = 6 if i.type == PktType.Eng1 else 7
return (p.stamp, 64, type_idx, frame_sort, p.seqid)
elif i.type == "engr":
if i.packet_type == PktType.Eng1:
type_idx = 6
frame_sort = 1
else:
type_idx = 7
frame_sort = 2
return (p.stamp, 64, type_idx, frame_sort, int(p.is_last()))
def sort_modis(packets):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment