Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions c/include/libsbp/ssr.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,13 @@ Increased for every discontinuity in phase.
* is used to tie multiple SBP messages into a sequence.
*/
typedef struct SBP_ATTR_PACKED {
gps_time_sec_t time; /**< GNSS reference time of the correction */
u8 num_msgs; /**< Number of messages in the dataset */
u8 seq_num; /**< Position of this message in the dataset */
u8 ssr_update_interval; /**< update interval [coded field] */
u8 update_interval; /**< Update interval between consecutive corrections. Encoded
gps_time_sec_t time; /**< GNSS reference time of the correction */
u8 num_msgs; /**< Number of messages in the dataset */
u8 seq_num; /**< Position of this message in the dataset */
u8 update_interval; /**< Update interval between consecutive corrections. Encoded
following RTCM DF391 specification.
*/
u8 iod_ssr; /**< IOD of the SSR correction. A change of Issue Of Data
u8 iod_ssr; /**< IOD of the SSR correction. A change of Issue Of Data
SSR is used to indicate a change in the SSR
generating configuration.
*/
Expand Down
Binary file modified docs/sbp.pdf
Binary file not shown.
14 changes: 5 additions & 9 deletions haskell/src/SwiftNav/SBP/Ssr.hs
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,16 @@ $(makeLenses ''PhaseBiasesContent)
-- SBP message a limited to 255 bytes. The header is used to tie multiple SBP
-- messages into a sequence.
data STECHeader = STECHeader
{ _sTECHeader_time :: !GpsTimeSec
{ _sTECHeader_time :: !GpsTimeSec
-- ^ GNSS reference time of the correction
, _sTECHeader_num_msgs :: !Word8
, _sTECHeader_num_msgs :: !Word8
-- ^ Number of messages in the dataset
, _sTECHeader_seq_num :: !Word8
, _sTECHeader_seq_num :: !Word8
-- ^ Position of this message in the dataset
, _sTECHeader_ssr_update_interval :: !Word8
-- ^ update interval
, _sTECHeader_update_interval :: !Word8
, _sTECHeader_update_interval :: !Word8
-- ^ Update interval between consecutive corrections. Encoded following RTCM
-- DF391 specification.
, _sTECHeader_iod_ssr :: !Word8
, _sTECHeader_iod_ssr :: !Word8
-- ^ IOD of the SSR correction. A change of Issue Of Data SSR is used to
-- indicate a change in the SSR generating configuration.
} deriving ( Show, Read, Eq )
Expand All @@ -124,7 +122,6 @@ instance Binary STECHeader where
_sTECHeader_time <- get
_sTECHeader_num_msgs <- getWord8
_sTECHeader_seq_num <- getWord8
_sTECHeader_ssr_update_interval <- getWord8
_sTECHeader_update_interval <- getWord8
_sTECHeader_iod_ssr <- getWord8
pure STECHeader {..}
Expand All @@ -133,7 +130,6 @@ instance Binary STECHeader where
put _sTECHeader_time
putWord8 _sTECHeader_num_msgs
putWord8 _sTECHeader_seq_num
putWord8 _sTECHeader_ssr_update_interval
putWord8 _sTECHeader_update_interval
putWord8 _sTECHeader_iod_ssr

Expand Down
6 changes: 0 additions & 6 deletions java/src/com/swiftnav/sbp/ssr/STECHeader.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ public class STECHeader extends SBPStruct {
/** Position of this message in the dataset */
public int seq_num;

/** update interval */
public int ssr_update_interval;

/** Update interval between consecutive corrections. Encoded
following RTCM DF391 specification.
*/
Expand All @@ -57,7 +54,6 @@ public STECHeader parse(SBPMessage.Parser parser) throws SBPBinaryException {
time = new GPSTimeSec().parse(parser);
num_msgs = parser.getU8();
seq_num = parser.getU8();
ssr_update_interval = parser.getU8();
update_interval = parser.getU8();
iod_ssr = parser.getU8();
return this;
Expand All @@ -69,7 +65,6 @@ public void build(SBPMessage.Builder builder) {
time.build(builder);
builder.putU8(num_msgs);
builder.putU8(seq_num);
builder.putU8(ssr_update_interval);
builder.putU8(update_interval);
builder.putU8(iod_ssr);
}
Expand All @@ -80,7 +75,6 @@ public JSONObject toJSON() {
obj.put("time", time.toJSON());
obj.put("num_msgs", num_msgs);
obj.put("seq_num", seq_num);
obj.put("ssr_update_interval", ssr_update_interval);
obj.put("update_interval", update_interval);
obj.put("iod_ssr", iod_ssr);
return obj;
Expand Down
2 changes: 1 addition & 1 deletion javascript/sbp.bundle.js

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions javascript/sbp/ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ PhaseBiasesContent.prototype.fieldSpec.push(['bias', 'writeInt32LE', 4]);
* @field time GPSTimeSec GNSS reference time of the correction
* @field num_msgs number (unsigned 8-bit int, 1 byte) Number of messages in the dataset
* @field seq_num number (unsigned 8-bit int, 1 byte) Position of this message in the dataset
* @field ssr_update_interval number (unsigned 8-bit int, 1 byte) update interval
* @field update_interval number (unsigned 8-bit int, 1 byte) Update interval between consecutive corrections. Encoded following RTCM DF391
* specification.
* @field iod_ssr number (unsigned 8-bit int, 1 byte) IOD of the SSR correction. A change of Issue Of Data SSR is used to indicate a
Expand All @@ -134,14 +133,12 @@ STECHeader.prototype.parser = new Parser()
.nest('time', { type: GPSTimeSec.prototype.parser })
.uint8('num_msgs')
.uint8('seq_num')
.uint8('ssr_update_interval')
.uint8('update_interval')
.uint8('iod_ssr');
STECHeader.prototype.fieldSpec = [];
STECHeader.prototype.fieldSpec.push(['time', GPSTimeSec.prototype.fieldSpec]);
STECHeader.prototype.fieldSpec.push(['num_msgs', 'writeUInt8', 1]);
STECHeader.prototype.fieldSpec.push(['seq_num', 'writeUInt8', 1]);
STECHeader.prototype.fieldSpec.push(['ssr_update_interval', 'writeUInt8', 1]);
STECHeader.prototype.fieldSpec.push(['update_interval', 'writeUInt8', 1]);
STECHeader.prototype.fieldSpec.push(['iod_ssr', 'writeUInt8', 1]);

Expand Down
5 changes: 2 additions & 3 deletions proto/ssr.proto
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ message STECHeader {
gnss.GpsTimeSec time = 1;
uint32 num_msgs = 2;
uint32 seq_num = 3;
uint32 ssr_update_interval = 4;
uint32 update_interval = 5;
uint32 iod_ssr = 6;
uint32 update_interval = 4;
uint32 iod_ssr = 5;
Copy link
Contributor Author

@martin-swift martin-swift Jul 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yow:

Non-required fields can be removed, as long as the field number is not used
again in your updated message type. You may want to rename the field 
instead, perhaps adding the prefix "OBSOLETE_", or make the field number
reserved, so that future users of your .proto can't accidentally reuse the number.

So if we rev a message that people are already using we can't delete a field unless we don't care about backwards compatibility?

}

/** Header for MSG_SSR_GRIDDED_CORRECTION
Expand Down
6 changes: 0 additions & 6 deletions python/sbp/jit/ssr.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ class STECHeader(object):
__slots__ = ['time',
'num_msgs',
'seq_num',
'ssr_update_interval',
'update_interval',
'iod_ssr',
]
Expand All @@ -160,8 +159,6 @@ def parse_members(cls, buf, offset, length):
ret['num_msgs'] = __num_msgs
(__seq_num, offset, length) = get_u8(buf, offset, length)
ret['seq_num'] = __seq_num
(__ssr_update_interval, offset, length) = get_u8(buf, offset, length)
ret['ssr_update_interval'] = __ssr_update_interval
(__update_interval, offset, length) = get_u8(buf, offset, length)
ret['update_interval'] = __update_interval
(__iod_ssr, offset, length) = get_u8(buf, offset, length)
Expand All @@ -175,7 +172,6 @@ def _unpack_members(self, buf, offset, length):
self.time = res['time']
self.num_msgs = res['num_msgs']
self.seq_num = res['seq_num']
self.ssr_update_interval = res['ssr_update_interval']
self.update_interval = res['update_interval']
self.iod_ssr = res['iod_ssr']
return res, off, length
Expand All @@ -189,8 +185,6 @@ def _payload_size(self):
ret += 1
# seq_num: u8
ret += 1
# ssr_update_interval: u8
ret += 1
# update_interval: u8
ret += 1
# iod_ssr: u8
Expand Down
5 changes: 0 additions & 5 deletions python/sbp/ssr.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ class STECHeader(object):
Number of messages in the dataset
seq_num : int
Position of this message in the dataset
ssr_update_interval : int
update interval
update_interval : int
Update interval between consecutive corrections. Encoded
following RTCM DF391 specification.
Expand All @@ -160,14 +158,12 @@ class STECHeader(object):
'time' / construct.Struct(GPSTimeSec._parser),
'num_msgs' / construct.Int8ul,
'seq_num' / construct.Int8ul,
'ssr_update_interval' / construct.Int8ul,
'update_interval' / construct.Int8ul,
'iod_ssr' / construct.Int8ul,))
__slots__ = [
'time',
'num_msgs',
'seq_num',
'ssr_update_interval',
'update_interval',
'iod_ssr',
]
Expand All @@ -179,7 +175,6 @@ def __init__(self, payload=None, **kwargs):
self.time = kwargs.pop('time')
self.num_msgs = kwargs.pop('num_msgs')
self.seq_num = kwargs.pop('seq_num')
self.ssr_update_interval = kwargs.pop('ssr_update_interval')
self.update_interval = kwargs.pop('update_interval')
self.iod_ssr = kwargs.pop('iod_ssr')

Expand Down
4 changes: 0 additions & 4 deletions spec/yaml/swiftnav/sbp/ssr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ definitions:
- seq_num:
type: u8
desc: Position of this message in the dataset
- ssr_update_interval:
type: u8
units: coded field
desc: update interval
- update_interval:
type: u8
desc: |
Expand Down