Skip to content

Commit 12002ab

Browse files
committed
Partial reorganization of the CPS format.
Header: - changed the magic field from 64 to 32 bit - extented the version number from 16 to 32 bit Channel: - changed transmit power from dBm to mW, extending the field from 8 to 32 bit - dropped the scan list index field - dropped the group list index field - changed the longitude field from 8 to 16 bit to fix #30
1 parent ed8742c commit 12002ab

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

binary_cps_format.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# OpenRTX Binary CPS Format
22

3-
Authors names go here
3+
Hannes Matuschek DM3MAT
4+
Niccolò Izzo IU2KIN
5+
Silvano Seva IU2KWO
46

57
## Copyright notice
68

@@ -42,8 +44,8 @@ The header contains metadata about the codeplug to ensure compatibility with int
4244

4345
| Field Name | Data Type | Description |
4446
| -------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
45-
| magic | uint64_t | Number used to identify the start of a codeplug; this is always "RTXC", i.e. `0x43585452` |
46-
| version_number | uint16_t | Major and minor version of the OBCF standard, constructed as the `(CPS_VERSION_MAJOR << 8) \| CPS_VERSION_MINOR`. Refer to [Version control](#version-control). |
47+
| magic | uint32_t | Number used to identify the start of a codeplug; this is always "RTXC", i.e. `0x43585452` |
48+
| version_number | uint32_t | Major and minor version of the OBCF standard, constructed as the `(CPS_VERSION_MAJOR << 8) \| CPS_VERSION_MINOR`. Refer to [Version control](#version-control). |
4749
| author | char[32] | User-provided author of the codeplug |
4850
| desc | char[32] | User-provided description of the codeplug, max 32 characters |
4951
| timestamp | uint64_t | Unix timestamp of when the codeplug was last edited |
@@ -57,12 +59,12 @@ This structure is the beginning of the file. The fields are laid out in the foll
5759

5860
```
5961
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
60-
0000 |<magic---------------->|<vers|<author----------
62+
0000 |<-magic------>|<-version->|<-author------------
6163
0010 -----------------------------------------------
62-
0020 ---------------------------->|<descr-----------
64+
0020 ------------------------->|<-descr-------------
6365
0030 -----------------------------------------------
64-
0040 ---------------------------->|<timestamp-------
65-
0050 ---->|<ct_c|<ch_c|<b_co|
66+
0040 ------------------------->|<-timestamp-------->
67+
0050 |<ct_c|<ch_c|<b_co|
6668
```
6769

6870
### Contacts
@@ -115,18 +117,18 @@ For M17 contacts, this section is laid out in the following manner:
115117

116118
```
117119
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
118-
0000 |<name------------------------------------------
120+
0000 |<-name-----------------------------------------
119121
0010 ---------------------------------------------->|
120-
0020 |<m|<address-------->|
122+
0020 |<m|<-address------->|
121123
```
122124

123125
For DMR contacts, this section is laid out in the following manner:
124126

125127
```
126128
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
127-
0000 |<name------------------------------------------
129+
0000 |<-name-----------------------------------------
128130
0010 ---------------------------------------------->|
129-
0020 |<m|<id------->|<i| |
131+
0020 |<m|<-id------>|<i| |
130132
```
131133

132134
### Channels
@@ -137,11 +139,9 @@ For DMR contacts, this section is laid out in the following manner:
137139
| --------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
138140
| mode | uint8_t | Operating mode; refer to [Mode lookup table](#mode-lookup-table) |
139141
| traits | uint8_t | First two bits are channel bandwidth (refer to [Bandwidth lookup table](#bandwidth-lookup-table)), then one bit indicating true if the channel is RX only |
140-
| power | uint8_t | transmit power, stored as number of fifths dBm added to 10bBm (e.g. a value of 5 would represent 10+5\*0.2=11dBm) |
141-
| rx_frequency | uint32_t | RX frequency in Hz |
142-
| tx_frequency | uint32_t | TX frequency in Hz |
143-
| scanList_index | uint8_t | "Scan List: None, ScanList1...250" |
144-
| groupList_index | uint8_t | "Group List: None, GroupList1...128" |
142+
| power | uint32_t | transmit power, in mW
143+
| rx_frequency | uint32_t | RX frequency, in Hz |
144+
| tx_frequency | uint32_t | TX frequency, in Hz |
145145
| name | char[32] | display name for channel |
146146
| descr | char[32] | Description of the channel |
147147
| ch_location | [geo_t](#geo_t-type-description) | transmitter location |
@@ -162,7 +162,7 @@ For DMR contacts, this section is laid out in the following manner:
162162
| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
163163
| ch_lat_int | int8_t | Floor of latitude (⌊x⌋; e.g. given latitude of 44.493889, this value is 44) |
164164
| ch_lat_dec | uint16_t | Fractional part of latitude, first rounded to the ten-thousandths, represented as a positive whole number (e.g. given latitude of 44.493889, this value is 4939) |
165-
| ch_lon_int | int8_t | Floor of longitude (⌊x⌋; e.g. given longitude of 11.342778, this value is 11) |
165+
| ch_lon_int | int16_t | Floor of longitude (⌊x⌋; e.g. given longitude of 11.342778, this value is 11) |
166166
| ch_lon_dec | uint16_t | Fractional part of longitude, first rounded to the ten-thousandths, represented as a positive whole number (e.g. given longitude of 11.342778, this value is 3428) |
167167
| ch_altitude | uint16_t | Altitude of the center of the radiator of the transmitter, stored in meters MSL offset +500 (e.g. 0m would be stored as 500) |
168168

@@ -276,36 +276,36 @@ For DMR channels, this section is laid out in the following manner:
276276

277277
```
278278
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
279-
0000 |<m|<t|<p|<rx_frequen|<tx_frequen|<s|<g|<name---
279+
0000 |<m|<t|<-power--->|<rx_frequen|<tx_frequen|<name
280280
0010 -----------------------------------------------
281-
0020 ------------------------------------->|<descr--
281+
0020 ---------------------------------------->|<descr
282282
0030 -----------------------------------------------
283-
0040 ------------------------------------->|<ch_loca
284-
0050 tion--------->|<c|<d|<cont| |
283+
0040 ---------------------------------------->|<ch_lo
284+
0050 cation---------------->|<c|<d|<cont|
285285
```
286286

287287
For FM channels, this section is laid out in the following manner:
288288

289289
```
290290
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
291-
0000 |<m|<t|<p|<rx_frequen|<tx_frequen|<s|<g|<name---
291+
0000 |<m|<t|<-power--->|<rx_frequen|<tx_frequen|<name
292292
0010 -----------------------------------------------
293-
0020 ------------------------------------->|<descr--
293+
0020 ---------------------------------------->|<descr
294294
0030 -----------------------------------------------
295-
0040 ------------------------------------->|<ch_loca
296-
0050 tion--------->|<r|<t| |
295+
0040 ---------------------------------------->|<ch_loca
296+
0050 tion------------------>|<r|<t
297297
```
298298

299299
For M17 channels, this section is laid out in the following manner:
300300

301301
```
302302
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
303-
0000 |<m|<t|<p|<rx_frequen|<tx_frequen|<s|<g|<name---
303+
0000 |<m|<t|<-power--->|<rx_frequen|<tx_frequen|<name
304304
0010 -----------------------------------------------
305-
0020 ------------------------------------->|<descr--
305+
0020 ---------------------------------------->|<descr
306306
0030 -----------------------------------------------
307-
0040 ------------------------------------->|<ch_loca
308-
0050 tion--------->|<c|<m|<g|<cont|
307+
0040 ---------------------------------------->|<ch_lo
308+
0050 cation---------------->|<c|<m|<g|<cont|
309309
```
310310

311311
### Bank Data Offsets

0 commit comments

Comments
 (0)