Skip to content

Commit f648041

Browse files
author
Dr. Brandon Wiley
committed
Helper functions for WSPR messages
1 parent 309bd99 commit f648041

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Codex/src/main/java/org/operatorfoundation/codex/symbols/WSPRMessage.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,12 @@ class WSPRMessage(
161161

162162
return result
163163
}
164+
165+
fun extractValues(): Triple<String, String, Int>
166+
{
167+
val callsign = "Q${callsign1.value}${callsign2.value}${callsign3.value}${callsign4.value}${callsign5.value}${callsign6.value}"
168+
val grid = "${grid1.value}${grid2.value}${grid3.value}${grid4.value}"
169+
val power = power.value
170+
return Triple(callsign, grid, power)
171+
}
164172
}

Codex/src/main/java/org/operatorfoundation/codex/symbols/WSRPMessageSequence.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,9 @@ class WSPRMessageSequence(val messages: List<WSPRMessage>) : Symbol {
4444

4545
return result
4646
}
47+
48+
fun extractValues(): List<Triple<String, String, Int>>
49+
{
50+
return messages.map { it.extractValues() }
51+
}
4752
}

0 commit comments

Comments
 (0)