-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: partial reorganization of the CPS format. #32
base: master
Are you sure you want to change the base?
Conversation
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
Contacts: - extended info field to 15 bytes, padding the structure to 48 byte and to leave space for future extensions Channels: - extended info to 9 bytes, padding the structure to 96 byte and to leave space for future extensions - dropped the 20kHz channel bandwidth M17 channel info block: - dropped split TX and RX CAN and moved to a unique CAN field - merged CAN and channel mode into the same 8 bit field - merged encryption type and GNSS transmission in the same 8 bit field
53eaf93
to
2b94b43
Compare
HTML version available here: https://github.com/OpenRTX/openrtx.github.io/blob/cps_refactor/binary_cps_format.md |
LGTM!
Are we sure that's going to be enough? 😆 |
a238c9a
to
e53f25a
Compare
To do:
|
Updated the format used to store transmitter location: - removed the +500m offset for altitude, converted the value to a signed type - fix an error with negative coordinates close to zero, see #40.
Hi! The solution I first suggested was to include a short table at the beginning of the codeplug that would look like this (numbers are just random numbers and this example only considers contacts).
And then, for each entry you would have something looking like this (for one analog contact and 2 custom contact)
The advantage of this is that you do not really need to update the standard at all to include new modes, but you have to define each mode you want to support, including very ubiquitous ones like analog. Also, you raised the concern that managing strings can be quite computationally heavy for the smallest processors. The final solution we came up with was to reserve the 128 first IDs for pre-defined modes. Which would mean that in all CPS using this standard, ID 0 would always be analog, 1 would always be DMR, 2 would always be M17, and so on... The IDs 127 and up could be defined as explained above, but we could also not put the name of the mode, assuming that if the radio does not know about it, it does not need to know the name of the mode. The risk could be that you may encounter a mode with a "known ID" but whose definition is not what you expect (i.e. if I use id 218 for MyCustomMode and you use id 218 for YourCustomMode). However, it would be required for the table to contain the length of the various entries (contacts, channels, ...). That way you can at least check that the IDs above 127 have the expected length. You also know what is the length of the entries if you do not know about the mode. This solution also means that the radios are expected to keep a table of the lengths of all the modes included in the standard because it might encounter any of those including some it does not support. Not having a table for the IDs below 127 also means that any update to the standard including a new protocol would not be backward compatible, because if I don't know about ID 17 yet, then I have no idea what is the length of the entry and so the rest of the codeplug becomes unreadable. Anyway, that is what I remember about what we talked about more than a month ago. Any remarks are welcome from anybody that might read this comment 😄 |
Header:
Channel:
See also #31