Missing Packets in MASCS VIRS Data An investigation by John Hayes reveals: ... there is [likely] an off-by-one bug in the MASCS software. The MASCS software packs as many spectra as it can into the VIRS VIS science packet. To save space, after the first spectrum, subsequent spectra are differenced from their predecessors. The MASCS software uses a common software library to bit-pack the differences. The MASCS software predicts how many bits the packed result will need, rounded up to a multiple of 8 bits to get a whole number of bytes. This length is tested against the remaining space in the packet. If there is room, the spectra difference is computed, the result is bit-packed, and then copied into the packet; otherwise, a new packet is started. However, the bit-packing library pads the result out to a multiple of 16 bits, i.e. an even number of bytes. Therefore, the MASCS prediction of the length could be one byte short. In the worst case, MASCS could generate a packet one byte larger than the maximum allowed. The MASCS VIRS VIS and VIRS NIR science packets use the same format and the same spectra packing algorithm. However, we have only observed dropped VIS packets so far. It is possible we may expect occasional missed packets in NIR as well as VIS. A one word patch is sufficient to fix the problem. The code that tests the length against the remaining space in the packet includes a constant value 4096, the maximum packet payload size. Reducing this value by a few bytes would solve the problem. If the theory is incorrect, the patch would be harmless; it would just reduce the maximum packet size slightly. The patch could be uplinked in real-time. Or, it could be made "permanent" by adding it to the start-up macro. Note: a one word patch would be needed for the VIS code and for the NIR code. A patch has been developed and is awaiting brassboard testing pending available resource time. The missing packets are rare, and considered a small data processing problem. The patch will be implemented if the effort and risk of doing so are both low enough. The list of EDRs (and thus also CDRs) missing packets for delivery 6 is below. The companion excel spreadsheet (virs_vis_edr_missing_packet_analysis.xls) shows a detailed breakdown of the edrs and exactly which packets are missing. VIRSVE_ORB_11116_174442 VIRSVE_ORB_11119_020502 VIRSVE_ORB_11120_061451 VIRSVE_ORB_11122_183617 VIRSVE_ORB_11123_055943 VIRSVE_ORB_11124_185335 VIRSVE_ORB_11125_065755 VIRSVE_ORB_11128_085914 VIRSVE_ORB_11129_200841 VIRSVE_ORB_11130_201914 VIRSVE_ORB_11133_094858