code: def sniff_field_spelling(mlog, source):
      '''attempt to detect whether APM or PX4 attributes names are in use'''
      position_field_type_default = position_field_types[0] # Default to PX4 spelling
      
      msg = mlog.recv_match(source)
      mlog._rewind() # Unfortunately it's either call this or return a mutated object
      
      position_field_selection = [spelling for spelling in position_field_types if hasattr(msg, spelling[0])]
  
      return position_field_selection[0] if position_field_selection else position_field_type_defaulf sniff_field_spelling(mlog, source):
      '''attempt to detect whether APM or PX4 attributes names are in use'''
      position_field_type_default = position_field_types[0] # Default to PX4 spelling
      
      msg = mlog.recv_match(source)
      mlog._rewind() # Unfortunately it's either call this or return a mutated object
      
      position_field_selection = [spelling for spelling in position_field_types if hasattr(msg, spelling[0])]
  
      return position_field_selection[0] if position_field_selection else position_field_type_default
docs: attempt to detect whether APM or PX4 attributes names are in use