Skip to content

Commit

Permalink
use timestamp from sigmf as default
Browse files Browse the repository at this point in the history
  • Loading branch information
Sec42 committed Jun 5, 2024
1 parent c3b7db9 commit 5712836
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apps/iridium-extractor
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,13 @@ if __name__ == "__main__":
fmt = sigmf['global']['core:datatype']
except:
print("[sigmf] datatype missing.", file=sys.stderr)
try:
import datetime
dt = datetime.datetime.fromisoformat(sigmf['captures'][0]['core:datetime'].replace("Z","+00:00"))
if args.file_info is None:
args.file_info = f'i-{dt.timestamp():.20g}-t1'
except:
print("[sigmf] timestamp missing.", file=sys.stderr)

if args.sample_rate is not None:
sample_rate = args.sample_rate
Expand Down

0 comments on commit 5712836

Please sign in to comment.