summaryrefslogtreecommitdiff
path: root/Gen
diff options
context:
space:
mode:
authorArturs Artamonovs <arturs.artamonovs@protonmail.com>2024-10-26 23:21:13 +0100
committerArturs Artamonovs <arturs.artamonovs@protonmail.com>2024-10-26 23:21:13 +0100
commite3a7f5bafec6715cd11555c39925665c78029dd9 (patch)
tree9d5077923249353d7b47c7a07c9aaee34b6bf110 /Gen
parentf3f0f90a51412d1684b43be6f2b5f93cb4154ee0 (diff)
downloadPrySDR-e3a7f5bafec6715cd11555c39925665c78029dd9.tar.gz
PrySDR-e3a7f5bafec6715cd11555c39925665c78029dd9.zip
Added old lab files for modulations and IQ tests
Diffstat (limited to 'Gen')
-rw-r--r--Gen/GenTrig.swift33
1 files changed, 33 insertions, 0 deletions
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<Float> {
+ 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<Float> {
+ return [0.0]
+}
+