def create_sigmf_metafile(self, x_len, dest_data_filename, _file): sigmf_md = SigMFFile(data_file=dest_data_filename) sigmf_md.set_global_field("core:datatype", self.datatype) sigmf_md.set_global_field("core:sample_rate", self.sample_rate) sigmf_md.set_global_field("core:author", self.author) sigmf_md.set_global_field("core:description", self.description) sha = sigmf_md.calculate_hash() print sha start_index = 0 capture_len = x_len capture_md = { "core:time": utils.get_sigmf_iso8601_datetime_now(), "frequency": self.frequency } sigmf_md.add_capture(start_index=start_index, metadata=capture_md) annotation_md = { "genesys:transmitter": { "antenna": { "model": "Ettus VERT2450", "type": "Vertical", "gain": 3, "high_frequency": 2480000000, "low_frequency": 2400000000 }, "model": "Ettus USRP X310 with UBX-160 (10 MHz-6 GHz, 160 MHz BW) Daughterboard" }, "genesys:reciever": { "antenna": { "model": "Ettus VERT2450", "type": "Vertical", "gain": 3, "high_frequency": 2480000000, "low_frequency": 2400000000 }, "model": "Ettus USRP B210" } } sigmf_md.add_annotation(start_index=start_index, length=capture_len, metadata=annotation_md) return sigmf_md
def create_sigmf_metafile(self, x_len, dest_data_filename, _file): sigmf_md = SigMFFile(data_file=dest_data_filename) sigmf_md.set_global_field("core:datatype", self.datatype) sigmf_md.set_global_field("core:sample_rate", self.sample_rate) sigmf_md.set_global_field("core:author", self.author) sigmf_md.set_global_field("core:version", self.version) pattern = '(\d+)ft' distance = re.findall(pattern, _file) print 'distance', distance #--description "SigMF IQ samples recording of demodulated data derived from over-the-cable WiFi transmissions collected by a fixed USRP B210 as a receiver. The transmitter emitted IEEE 802.11a standards compliant frames generated via a MATLAB WLAN System toolbox. Using UHD software, a controlled level of IQ imbalance is introduced at the runtime such that the demodulated symbols acquire unique characteristics." self.description = "SigMF IQ samples recording of over-the-air WiFi transmissions collected by a fixed USRP B210 as a receiver. The data is collected in indoor environmnet of Kostas Research Institute (KRI), at Northeastern University, with a transmitter-receiver separation distance of " + distance[ 0] + "ft. The transmitter emitted IEEE 802.11a standards compliant frames generated via a MATLAB WLAN System toolbox." sigmf_md.set_global_field("core:description", self.description) sha = sigmf_md.calculate_hash() print sha start_index = 0 capture_len = x_len capture_md = { "core:time": utils.get_sigmf_iso8601_datetime_now(), "frequency": self.frequency } sigmf_md.add_capture(start_index=start_index, metadata=capture_md) # annotation_md = { # "core:latitude": 40.0 + 0.0001 * 0, # "core:longitude": -105.0 + 0.0001 * 0, # } print sigmf_md annotation_md = { "genesys:transmitter": { "antenna": { "model": "Ettus VERT2450", "type": "Vertical", "gain": 3, "high_frequency": 2480000000, "low_frequency": 2400000000 }, "model": "Ettus USRP X310 with UBX-160 (10 MHz-6 GHz, 160 MHz BW) Daughterboard" }, "genesys:reciever": { "antenna": { "model": "Ettus VERT2450", "type": "Vertical", "gain": 3, "high_frequency": 2480000000, "low_frequency": 2400000000 }, "model": "Ettus USRP B210" } } # annotation_md = { # "genesys:transmitter_identification": 'hello', # "genesys:receiver_identification": 'hello', # } sigmf_md.add_annotation(start_index=start_index, length=capture_len, metadata=annotation_md) #print "Hello" #sigmf_md.set_annotations("genesys:transmitter_identification","Hello") return sigmf_md