function tm_get_adcs_tle(buffer, pinfo, tree, adcs_tle, offset) local f_inclination = ProtoField.double("adcs_tle.inclination", "Inclination (Degrees)") local f_eccentricity = ProtoField.double("adcs_tle.eccentricity", "Eccentricity") local f_raan = ProtoField.double("adcs_tle.raan", "Right-Ascension of the Ascending Node (Degrees)") local f_arg_perigee = ProtoField.double("adcs_tle.arg_perigee", "Argument of Perigee (Degrees)") local f_b_star = ProtoField.double("adcs_tle.b_star", "B-Star Drag Term") local f_mean_motion = ProtoField.double("adcs_tle.mean_motion", "Mean Motion (Revolutions per day)") local f_mean_anomaly = ProtoField.double("adcs_tle.mean_anomaly", "Mean Anomaly (Degrees)") local f_epoch_time = ProtoField.double("adcs_tle.epoch_time", "Epoch Time (Julian Date)") -- Register fields with the protocol adcs_tle.fields = { f_inclination, f_eccentricity, f_raan, f_arg_perigee, f_b_star, f_mean_motion, f_mean_anomaly, f_epoch_time } local subtree = tree:add(adcs_tle, buffer(), "TM GET ADCS TLE") offset = offset + 3 local data = buffer(offset,1):le_int() offset = offset + 1 if data == 0 then local data = buffer(offset,8):le_float() subtree:add(f_inclination, data):set_text(string.format("Inclination : %0.6f",data)) offset = offset + 8 data = buffer(offset,8):le_float() subtree:add(f_eccentricity, data):set_text(string.format("Eccentricity : %0.6f",data)) offset = offset + 8 data = buffer(offset,8):le_float() subtree:add(f_raan, data):set_text(string.format("Raan : %0.6f",data)) offset = offset + 8 data = buffer(offset,8):le_float() subtree:add(f_arg_perigee, data):set_text(string.format("Arg perigee : %0.6f",data)) offset = offset + 8 data = buffer(offset,8):le_float() subtree:add(f_b_star, data):set_text(string.format("B star : %0.6f",data)) offset = offset + 8 data = buffer(offset,8):le_float() subtree:add(f_mean_motion, data):set_text(string.format("Mean motion : %0.6f",data)) offset = offset + 8 data = buffer(offset,8):le_float() subtree:add(f_mean_anomaly, data):set_text(string.format("Mean anomaly : %0.6f",data)) offset = offset + 8 data = buffer(offset,8):le_float() subtree:add(f_epoch_time, data):set_text(string.format("Epoch time : %0.6f",data)) offset = offset + 8 elseif data == -1 then subtree:add(" ADCS operation failure ") elseif data == -2 then subtree:add(" TC TM error ") elseif data == -3 then subtree:add(" Interface error ") elseif data == -4 then subtree:add(" Id not support ") elseif data == -5 then subtree:add(" ADCS HW in invalid power state ") elseif data == -6 then subtree:add(" ADCS Semaphore take failure ") elseif data == -6 then subtree:add(" ADCS Operating Mode Mismatch error ") elseif data == -6 then subtree:add(" ADCS responded data is not in a valid range ") end end