UBSEDS12: Contestia 16/1000 once per minute

ubseds12
Richard Meadows 2015-12-19 21:01:35 +00:00
rodzic 658076c468
commit 1c2b939256
5 zmienionych plików z 39 dodań i 51 usunięć

Wyświetl plik

@ -25,13 +25,28 @@
#ifndef CONTESTIA_H
#define CONTESTIA_H
/* /\** */
/* * Contestia 8/1000 */
/* *\/ */
/* #define CONTESTIA_NUMBER_OF_TONES 8 */
/* #define CONTESTIA_CHARACTERS_PER_BLOCK 3 */
/* #define CONTESTIA_CHANNEL_SPACING 16 // Corresponds to 124.88 Hz */
/* #define CONTESTIA_SYMBOL_RATE 125 */
/**
* Contestia 32/1000
* Contestia 16/1000
*/
#define CONTESTIA_NUMBER_OF_TONES 32
#define CONTESTIA_CHARACTERS_PER_BLOCK 5
#define CONTESTIA_CHANNEL_SPACING 4 // Corresponds to 31.22 Hz
#define CONTESTIA_SYMBOL_RATE 31.25
#define CONTESTIA_NUMBER_OF_TONES 16
#define CONTESTIA_CHARACTERS_PER_BLOCK 4
#define CONTESTIA_CHANNEL_SPACING 8 // Corresponds to 62.44 Hz
#define CONTESTIA_SYMBOL_RATE 62.5
/* /\** */
/* * Contestia 32/1000 */
/* *\/ */
/* #define CONTESTIA_NUMBER_OF_TONES 32 */
/* #define CONTESTIA_CHARACTERS_PER_BLOCK 5 */
/* #define CONTESTIA_CHANNEL_SPACING 4 // Corresponds to 31.22 Hz */
/* #define CONTESTIA_SYMBOL_RATE 31.25 */
void contestia_start(char* data);

Wyświetl plik

@ -129,7 +129,7 @@
* Telemetry
*/
#define TELEMETRY_FREQUENCY 434600000
#define TELEMETRY_INTERVAL 30
#define TELEMETRY_INTERVAL 60
#define APRS_INTERVAL 180
/**

Wyświetl plik

@ -35,7 +35,7 @@
/**
* Current output tones
*/
int8_t contestia_tones[CONTESTIA_NUMBER_OF_TONES];
int8_t contestia_tones[32];
/**
* Where we are in the current output tones
*/
@ -80,7 +80,7 @@ uint8_t contestia_tick(void) {
return 1;
}
if (contestia_tone_index < CONTESTIA_NUMBER_OF_TONES) {
if (contestia_tone_index < 32) {
uint8_t binary_code;
uint8_t grey_code;
@ -97,7 +97,7 @@ uint8_t contestia_tick(void) {
contestia_tone_index++;
if (contestia_tone_index < CONTESTIA_NUMBER_OF_TONES) {
if (contestia_tone_index < 32) {
return 1;
}

Wyświetl plik

@ -52,7 +52,7 @@
#include "spi_bitbang.h"
#include "system/interrupt.h"
#define CALLSIGN "UBSEDS6"
#define CALLSIGN "UBSEDS12"
void xosc_measure_callback(uint32_t result);
void timepulse_callback(uint32_t sequence);
@ -223,7 +223,7 @@ void output_telemetry_string(enum telemetry_t type)
/* RSID */
/* start - SI NOW BELONGS TO TELEMETRY, WE CANNOT ACCESS */
if (type == TELEMETRY_CONTESTIA) {
telemetry_start_rsid(RSID_CONTESTIA_32_1000);
telemetry_start_rsid(RSID_CONTESTIA_16_1000);
}
/* Sleep Wait for RSID */
@ -391,16 +391,14 @@ int main(void)
//wdt_reset_count();
/* Send the next packet */
output_telemetry_string((telemetry_alternate++ & 1) ?
TELEMETRY_CONTESTIA :
TELEMETRY_RTTY);
output_telemetry_string(TELEMETRY_CONTESTIA);
/* Maybe aprs? */
if (aprs_trigger_flag) {
aprs_telemetry();
}
aprs_trigger_flag = 0;
/* if (aprs_trigger_flag) { */
/* aprs_telemetry(); */
/* } */
/* aprs_trigger_flag = 0; */
/* Pips */

Wyświetl plik

@ -27,16 +27,12 @@
#include "samd20.h"
#include "mfsk.h"
#include "math/fwht.h"
//#define OLIVIA_MFSK_ENCODE_TEST
#ifdef OLIVIA_MFSK_ENCODE_TEST
#include <stdint.h>
#endif
#include "contestia.h"
static const uint64_t scrambler_olivia = 0xE257E6D0291574ECLL;
static const uint64_t scrambler_contestia = 0xEDB88320LL;
static const uint16_t shift_olivia = 13;
static const uint16_t shift_contestia = 5;
/**
* USEFUL RESOURES =============================================================
*
@ -116,7 +112,8 @@ void olivia_mfsk_encode_block(char* block, int8_t* tones)
{
size_t bits_per_symbol = 5; /* That is, there are 2^5=32 tones */
mfsk_encode_block(block, tones, 64, bits_per_symbol, scrambler_olivia, 13);
mfsk_encode_block(block, tones, 64, bits_per_symbol,
scrambler_olivia, shift_olivia);
}
/**
* This function encodes a single block of Contestia MFSK
@ -126,7 +123,7 @@ void olivia_mfsk_encode_block(char* block, int8_t* tones)
*/
void contestia_mfsk_encode_block(char* block, int8_t* tones)
{
size_t bits_per_symbol = 5; /* That is, there are 2^5=32 tones */
size_t bits_per_symbol = CONTESTIA_CHARACTERS_PER_BLOCK; /* That is, there are 2^x tones */
for (uint8_t c_index = 0; c_index < bits_per_symbol; c_index++) {
char character = block[c_index];
@ -157,28 +154,6 @@ void contestia_mfsk_encode_block(char* block, int8_t* tones)
}
mfsk_encode_block(block, tones, 32, bits_per_symbol, scrambler_contestia, 5);
mfsk_encode_block(block, tones, 32, bits_per_symbol,
scrambler_contestia, shift_contestia);
}
#ifdef OLIVIA_MFSK_ENCODE_TEST
void main(void)
{
/* Define a test string */
char test_string[6];
test_string = "HELLO";
/* Define a buffer for the tones produced */
int8_t tones[64];
olivia_mfsk_encode_block(test_string, tones);
/* Debug printout */
for (int i = 0; i < sizeof(tones)/sizeof(int8_t); i++) {
printf("%d ", tones[i]);
}
printf("\n");
}
#endif