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 --- Gen/GenTrig.swift | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Gen/GenTrig.swift (limited to 'Gen') diff --git a/Gen/GenTrig.swift b/Gen/GenTrig.swift new file mode 100644 index 0000000..84bf9cf --- /dev/null +++ b/Gen/GenTrig.swift @@ -0,0 +1,33 @@ +// +// GenTrig.swift +// PrySDR +// +// Created by Jacky Jack on 26/10/2024. +// + +/// Generate sin function as float array +/// - Parameters: +/// - sample_rate: sample rate, how many samples per second +/// - freq: sin frequency +/// - ampl: amplitude +/// - phase: phase of sin +/// - sample_num: number of samples to generate +/// - Returns: Array of floats within range [-ampl ... apml] +/// +func genSin(_ sample_rate: Int,_ freq: Float,_ ampl: Float,_ phase: Float,_ sample_num: Float) -> Array { + return [0.0] +} + +/// Generate Cos function as float array +/// - Parameters: +/// - sample_rate: sample rate, how many samples per second +/// - freq: sin frequency +/// - ampl: amplitude +/// - phase: phase of sin +/// - sample_num: number of samples to generate +/// - Returns: Array of floats within range [-ampl ... apml] +/// +func genCos(_ sample_rate: Int,_ freq: Float,_ ampl: Float,_ phase: Float,_ sample_num: Float) -> Array { + return [0.0] +} + -- cgit v1.2.3