Steve
2016-08-27 16:18:29 UTC
I was playing with my calculator again on the patio, and I was thinking of
a method to modulate a 4FSK signal. Given the various vocoder options, it
seems that the best would be one with FEC, and fit in 64 bits, which puts
the 1300 bps as the top codec2 candidate.
Since there is a 25 Hz frame rate, applying that to a 1200 Baud modem, you
get 96 bits (or 48 symbols of a 4FSK modem).
#define RATE 25.0f
#define PERIOD (1.0f / RATE)
#define BAUD 1200
#define FREQSEPARATION BAUD
#define SAMPLERATE 48000
#define CYCLE SAMPLERATE / BAUD
#define SYMBOLS (int)((float)BAUD * PERIOD)
Alas, 64 bits leaves 32 bits left over. What to do with them??
52 Bits 12 Bits 32 Bits
+------------------+---------+------------------------------------------+
| CODEC2 Mode 1300 | FEC | TBD |
+------------------+---------+------------------------------------------+
| VOICE FRAME |
+-----------------------------------------------------------------------+
96 Bits per Frame
40 ms
struct voiceFrame {
unsigned int vocoder : 52;
unsigned int fec : 12;
unsigned int tbd : 32;
};
It makes for a nice number of data bytes though...
8 Bits 8 Bits 8 Bits 8 Bits
+--------+--------+--------+------------------------ --- --+---------+
| BYTE 1 | BYTE 2 | BYTE 3 | | BYTE 12 |
12 ASCII or 6 Unicode
+--------+--------+--------+------------------------ --- --+---------+
| DATA FRAME |
+--------------------------------------------------- --- ------------+
96 Bits per Frame
40 ms
struct dataFrame {
union data {
unsigned char bytes[12];
unsigned int unicode[6];
};
};
So, putting together a superframe of some fraction of a second (.4 seconds
sounds good), we can transmit 9 vocoder frames.
The first frame would be the header, and you can fill-in the audio with the
last vocoder frame sent in the previous superframe, or you can put in some
white noise if this is the starting frame.
That gives you 864 data bits or 108 bytes. That's a lot of bytes every half
second or so. You could do all the fancy routing even with IPV4 :-)
96 Bits 96 BITS 96 BITS 96 BITS 96 BITS
+---------------+---------+---------+---------+-- --- --+---------+
| HEADER FRAME | FRAME 1 | FRAME 2 | FRAME 3 | | FRAME 9 |
+------+--------+---------+---------+---------+-- --- --+---------+
| SYNC | PDW | VOICE/DATA FRAME (360 ms) |
108 ASCII or 54 Unicode
+------+--------+-------------------------------- --- ------------+
| SUPERFRAME |
+------------------------------------------------ --- ------------+
960 Bits per Superframe
400 ms
struct superFrame {
unsigned int sync : 32;
unsigned int vod : 1;
unsigned int pdw : 63;
union frame {
struct voiceFrame voicePackets[9];
struct dataFrame dataPackets[9];
};
};
That provides a second problem. What to do with an extra 63 bits? Not quite
enough for 6 bit amateur callsign routing, but I'm sure there is a lot of
ideas out there.
8 Bits 8 Bits 8 Bits 8 Bits 1 Bit 63 Bits
+---------+---------+---------+---------+-----+-------------
------------------------------+
| 0x1A | 0xCF | 0xFC | 0x1D | VOD | TBD
|
+---------+---------+---------+---------+-----+-------------
------------------------------+
| SYNC WORD (32 Bits) | PACKET DEFINITION WORD
(64 Bits) |
+---------------------------------------+-------------------
------------------------------+
96 Bits
40 ms
Notes:
VOD = Voice or Data Bit
TBD = To Be Determined
73/steve
a method to modulate a 4FSK signal. Given the various vocoder options, it
seems that the best would be one with FEC, and fit in 64 bits, which puts
the 1300 bps as the top codec2 candidate.
Since there is a 25 Hz frame rate, applying that to a 1200 Baud modem, you
get 96 bits (or 48 symbols of a 4FSK modem).
#define RATE 25.0f
#define PERIOD (1.0f / RATE)
#define BAUD 1200
#define FREQSEPARATION BAUD
#define SAMPLERATE 48000
#define CYCLE SAMPLERATE / BAUD
#define SYMBOLS (int)((float)BAUD * PERIOD)
Alas, 64 bits leaves 32 bits left over. What to do with them??
52 Bits 12 Bits 32 Bits
+------------------+---------+------------------------------------------+
| CODEC2 Mode 1300 | FEC | TBD |
+------------------+---------+------------------------------------------+
| VOICE FRAME |
+-----------------------------------------------------------------------+
96 Bits per Frame
40 ms
struct voiceFrame {
unsigned int vocoder : 52;
unsigned int fec : 12;
unsigned int tbd : 32;
};
It makes for a nice number of data bytes though...
8 Bits 8 Bits 8 Bits 8 Bits
+--------+--------+--------+------------------------ --- --+---------+
| BYTE 1 | BYTE 2 | BYTE 3 | | BYTE 12 |
12 ASCII or 6 Unicode
+--------+--------+--------+------------------------ --- --+---------+
| DATA FRAME |
+--------------------------------------------------- --- ------------+
96 Bits per Frame
40 ms
struct dataFrame {
union data {
unsigned char bytes[12];
unsigned int unicode[6];
};
};
So, putting together a superframe of some fraction of a second (.4 seconds
sounds good), we can transmit 9 vocoder frames.
The first frame would be the header, and you can fill-in the audio with the
last vocoder frame sent in the previous superframe, or you can put in some
white noise if this is the starting frame.
That gives you 864 data bits or 108 bytes. That's a lot of bytes every half
second or so. You could do all the fancy routing even with IPV4 :-)
96 Bits 96 BITS 96 BITS 96 BITS 96 BITS
+---------------+---------+---------+---------+-- --- --+---------+
| HEADER FRAME | FRAME 1 | FRAME 2 | FRAME 3 | | FRAME 9 |
+------+--------+---------+---------+---------+-- --- --+---------+
| SYNC | PDW | VOICE/DATA FRAME (360 ms) |
108 ASCII or 54 Unicode
+------+--------+-------------------------------- --- ------------+
| SUPERFRAME |
+------------------------------------------------ --- ------------+
960 Bits per Superframe
400 ms
struct superFrame {
unsigned int sync : 32;
unsigned int vod : 1;
unsigned int pdw : 63;
union frame {
struct voiceFrame voicePackets[9];
struct dataFrame dataPackets[9];
};
};
That provides a second problem. What to do with an extra 63 bits? Not quite
enough for 6 bit amateur callsign routing, but I'm sure there is a lot of
ideas out there.
8 Bits 8 Bits 8 Bits 8 Bits 1 Bit 63 Bits
+---------+---------+---------+---------+-----+-------------
------------------------------+
| 0x1A | 0xCF | 0xFC | 0x1D | VOD | TBD
|
+---------+---------+---------+---------+-----+-------------
------------------------------+
| SYNC WORD (32 Bits) | PACKET DEFINITION WORD
(64 Bits) |
+---------------------------------------+-------------------
------------------------------+
96 Bits
40 ms
Notes:
VOD = Voice or Data Bit
TBD = To Be Determined
73/steve