From e3a7f5bafec6715cd11555c39925665c78029dd9 Mon Sep 17 00:00:00 2001 From: Arturs Artamonovs Date: Sat, 26 Oct 2024 23:21:13 +0100 Subject: Added old lab files for modulations and IQ tests --- IQ/IQ.swift | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) (limited to 'IQ/IQ.swift') diff --git a/IQ/IQ.swift b/IQ/IQ.swift index 11092be..4725291 100644 --- a/IQ/IQ.swift +++ b/IQ/IQ.swift @@ -5,3 +5,97 @@ // Created by Jacky Jack on 22/10/2024. // + +/// Data type for raw binary digital data that comes from SDR devices. +/// In range of 8 to 16bit RTLSDR is the lowest you can get 16bit is what you can max you can get for reasonable money +struct IQ { + var size:UInt8 + var bits:UInt8 + var sign:Bool + var complex:Bool + + init(size: UInt8, bits: UInt8, sign: Bool, complex: Bool) { + self.size = size + self.bits = bits + self.sign = sign + self.complex = complex + } + + func conv(_ d: Double) -> UInt8 { + return 0 + } + + func conv(_ d: UInt8) -> Double { + return 0 + } + + func conv(_ d: Double) -> Int8 { + return 0 + } + + func conv(_ d: Int8) -> Double { + return 0 + } + + func conv(_ d: Double) -> UInt16 { + return 0 + } + + func conv(_ d: UInt16) -> Double { + return 0 + } + + func conv(_ d: Double) -> Int16 { + return 0 + } + + func conv(_ d: Int16) -> Double { + return 0 + } + + func conv(_ d: Float) -> UInt8 { + return 0 + } + + func conv(_ d: UInt8) -> Float { + return 0 + } + + func conv(_ d: Float) -> Int8 { + return 0 + } + + func conv(_ d: Int8) -> Float { + return 0 + } + + func conv(_ d: Float) -> UInt16 { + return 0 + } + + func conv(_ d: UInt16) -> Float { + return 0 + } + + func conv(_ d: Float) -> Int16 { + return 0 + } + + func conv(_ d: Int16) -> Float { + return 0 + } + + /* + func conv(_ d: UInt8) -> Int8 { + return 0 + } + + func conv(_ d: Int8) -> UInt8 { + + } + + func conv(_ d:) + */ +} + + -- cgit v1.2.3