Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def parse_members(cls, buf, offset, length):
ret = {}
(__state, offset, length) = get_u8(buf, offset, length)
ret['state'] = __state
(__sid, offset, length) = GnssSignalDep.parse_members(buf, offset, length)
ret['sid'] = __sid
(__cn0, offset, length) = get_f32(buf, offset, length)
ret['cn0'] = judicious_round(np.float32(__cn0)) if SBP.judicious_rounding else __cn0
return ret, offset, length
ret['tow'] = __tow
(__w, offset, length) = get_s32(buf, offset, length)
ret['w'] = __w
(__x, offset, length) = get_s32(buf, offset, length)
ret['x'] = __x
(__y, offset, length) = get_s32(buf, offset, length)
ret['y'] = __y
(__z, offset, length) = get_s32(buf, offset, length)
ret['z'] = __z
(__w_accuracy, offset, length) = get_f32(buf, offset, length)
ret['w_accuracy'] = judicious_round(np.float32(__w_accuracy)) if SBP.judicious_rounding else __w_accuracy
(__x_accuracy, offset, length) = get_f32(buf, offset, length)
ret['x_accuracy'] = judicious_round(np.float32(__x_accuracy)) if SBP.judicious_rounding else __x_accuracy
(__y_accuracy, offset, length) = get_f32(buf, offset, length)
ret['y_accuracy'] = judicious_round(np.float32(__y_accuracy)) if SBP.judicious_rounding else __y_accuracy
(__z_accuracy, offset, length) = get_f32(buf, offset, length)
ret['z_accuracy'] = judicious_round(np.float32(__z_accuracy)) if SBP.judicious_rounding else __z_accuracy
(__flags, offset, length) = get_u8(buf, offset, length)
ret['flags'] = __flags
return ret, offset, length
def parse_members(cls, buf, offset, length):
ret = {}
(__common, offset, length) = EphemerisCommonContent.parse_members(buf, offset, length)
ret['common'] = __common
(__pos, offset, length) = get_fixed_array(get_f64, 3, 8)(buf, offset, length)
ret['pos'] = __pos
(__vel, offset, length) = get_fixed_array(get_f32, 3, 4, nb.f4 if SBP.judicious_rounding else None)(buf, offset, length)
ret['vel'] = __vel
(__acc, offset, length) = get_fixed_array(get_f32, 3, 4, nb.f4 if SBP.judicious_rounding else None)(buf, offset, length)
ret['acc'] = __acc
(__a_gf0, offset, length) = get_f32(buf, offset, length)
ret['a_gf0'] = judicious_round(nb.f4(__a_gf0)) if SBP.judicious_rounding else __a_gf0
(__a_gf1, offset, length) = get_f32(buf, offset, length)
ret['a_gf1'] = judicious_round(nb.f4(__a_gf1)) if SBP.judicious_rounding else __a_gf1
return ret, offset, length
def parse_members(cls, buf, offset, length):
ret = {}
(__tx_throughput, offset, length) = get_f32(buf, offset, length)
ret['tx_throughput'] = judicious_round(np.float32(__tx_throughput)) if SBP.judicious_rounding else __tx_throughput
(__rx_throughput, offset, length) = get_f32(buf, offset, length)
ret['rx_throughput'] = judicious_round(np.float32(__rx_throughput)) if SBP.judicious_rounding else __rx_throughput
(__crc_error_count, offset, length) = get_u16(buf, offset, length)
ret['crc_error_count'] = __crc_error_count
(__io_error_count, offset, length) = get_u16(buf, offset, length)
ret['io_error_count'] = __io_error_count
(__tx_buffer_level, offset, length) = get_u8(buf, offset, length)
ret['tx_buffer_level'] = __tx_buffer_level
(__rx_buffer_level, offset, length) = get_u8(buf, offset, length)
ret['rx_buffer_level'] = __rx_buffer_level
return ret, offset, length
def parse_members(cls, buf, offset, length):
ret = {}
(__cn0, offset, length) = get_f32(buf, offset, length)
ret['cn0'] = judicious_round(np.float32(__cn0)) if SBP.judicious_rounding else __cn0
(__cp, offset, length) = get_f32(buf, offset, length)
ret['cp'] = judicious_round(np.float32(__cp)) if SBP.judicious_rounding else __cp
(__cf, offset, length) = get_f32(buf, offset, length)
ret['cf'] = judicious_round(np.float32(__cf)) if SBP.judicious_rounding else __cf
(__sid, offset, length) = GnssSignalDep.parse_members(buf, offset, length)
ret['sid'] = __sid
return ret, offset, length
def parse_members(cls, buf, offset, length):
ret = {}
(__tow, offset, length) = get_u32(buf, offset, length)
ret['tow'] = __tow
(__x, offset, length) = get_s32(buf, offset, length)
ret['x'] = __x
(__y, offset, length) = get_s32(buf, offset, length)
ret['y'] = __y
(__z, offset, length) = get_s32(buf, offset, length)
ret['z'] = __z
(__cov_x_x, offset, length) = get_f32(buf, offset, length)
ret['cov_x_x'] = judicious_round(np.float32(__cov_x_x)) if SBP.judicious_rounding else __cov_x_x
(__cov_x_y, offset, length) = get_f32(buf, offset, length)
ret['cov_x_y'] = judicious_round(np.float32(__cov_x_y)) if SBP.judicious_rounding else __cov_x_y
(__cov_x_z, offset, length) = get_f32(buf, offset, length)
ret['cov_x_z'] = judicious_round(np.float32(__cov_x_z)) if SBP.judicious_rounding else __cov_x_z
(__cov_y_y, offset, length) = get_f32(buf, offset, length)
ret['cov_y_y'] = judicious_round(np.float32(__cov_y_y)) if SBP.judicious_rounding else __cov_y_y
(__cov_y_z, offset, length) = get_f32(buf, offset, length)
ret['cov_y_z'] = judicious_round(np.float32(__cov_y_z)) if SBP.judicious_rounding else __cov_y_z
(__cov_z_z, offset, length) = get_f32(buf, offset, length)
ret['cov_z_z'] = judicious_round(np.float32(__cov_z_z)) if SBP.judicious_rounding else __cov_z_z
(__n_sats, offset, length) = get_u8(buf, offset, length)
ret['n_sats'] = __n_sats
(__flags, offset, length) = get_u8(buf, offset, length)
ret['flags'] = __flags
return ret, offset, length
def parse_members(cls, buf, offset, length):
ret = {}
(__snr, offset, length) = get_f32(buf, offset, length)
ret['snr'] = judicious_round(np.float32(__snr)) if SBP.judicious_rounding else __snr
(__cp, offset, length) = get_f32(buf, offset, length)
ret['cp'] = judicious_round(np.float32(__cp)) if SBP.judicious_rounding else __cp
(__cf, offset, length) = get_f32(buf, offset, length)
ret['cf'] = judicious_round(np.float32(__cf)) if SBP.judicious_rounding else __cf
(__sid, offset, length) = GnssSignalDep.parse_members(buf, offset, length)
ret['sid'] = __sid
return ret, offset, length
def parse_members(cls, buf, offset, length):
ret = {}
(__snr, offset, length) = get_f32(buf, offset, length)
ret['snr'] = judicious_round(np.float32(__snr)) if SBP.judicious_rounding else __snr
(__cp, offset, length) = get_f32(buf, offset, length)
ret['cp'] = judicious_round(np.float32(__cp)) if SBP.judicious_rounding else __cp
(__cf, offset, length) = get_f32(buf, offset, length)
ret['cf'] = judicious_round(np.float32(__cf)) if SBP.judicious_rounding else __cf
(__prn, offset, length) = get_u8(buf, offset, length)
ret['prn'] = __prn
return ret, offset, length
def parse_members(cls, buf, offset, length):
ret = {}
(__tow, offset, length) = get_u32(buf, offset, length)
ret['tow'] = __tow
(__roll, offset, length) = get_s32(buf, offset, length)
ret['roll'] = __roll
(__pitch, offset, length) = get_s32(buf, offset, length)
ret['pitch'] = __pitch
(__yaw, offset, length) = get_s32(buf, offset, length)
ret['yaw'] = __yaw
(__roll_accuracy, offset, length) = get_f32(buf, offset, length)
ret['roll_accuracy'] = judicious_round(np.float32(__roll_accuracy)) if SBP.judicious_rounding else __roll_accuracy
(__pitch_accuracy, offset, length) = get_f32(buf, offset, length)
ret['pitch_accuracy'] = judicious_round(np.float32(__pitch_accuracy)) if SBP.judicious_rounding else __pitch_accuracy
(__yaw_accuracy, offset, length) = get_f32(buf, offset, length)
ret['yaw_accuracy'] = judicious_round(np.float32(__yaw_accuracy)) if SBP.judicious_rounding else __yaw_accuracy
(__flags, offset, length) = get_u8(buf, offset, length)
ret['flags'] = __flags
return ret, offset, length
def parse_members(cls, buf, offset, length):
ret = {}
(__channel_tag, offset, length) = get_u16(buf, offset, length)
ret['channel_tag'] = __channel_tag
(__t, offset, length) = GPSTime.parse_members(buf, offset, length)
ret['t'] = __t
(__freq_ref, offset, length) = get_f32(buf, offset, length)
ret['freq_ref'] = judicious_round(np.float32(__freq_ref)) if SBP.judicious_rounding else __freq_ref
(__freq_step, offset, length) = get_f32(buf, offset, length)
ret['freq_step'] = judicious_round(np.float32(__freq_step)) if SBP.judicious_rounding else __freq_step
(__amplitude_ref, offset, length) = get_f32(buf, offset, length)
ret['amplitude_ref'] = judicious_round(np.float32(__amplitude_ref)) if SBP.judicious_rounding else __amplitude_ref
(__amplitude_unit, offset, length) = get_f32(buf, offset, length)
ret['amplitude_unit'] = judicious_round(np.float32(__amplitude_unit)) if SBP.judicious_rounding else __amplitude_unit
(__amplitude_value, offset, length) = get_array(get_u8)(buf, offset, length)
ret['amplitude_value'] = __amplitude_value
return ret, offset, length