Documente Academic
Documente Profesional
Documente Cultură
Contents
1
2
3
4
5
6
6.1
6.2
6.3
6.4
6.5
7
7.1
7.2
7.3
7.4
7.5
7.6
7.7
7.8
Overview
Message Framing Structure
NMEA-0183
Basic Formats and Payload Structure
Message Types
Stable Message Definitions
Logging . . . . . . . . . . . . . . . . .
Navigation . . . . . . . . . . . . . . . .
Observation . . . . . . . . . . . . . . .
Settings . . . . . . . . . . . . . . . . .
System . . . . . . . . . . . . . . . . .
Draft Message Definitions
Acquisition . . . . . . . . . . . . . . .
Bootload . . . . . . . . . . . . . . . .
Ext Events . . . . . . . . . . . . . . . .
File IO . . . . . . . . . . . . . . . . . .
Flash . . . . . . . . . . . . . . . . . . .
Piksi . . . . . . . . . . . . . . . . . . .
Tracking . . . . . . . . . . . . . . . . .
User . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
2
2
3
4
6
6
7
17
24
32
34
34
35
40
41
48
58
70
72
Overview
The Swift Navigation Binary Protocol (SBP) is a fast, simple, and minimal binary protocol for communicating with Swift devices. It is the native binary protocol used by the Piksi GPS receiver to transmit
solutions, observations, status, and debugging messages, as well as receive messages from the host operating system, such as differential corrections and the almanac. As such, it is an important interface
with your Piksi receiver and the primary integration method with other systems.
This document provides a specification of SBP framing and the payload structures of the messages
currently used with Swift devices. SBP client libraries in a variety of programming languages are available
at http://docs.swiftnav.com/wiki/SwiftNavBinaryProtocol.
Swift Navigation
As of Version 1.1. , the frame consists of a 6-byte binary header section, a variable-sized payload field,
and a 16-bit CRC value. All multibyte values are ordered in little-endian format. SBP uses the CCITT
CRC16 (XMODEM implementation) for error detection1 .
Offset
(bytes)
Size (bytes)
Name
Description
0
1
1
2
Preamble
Message
Type
Sender
5
6
N +6
1
N
2
Length
Payload
CRC
N +8
Table 2.0.1: Swift Binary Protocol message structure. N denotes a variable-length size.
NMEA-0183
Swift devices, such as the Piksi, also have limited support for the standard NMEA-0183 protocol.
Note that NMEA-0183 doesnt define standardized message string equivalents for many important
SBP messages such as observations, baselines and ephemerides. For this reason it is strongly recommended to use SBP for new development. NMEA-0183 output is provided primarily to support legacy
devices.
1 CCITT
16-bit CRC Implementation uses parameters used by XMODEM, i.e. the polynomial: x 16 +x 12 +x 5 +1. For more details, please see the
implementation at https://github.com/swift-nav/libsbp/blob/master/c/src/edc.c#L59. See also A Painless Guide to CRC Error Detection
Algorithms at http://www.ross.net/crc/download/crcv3.txt
Swift Navigation
The binary payload of an SBP message decodes into structured data based on the message type defined
in the header. SBP uses several primitive numerical and collection types for defining payload contents.
Name
Size (bytes)
Description
s8
s16
s32
s64
u8
u16
u32
u64
float
double
array
string
bitfield
1
2
4
8
1
2
4
8
4
8
Example Message
As an example, consider this framed series of bytes read from a serial port:
55 02 02 cc 04 14 70 3d d0 18 cf ef ff ff ef e8 ff ff f0 18 00 00 00 00 05 00 43 94
This byte array decodes into a MSG BASELINE ECEF (see pg. 9), which reports the baseline position
solution of the rover receiver relative to the base station receiver in Earth Centered Earth Fixed (ECEF)
coordinates. The segments of this byte array and its contents break down as follows:
Field Name
Type
Preamble
Message Type
Sender
Length
Payload
u8
u16
u16
u8
u32
s32
s32
s32
u16
u8
u8
u16
Value
Bytestring Segment
0x55
MSG BASELINE ECEF
1228
20
55
02
cc
14
70
f0
416300400 msec
4145 mm
5905 mm
6384 mm
0
5
0
0x9443
70
cf
ef
f0
00
05
00
43
02
04
3d d0 18 cf ef ff ff ef e8 ff ff
18 00 00 00 00 05 00
3d
ef
e8
18
00
d0
ff
ff
00
18
ff
ff
00
94
Swift Navigation
Message Types
Packages define a logical collection of SBP messages. The contents and layout of messages in packages
marked stable are unlikely to change in the future. Draft messages will change with future development
and are detailed purely for informational purposes only. Many draft messages are implementation-defined,
and some collections, such as the acquisition package, are used for internal development.
Package
Msg ID
Name
Size (bytes)
Description
0x0401
0x0100
0x0206
0x0200
0x0201
0x0202
0x0203
0x0204
0x0205
0x0207
0x0049
0x0044
0x0048
0x0081
0x0082
0x0083
0x0080
0x0047
0x0090
0x0091
0x0092
0x00A1
0x00A0
0x00A4
0x00A5
0x00A2
0x00A7
0x00A6
0x00AE
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
N +1
11
14
32
34
20
22
20
22
10
16N + 7
24
24
185
112
112
185
185
70
10
14
0
N
N
N
2
N +2
0
N
0xFF00
0xFFFF
MSG STARTUP
MSG HEARTBEAT
4
4
0x0014
0x00B3
0x00B4
0x00B1
0x00DE
0x00DD
0x0101
0x00A8
0x00A3
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
16
0
N +4
1
0
8
12
N +9
N +4
Stable
Logging
Navigation
Observation
Settings
System
LOG
GPS TIME
DOPS
POS ECEF
POS LLH
BASELINE ECEF
BASELINE NED
VEL ECEF
VEL NED
BASELINE HEADING
OBS
BASE POS LLH
BASE POS ECEF
EPHEMERIS GPS
EPHEMERIS SBAS
EPHEMERIS GLO
EPHEMERIS DEP D
EPHEMERIS DEP C
IONO
SV CONFIGURATION GPS
GROUP DELAY
SETTINGS SAVE
SETTINGS WRITE
SETTINGS READ REQ
SETTINGS READ RESP
SETTINGS READ BY INDEX REQ
SETTINGS READ BY INDEX RESP
SETTINGS READ BY INDEX DONE
SETTINGS REGISTER
Draft
Acquisition
Bootload
Ext Events
File IO
ACQ RESULT
BOOTLOADER HANDSHAKE REQ
BOOTLOADER HANDSHAKE RESP
BOOTLOADER JUMP TO APP
NAP DEVICE DNA REQ
NAP DEVICE DNA RESP
EXT EVENT
FILEIO READ REQ
FILEIO READ RESP
Swift Navigation
Flash
Piksi
Tracking
User
0x00A9
0x00AA
0x00AC
0x00AD
0x00AB
0x00E6
0x00E0
0x00E7
0x00E1
0x00E2
0x00E3
0x00E4
0x00E8
0x00E5
0x00F3
0x0069
0x0068
0x00B2
0x00C0
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
MSG
N +8
N +4
N
N +9
4
N +5
1
5
5
5
4
4
0
12
1
0
0
0
0
0x00C1
0x0022
0x0023
0x0017
0x001D
0x0018
0x0019
MSG
MSG
MSG
MSG
MSG
MSG
MSG
CW START
RESET FILTERS
INIT BASE
THREAD STATE
UART STATE
UART STATE DEPA
IAR STATE
0
1
0
26
74
58
4
0x001B
0x00B5
0x0013
0x001C
0x0800
MSG
MSG
MSG
MSG
MSG
MASK SATELLITE
DEVICE MONITOR
TRACKING STATE
TRACKING IQ
USER DATA
5
10
9N
8N + 5
N
Swift Navigation
6
6.1
This message contains a human-readable payload string from the device containing errors, warnings and
informational messages at ERROR, WARNING, DEBUG, INFO logging levels.
Offset
(bytes)
Size (bytes)
Format
0
1
1
N
u8
string
Units
N +1
Name
Description
level
text
Logging level
Human-readable string
Total Payload Length
in
Lo
gg
es
er
ve
le
v
el
(T
ab
le
6.
1.
2)
Value
Description
0
1
2
3
4
5
6
7
EMERG
ALERT
CRIT
ERROR
WARN
NOTICE
INFO
DEBUG
Swift Navigation
6.2
Navigation
Geodetic navigation messages reporting GPS time, position, velocity, and baseline position solutions. For
position solutions, these messages define several different position solutions: single-point (SPP), RTK,
and pseudo-absolute position solutions.
The SPP is the standalone, absolute GPS position solution using only a single receiver. The RTK
solution is the differential GPS solution, which can use either a fixed/integer or floating carrier phase
ambiguity. The pseudo-absolute position solution uses a user-provided, well-surveyed base station position
(if available) and the RTK solution in tandem.
MSG GPS TIME 0x0100
This message reports the GPS time, representing the time since the GPS epoch began on midnight
January 6, 1980 UTC. GPS time counts the weeks and seconds of the week. The weeks begin at the
Saturday/Sunday transition. GPS week 0 began at the beginning of the GPS time scale.
Within each week number, the GPS time of the week is between between 0 and 604800 seconds
(=60*60*24*7). Note that GPS time does not accumulate leap seconds, and as of now, has a small offset
from UTC. In a message stream, this message precedes a set of other navigation messages referenced
to the same time (but lacking the ns field) and indicates a more precise time of these messages.
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
2
2
4
u16
u32
weeks
ms
wn
tow
s32
ns
ns
10
u8
11
flags
Swift Navigation
This dilution of precision (DOP) message describes the effect of navigation satellite geometry on positional measurement precision.
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
4
6
8
10
12
4
2
2
2
2
2
u32
u16
u16
u16
u16
u16
ms
0.01
0.01
0.01
0.01
0.01
tow
gdop
pdop
tdop
hdop
vdop
14
Swift Navigation
The position solution message reports absolute Earth Centered Earth Fixed (ECEF) coordinates and the
status (single point vs pseudo-absolute RTK) of the position solution. If the rover receiver knows the
surveyed position of the base station and has an RTK solution, this reports a pseudo-absolute position
solution using the base station position and the rovers RTK baseline vector. The full GPS time is given
by the preceding MSG GPS TIME with the matching time-of-week (tow).
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
4
12
20
28
4
8
8
8
2
u32
double
double
double
u16
ms
m
m
m
mm
tow
x
y
z
accuracy
30
31
1
1
u8
u8
n sats
flags
32
R
es
e
R rve
A d
R IM
A r
IM e
pa
Fi
x ava ir fl
m ila a
od b g
e ilit (T
(T y ab
ab fla le
le g ( 6.
6. Ta 2.
6
2.
4) ble )
6.
2.
5)
Value
Description
0
1
2
Value
Description
0
1
Description
0
1
No repair
Solution came from RAIM repair
Swift Navigation
This position solution message reports the absolute geodetic coordinates and the status (single point
vs pseudo-absolute RTK) of the position solution. If the rover receiver knows the surveyed position of
the base station and has an RTK solution, this reports a pseudo-absolute position solution using the
base station position and the rovers RTK baseline vector. The full GPS time is given by the preceding
MSG GPS TIME with the matching time-of-week (tow).
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
4
12
20
28
4
8
8
8
2
u32
double
double
double
u16
ms
deg
deg
m
mm
tow
lat
lon
height
h accuracy
30
u16
mm
v accuracy
32
33
1
1
u8
u8
34
n sats
flags
10
Swift Navigation
Value
Description
0
1
2
es
R erv
A e
R IM d
A
H IM rep
ei a a
g v ir
Fi ht Maila fla
x
m od bili g (T
od e ty a
e (T fla ble
(T ab g 6
ab le (T .2
le 6. ab .1
6. 2. le 1)
2. 9) 6
.2
8)
.
10
)
76
Value
Description
0
1
Value
Description
0
1
Value
Description
0
1
No repair
Solution came from RAIM repair
11
Swift Navigation
This message reports the baseline solution in Earth Centered Earth Fixed (ECEF) coordinates. This
baseline is the relative vector distance from the base station to the rover receiver. The full GPS time is
given by the preceding MSG GPS TIME with the matching time-of-week (tow).
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
4
8
12
16
4
4
4
4
2
u32
s32
s32
s32
u16
ms
mm
mm
mm
mm
tow
x
y
z
accuracy
18
19
1
1
u8
u8
n sats
flags
20
es
e
R rve
A d
R IM
A r
IM e
pa
Fi
x ava ir fl
m ila a
od b g
e ilit (T
(T y ab
ab fla le
le g ( 6.
6. Ta 2.
1
2.
13 ble 5)
6.
)
2.
14
)
Value
Description
0
1
Float RTK
Fixed RTK
Value
Description
0
1
Value
Description
0
1
No repair
Solution came from RAIM repair
12
Swift Navigation
This message reports the baseline solution in North East Down (NED) coordinates. This baseline is
the relative vector distance from the base station to the rover receiver, and NED coordinate system is
defined at the local WGS84 tangent plane centered at the base station position. The full GPS time is
given by the preceding MSG GPS TIME with the matching time-of-week (tow).
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
4
8
12
16
4
4
4
4
2
u32
s32
s32
s32
u16
ms
mm
mm
mm
mm
tow
n
e
d
h accuracy
18
u16
mm
v accuracy
20
21
1
1
u8
u8
n sats
flags
22
es
e
R rve
A d
R IM
A r
IM e
pa
Fi
x ava ir fl
m ila a
od b g
e ilit (T
(T y ab
ab fla le
le g ( 6.
6. Ta 2.
1
2.
17 ble 9)
6.
)
2.
18
)
Value
Description
0
1
Float RTK
Fixed RTK
Value
Description
0
1
Value
Description
0
1
No repair
Solution came from RAIM repair
13
Swift Navigation
This message reports the velocity in Earth Centered Earth Fixed (ECEF) coordinates. The full GPS time
is given by the preceding MSG GPS TIME with the matching time-of-week (tow).
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
4
8
12
16
4
4
4
4
2
u32
s32
s32
s32
u16
ms
mm/s
mm/s
mm/s
mm/s
tow
x
y
z
accuracy
18
19
1
1
u8
u8
20
n sats
flags
14
Swift Navigation
This message reports the velocity in local North East Down (NED) coordinates. The NED coordinate
system is defined as the local WGS84 tangent plane centered at the current position. The full GPS time
is given by the preceding MSG GPS TIME with the matching time-of-week (tow).
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
4
8
12
16
4
4
4
4
2
u32
s32
s32
s32
u16
ms
mm/s
mm/s
mm/s
mm/s
tow
n
e
d
h accuracy
18
u16
mm/s
v accuracy
20
21
1
1
u8
u8
22
n sats
flags
15
Swift Navigation
This message reports the baseline heading pointing from the base station to the rover relative to True
North. The full GPS time is given by the preceding MSG GPS TIME with the matching time-of-week
(tow).
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
4
8
9
4
4
1
1
u32
u32
u8
u8
ms
mdeg
tow
heading
n sats
flags
10
es
e
R rve
A d
R IM
A r
IM e
pa
Fi
x ava ir fl
m ila a
od b g
e ilit (T
(T y ab
ab fla le
le g ( 6.
6. Ta 2.
2
2.
23 ble 5)
6.
)
2.
24
)
Value
Description
0
1
Float RTK
Fixed RTK
Value
Description
0
1
Value
Description
0
1
No repair
Solution came from RAIM repair
16
Swift Navigation
6.3
Observation
The GPS observations message reports all the raw pseudorange and carrier phase observations for the
satellites being tracked by the device. Carrier phase observation here is represented as a 40-bit fixed point
number with Q32.8 layout (i.e. 32-bits of whole cycles and 8-bits of fractional cycles). The observations
should be interoperable with 3rd party receivers and conform with typical RTCMv3 GNSS observations.
Offset
(bytes)
Size (bytes)
Format
Units
Name
0
4
6
4
2
1
u32
u16
u8
ms
week
16N + 7
16N + 11
16N + 15
16N + 16
16N + 17
4
4
1
1
2
u32
s32
u8
u8
u16
2 cm
cycles
cycles / 256
dB Hz * 4
16N + 19
16N + 21
16N + 22
2
1
1
u16
u8
u8
16N + 7
Description
17
Swift Navigation
The base station position message is the position reported by the base station itself. It is used for
pseudo-absolute RTK positioning, and is required to be a high-accuracy surveyed location of the base
station. Any error here will result in an error in the pseudo-absolute position output.
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
8
16
8
8
8
double
double
double
deg
deg
m
lat
lon
height
Latitude
Longitude
Height
24
18
Swift Navigation
The base station position message is the position reported by the base station itself in absolute Earth
Centered Earth Fixed coordinates. It is used for pseudo-absolute RTK positioning, and is required to
be a high-accuracy surveyed location of the base station. Any error here will result in an error in the
pseudo-absolute position output.
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
8
16
8
8
8
double
double
double
m
m
m
x
y
z
ECEF X coodinate
ECEF Y coordinate
ECEF Z coordinate
24
19
Swift Navigation
The ephemeris message returns a set of satellite orbit parameters that is used to calculate GPS satellite position, velocity, and clock offset. Please see the Navstar GPS Space Segment/Navigation user
interfaces (ICD-GPS-200, Table 20-III) for more details.
20
Swift Navigation
Offset
(bytes)
Size (bytes)
Format
0
2
3
4
8
10
18
22
23
2
1
1
4
2
8
4
1
1
u16
u8
u8
u32
u16
double
u32
u8
u8
24
32
8
8
double
double
s
m
40
double
48
double
rad
56
double
rad
64
double
rad
72
double
rad
80
88
96
104
112
8
8
8
8
8
double
double
double
double
double
rad/s
rad
120
128
136
144
152
8
8
8
8
8
double
double
double
double
double
rad/s
rad
rad
rad/s
s
160
double
s/s
168
double
s/s2
176
180
182
183
4
2
1
2
u32
u16
u8
u16
ms
week
185
Units
ms
week
m
s
m(1/2)
rad
Name
Description
21
Swift Navigation
Offset
(bytes)
Size (bytes)
Format
0
2
3
4
8
10
18
22
23
2
1
1
4
2
8
4
1
1
u16
u8
u8
u32
u16
double
u32
u8
u8
24
48
72
96
24
24
24
8
double[3]
double[3]
double[3]
double
m
m/s
m/s2
s
104
double
s/s
112
Units
ms
week
m
s
Name
Description
22
Swift Navigation
The ephemeris message returns a set of satellite orbit parameters that is used to calculate GLO satellite
position, velocity, and clock offset. Please see the GLO ICD 5.1 Table 4.5 Characteristics of words of
immediate information (ephemeris parameters) for more details.
Offset
(bytes)
Size (bytes)
Format
0
2
3
4
8
10
18
22
23
2
1
1
4
2
8
4
1
1
u16
u8
u8
u32
u16
double
u32
u8
u8
24
double
32
40
8
24
double
double[3]
s
m
64
24
double[3]
m/s
88
24
double[3]
m/s2
112
Units
ms
week
m
s
Name
Description
23
Swift Navigation
The ephemeris message returns a set of satellite orbit parameters that is used to calculate GPS satellite position, velocity, and clock offset. Please see the Navstar GPS Space Segment/Navigation user
interfaces (ICD-GPS-200, Table 20-III) for more details.
24
Swift Navigation
Offset
(bytes)
Size (bytes)
Format
Units
Name
0
8
8
8
double
double
s
m
tgd
c rs
16
double
24
double
rad
32
double
rad
40
double
rad
48
double
rad
56
64
72
80
88
8
8
8
8
8
double
double
double
double
double
rad/s
rad
96
104
112
120
128
8
8
8
8
8
double
double
double
double
double
rad/s
rad
rad
rad/s
s
136
double
s/s
144
double
s/s2
152
160
162
170
172
173
174
176
177
178
179
181
8
2
8
2
1
1
2
1
1
1
2
4
double
u16
double
u16
u8
u8
u16
u8
u8
u8
u16
u32
s
week
s
week
185
m(1/2)
rad
Description
25
Swift Navigation
The ephemeris message returns a set of satellite orbit parameters that is used to calculate GPS satellite position, velocity, and clock offset. Please see the Navstar GPS Space Segment/Navigation user
interfaces (ICD-GPS-200, Table 20-III) for more details.
26
Swift Navigation
Offset
(bytes)
Size (bytes)
Format
Units
Name
0
8
8
8
double
double
s
m
tgd
c rs
16
double
24
double
rad
32
double
rad
40
double
rad
48
double
rad
56
64
72
80
88
8
8
8
8
8
double
double
double
double
double
rad/s
rad
96
104
112
120
128
8
8
8
8
8
double
double
double
double
double
rad/s
rad
rad
rad/s
s
136
double
s/s
144
double
s/s2
152
160
162
170
172
173
174
176
177
178
179
181
8
2
8
2
1
1
2
1
1
1
2
4
double
u16
double
u16
u8
u8
u16
u8
u8
u8
u16
u32
s
week
s
week
185
m(1/2)
rad
Description
27
Swift Navigation
The ionospheric parameters which allow the L1 only or L2 only user to utilize the ionospheric model
for computation of the ionospheric delay. Please see ICD-GPS-200 (Chapter 20.3.3.5.1.7) for more
details.
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
4
6
14
22
4
2
8
8
8
u32
u16
double
double
double
t nmct.tow
t nmct.wn
a0
a1
a2
30
double
38
46
54
8
8
8
double
double
double
62
double
ms
week
s
s/semi-circle
s/(semicircle)2
s/(semicircle)3
s
s/semi-circle
s/(semicircle)2
s/(semicircle)3
70
a3
b0
b1
b2
b3
Total Payload Length
28
Swift Navigation
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
4
6
4
2
4
u32
u16
u32
ms
week
t nmct.tow
t nmct.wn
l2c mask
10
29
Swift Navigation
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
4
6
7
4
2
1
1
u32
u16
u8
u8
ms
week
t op.tow
t op.wn
prn
valid
8
10
12
2
2
2
s16
s16
s16
s * 2-35
s * 2-35
s * 2-35
tgd
isc l1ca
isc l2c
14
30
Swift Navigation
6.4
Settings
The save settings message persists the devices current settings configuration to its onboard flash memory
file system.
Offset
(bytes)
Size (bytes)
0
Format
Units
Name
Description
Total Payload Length
31
Swift Navigation
Offset
(bytes)
Size (bytes)
Format
string
Units
Name
Description
setting
32
Swift Navigation
Offset
(bytes)
Size (bytes)
Format
string
Units
Name
Description
setting
33
Swift Navigation
Offset
(bytes)
Size (bytes)
Format
string
Units
Name
Description
setting
34
Swift Navigation
The settings message for iterating through the settings values. It will read the setting at an index, returning a NULL-terminated and delimited string with contents [SECTION SETTING, SETTING, VALUE].
A device will only respond to this message when it is received from sender ID 0x42.
Offset
(bytes)
Size (bytes)
Format
u16
Units
Name
Description
index
Table 6.4.5: MSG SETTINGS READ BY INDEX REQ 0x00A2 message structure
35
Swift Navigation
The settings message for iterating through the settings values. It will read the setting at an index, returning a NULL-terminated and delimited string with contents [SECTION SETTING, SETTING, VALUE].
Offset
(bytes)
Size (bytes)
Format
N +2
Units
Name
Description
u16
index
string
setting
Table 6.4.6: MSG SETTINGS READ BY INDEX RESP 0x00A7 message structure
36
Swift Navigation
Offset
(bytes)
Size (bytes)
0
Format
Units
Name
Description
Total Payload Length
Table 6.4.7: MSG SETTINGS READ BY INDEX DONE 0x00A6 message structure
37
Swift Navigation
This message registers the presence and default value of a setting with a settings daemon. The host
should reply with MSG SETTINGS WRITE for this setting to set the initial value.
Offset
(bytes)
Size (bytes)
Format
string
Units
Name
Description
setting
38
Swift Navigation
6.5
System
The system start-up message is sent once on system start-up. It notifies the host or other attached
devices that the system has started and is now ready to respond to commands or configuration requests.
Offset
(bytes)
Size (bytes)
Format
u32
Units
Name
Description
reserved
Reserved
Total Payload Length
39
Swift Navigation
The heartbeat message is sent periodically to inform the host or other attached devices that the system
is running. It is used to monitor system malfunctions. It also contains status flags that indicate to the
host the status of the system and whether it is operating correctly. Currently, the expected heartbeat
interval is 1 sec.
The system error flag is used to indicate that an error has occurred in the system. To determine the
source of the error, the remaining error flags should be inspected.
Offset
(bytes)
Size (bytes)
Format
u32
Units
Name
Description
flags
Status flags
Value
Description
0
1
System Healthy
An error has occurred
Description
0
1
System Healthy
An IO error has occurred
30
24
23
16
15
lv
er
er
ve
sio
Sw d
n
nu
IO iftN
m
A
Sy Er P
be
st ror E
r
em ( rr
T
Er abor (
ro le Ta
r 6 b
Fl .5 le
ag .4 6
(T) .5.5
ab
)
le
6.
5.
3)
to
co
pr
o
m
R
es
P
SB
SB
es
er
v
in
m
aj
ed
al
rn
Ex
te
31
or
or
an
te
nn
pr
ot
oc
ol
v
pr
es
e
er
nt
sio
(T
ab
nu
le
be
r
6.
5.
6)
Value
Value
Description
0
1
System Healthy
An error has occurred in the SwiftNAP
Value
Description
0
1
40
Swift Navigation
7
7.1
This message describes the results from an attempted GPS signal acquisition search for a satellite PRN
over a code phase/carrier frequency range. It contains the parameters of the point in the acquisition
search space with the best signal-to-noise (SNR) ratio.
Offset
(bytes)
Size (bytes)
Format
float
4
8
12
14
15
4
4
2
1
1
float
float
u16
u8
u8
16
Units
chips
hz
Name
Description
snr
cp
cf
sid.sat
sid.code
sid.reserved
41
Swift Navigation
7.2
Bootload
The handshake message request from the host establishes a handshake between the device bootloader
and the host. The response from the device is MSG BOOTLOADER HANDSHAKE RESP.
Offset (bytes)
Size (bytes)
0
Format
Units
Name
Description
Total Payload Length
42
Swift Navigation
The handshake message response from the device establishes a handshake between the device bootloader
and the host. The request from the host is MSG BOOTLOADER HANDSHAKE REQ. The payload
contains the bootloader version number and the SBP protocol version number.
Offset (bytes)
Size (bytes)
Format
0
4
4
N
u32
string
N +4
Units
Name
Description
flags
version
Bootloader flags
Bootloader version number
Total Payload Length
43
Swift Navigation
Offset (bytes)
Size (bytes)
Format
u8
Units
Name
Description
jump
44
Swift Navigation
The device message from the host reads a unique device identifier from the SwiftNAP, an FPGA. The
host requests the ID by sending a MSG NAP DEVICE DNA REQ message. The device responds with
a MSG NAP DEVICE DNA RESP message with the device ID in the payload. Note that this ID is tied
to the FPGA, and not related to the Piksis serial number.
Offset (bytes)
Size (bytes)
0
Format
Units
Name
Description
Total Payload Length
Table 7.2.4: MSG NAP DEVICE DNA REQ 0x00DE message structure
45
Swift Navigation
The device message from the host reads a unique device identifier from the SwiftNAP, an FPGA. The
host requests the ID by sending a MSG NAP DEVICE DNA REQ message. The device responds with a
MSG NAP DEVICE DNA RESP messagage with the device ID in the payload. Note that this ID is tied
to the FPGA, and not related to the Piksis serial number.
Offset (bytes)
Size (bytes)
Format
u8[8]
Units
Name
Description
dna
Table 7.2.5: MSG NAP DEVICE DNA RESP 0x00DD message structure
46
Swift Navigation
7.3
Ext Events
Reports detection of an external event, the GPS time it occurred, which pin it was and whether it was
rising or falling.
Offset (bytes)
Size (bytes)
Format
Units
Name
Description
0
2
2
4
u16
u32
weeks
ms
wn
tow
s32
ns
ns
10
11
1
1
u8
u8
flags
pin
12
Value
Description
0
1
es
er
ve
d
T
im
N e
ew q
u
le ali
ve ty
lo (
f pTa
in ble
(T 7.
ab 3.3
le )
7.
3.
2)
Value
Description
0
1
47
Swift Navigation
7.4
File IO
Messages for using devices onboard flash filesystem functionality. This allows data to be stored persistently in the devices program flash with wear-levelling using a simple filesystem interface. The file
system interface (CFS) defines an abstract API for reading directories and for reading and writing files.
Note that some of these messages share the same message type ID for both the host request and the
device response.
MSG FILEIO READ REQ 0x00A8
The file read message reads a certain length (up to 255 bytes) from a given offset into a file, and returns
the data in a MSG FILEIO READ RESP message where the message length field indicates how many
bytes were succesfully read.The sequence number in the request will be returned in the response. If the
message is invalid, a followup MSG PRINT message will print Invalid fileio read message. A device
will only respond to this message when it is received from sender ID 0x42.
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
4
8
9
4
4
1
N
u32
u32
u8
string
bytes
bytes
sequence
offset
chunk size
filename
N +9
48
Swift Navigation
The file read message reads a certain length (up to 255 bytes) from a given offset into a file, and returns
the data in a message where the message length field indicates how many bytes were succesfully read.
The sequence number in the response is preserved from the request.
Offset (bytes)
Size (bytes)
Format
0
4
4
N
u32
u8[N]
N +4
Units
Name
Description
sequence
contents
49
Swift Navigation
The read directory message lists the files in a directory on the devices onboard flash file system. The offset parameter can be used to skip the first n elements of the file list. Returns a
MSG FILEIO READ DIR RESP message containing the directory listings as a NULL delimited list. The
listing is chunked over multiple SBP packets. The sequence number in the request will be returned in the
response. If message is invalid, a followup MSG PRINT message will print Invalid fileio read message.
A device will only respond to this message when it is received from sender ID 0x42.
Offset (bytes)
Size (bytes)
Format
0
4
4
4
N
N +8
Units
Name
Description
u32
u32
sequence
offset
string
dirname
Table 7.4.3: MSG FILEIO READ DIR REQ 0x00A9 message structure
50
Swift Navigation
The read directory message lists the files in a directory on the devices onboard flash file system. Message
contains the directory listings as a NULL delimited list. The listing is chunked over multiple SBP packets
and the end of the list is identified by an entry containing just the character 0xFF. The sequence number
in the response is preserved from the request.
Offset (bytes)
Size (bytes)
Format
0
4
4
N
u32
u8[N]
N +4
Units
Name
Description
sequence
contents
Table 7.4.4: MSG FILEIO READ DIR RESP 0x00AA message structure
51
Swift Navigation
The file remove message deletes a file from the file system. If the message is invalid, a followup
MSG PRINT message will print Invalid fileio remove message. A device will only process this message
when it is received from sender ID 0x42.
Offset (bytes)
Size (bytes)
Format
string
Units
Name
Description
filename
52
Swift Navigation
The file write message writes a certain length (up to 255 bytes) of data to a file at a given offset.
Returns a copy of the original MSG FILEIO WRITE RESP message to check integrity of the write.
The sequence number in the request will be returned in the response. If message is invalid, a followup
MSG PRINT message will print Invalid fileio write message. A device will only process this message
when it is received from sender ID 0x42.
Offset (bytes)
Size (bytes)
Format
Units
Name
Description
0
4
4
4
u32
u32
bytes
sequence
offset
8
9
N
N
string
u8[N]
N +9
filename
data
53
Swift Navigation
The file write message writes a certain length (up to 255 bytes) of data to a file at a given offset. The
message is a copy of the original MSG FILEIO WRITE REQ message to check integrity of the write.
The sequence number in the response is preserved from the request.
Offset (bytes)
Size (bytes)
Format
u32
Units
Name
Description
sequence
54
Swift Navigation
7.5
Flash
Messages for reading/writing the devices onboard flash memory. Many of these messages target specific
flash memory peripherals used in Swift Navigation devices: the STM32 flash and the M25Pxx FPGA
configuration flash.
MSG FLASH PROGRAM 0x00E6
The flash program message programs a set of addresses of either the STM or M25 flash. The device
replies with either a MSG FLASH DONE message containing the return code FLASH OK (0) on success,
or FLASH INVALID LEN (2) if the maximum write size is exceeded. Note that the sector-containing
addresses must be erased before addresses can be programmed.
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
1
4
1
3
1
u8
u8[3]
u8
bytes
bytes
target
addr start
addr len
u8[N]
Target flags
Starting address offset to program
Length of set of addresses to program, counting up from starting address
Data to program addresses with, with length
N=addr len
data
N +5
R
7
Value
Description
0
1
FLASH STM
FLASH M25
h
Fl
as
es
e
rv
ed
ta
rg
et
to
re
ad
(T
ab
le
7.
5.
2)
55
Swift Navigation
This message defines success or failure codes for a variety of flash memory requests from the host to the
device. Flash read and write messages, such as MSG FLASH READ REQ, or MSG FLASH PROGRAM,
may return this message on failure.
Offset (bytes)
Size (bytes)
Format
u8
Units
Name
Description
response
Response flags
Total Payload Length
R
7
es
R
es
er
v
po
ns
ed
co
de
(T
ab
le
7.
5.
4)
Value
Description
0
1
2
3
4
5
FLASH
FLASH
FLASH
FLASH
FLASH
FLASH
OK
INVALID
INVALID
INVALID
INVALID
INVALID
FLASH
LEN
ADDR
RANGE
SECTOR
56
Swift Navigation
The flash read message reads a set of addresses of either the STM or M25 onboard flash. The device replies with a MSG FLASH READ RESP message containing either the read data on success or
a MSG FLASH DONE message containing the return code FLASH INVALID LEN (2) if the maximum
read size is exceeded or FLASH INVALID ADDR (3) if the address is outside of the allowed range.
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
1
4
1
3
1
u8
u8[3]
u8
bytes
bytes
target
addr start
addr len
Target flags
Starting address offset to read from
Length of set of addresses to read, counting
up from starting address
Value
Description
0
1
FLASH STM
FLASH M25
h
Fl
as
es
er
v
ed
ta
rg
et
to
re
ad
(T
ab
le
7.
5.
6)
57
Swift Navigation
The flash read message reads a set of addresses of either the STM or M25 onboard flash. The device replies with a MSG FLASH READ RESP message containing either the read data on success or
a MSG FLASH DONE message containing the return code FLASH INVALID LEN (2) if the maximum
read size is exceeded or FLASH INVALID ADDR (3) if the address is outside of the allowed range.
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
0
1
4
1
3
1
u8
u8[3]
u8
bytes
bytes
target
addr start
addr len
Target flags
Starting address offset to read from
Length of set of addresses to read, counting
up from starting address
Value
Description
0
1
FLASH STM
FLASH M25
h
Fl
as
es
er
v
ed
ta
rg
et
to
re
ad
(T
ab
le
7.
5.
8)
58
Swift Navigation
The flash erase message from the host erases a sector of either the STM or M25 onboard flash memory.
The device will reply with a MSG FLASH DONE message containing the return code - FLASH OK (0)
on success or FLASH INVALID FLASH (1) if the flash specified is invalid.
Offset
(bytes)
Size (bytes)
Format
0
1
1
4
u8
u32
Units
Name
Description
target
sector num
Target flags
Flash sector number to erase (0-11 for the
STM, 0-15 for the M25)
Total Payload Length
es
7
Value
Description
0
1
FLASH STM
FLASH M25
h
Fl
as
er
ve
d
ta
rg
et
to
re
ad
(T
ab
le
7.
5.
10
59
Swift Navigation
The flash lock message locks a sector of the STM flash memory.
MSG FLASH DONE message.
Offset (bytes)
Size (bytes)
Format
u32
Units
Name
Description
sector
Table 7.5.11: MSG STM FLASH LOCK SECTOR 0x00E3 message structure
60
Swift Navigation
The flash unlock message unlocks a sector of the STM flash memory. The device replies with a
MSG FLASH DONE message.
Offset (bytes)
Size (bytes)
Format
u32
Units
Name
Description
sector
Table 7.5.12: MSG STM FLASH UNLOCK SECTOR 0x00E4 message structure
61
Swift Navigation
This message reads the devices hardcoded unique ID. The host requests the ID by sending a
MSG STM UNIQUE ID REQ. The device responds with a MSG STM UNIQUE ID RESP with the 12byte unique ID in the payload.
Offset (bytes)
Size (bytes)
0
Format
Units
Name
Description
Total Payload Length
62
Swift Navigation
This message reads the devices hardcoded unique ID. The host requests the ID by sending a
MSG STM UNIQUE ID REQ. The device responds with a MSG STM UNIQUE ID RESP with the 12byte unique ID in the payload..
Offset (bytes)
Size (bytes)
Format
12
u8[12]
12
Units
Name
Description
stm id
Device unique ID
Total Payload Length
63
Swift Navigation
The flash status message writes to the 8-bit M25 flash status register. The device replies with a
MSG FLASH DONE message.
Offset (bytes)
Size (bytes)
Format
u8[1]
Units
Name
Description
status
Table 7.5.15: MSG M25 FLASH WRITE STATUS 0x00F3 message structure
64
Swift Navigation
7.6
Piksi
System health, configuration, and diagnostic messages specific to the Piksi L1 receiver, including a variety
of legacy messages that may no longer be used.
MSG ALMANAC 0x0069
This is a legacy message for sending and loading a satellite alamanac onto the Piksis flash memory from
the host.
Offset (bytes)
Size (bytes)
0
Format
Units
Name
Description
Total Payload Length
65
Swift Navigation
This message sets up timing functionality using a coarse GPS time estimate sent by the host.
Offset (bytes)
Size (bytes)
0
Format
Units
Name
Description
Total Payload Length
66
Swift Navigation
This message from the host resets the Piksi back into the bootloader.
Offset (bytes)
Size (bytes)
0
Format
Units
Name
Description
Total Payload Length
67
Swift Navigation
This is an unused legacy message for result reporting from the CW interference channel on the SwiftNAP.
This message will be removed in a future release.
Offset (bytes)
Size (bytes)
0
Format
Units
Name
Description
Total Payload Length
68
Swift Navigation
This is an unused legacy message from the host for starting the CW interference channel on the SwiftNAP.
This message will be removed in a future release.
Offset (bytes)
Size (bytes)
0
Format
Units
Name
Description
Total Payload Length
69
Swift Navigation
This message resets either the DGNSS Kalman filters or Integer Ambiguity Resolution (IAR) process.
Offset (bytes)
Size (bytes)
Format
u8
Units
Name
Description
filter
Filter flags
Total Payload Length
es
7
or
0
Value
Description
0
1
DGNSS filter
IAR process
r
Fi
lte
er
ve
d
pr
oc
e
ss
to
re
se
(T
ab
le
7.
6
.7
)
70
Swift Navigation
This message initializes the integer ambiguity resolution (IAR) process on the Piksi to use an assumed
baseline position between the base station and rover receivers. Warns via MSG PRINT if there arent a
shared minimum number (4) of satellite observations between the two.
Offset (bytes)
Size (bytes)
0
Format
Units
Name
Description
Total Payload Length
71
Swift Navigation
The thread usage message from the device reports real-time operating system (RTOS) thread usage
statistics for the named thread. The reported percentage values must be normalized.
Offset
(bytes)
Size (bytes)
Format
0
20
20
2
string
u16
22
u32
26
Units
bytes
Name
Description
name
cpu
stack free
72
Swift Navigation
The UART message reports data latency and throughput of the UART channels providing SBP I/O.
On the default Piksi configuration, UARTs A and B are used for telemetry radios, but can also be host
access ports for embedded hosts, or other interfaces in future. The reported percentage values must
be normalized. Observations latency and period can be used to assess the health of the differential
corrections link. Latency provides the timeliness of received base observations while the period indicates
their likelihood of transmission.
Offset
(bytes)
Size
(bytes)
Format
Units
Name
0
4
8
10
12
4
4
2
2
1
float
float
u16
u16
u8
kB/s
kB/s
uart
uart
uart
uart
uart
13
u8
14
18
22
24
26
4
4
2
2
1
float
float
u16
u16
u8
27
u8
28
32
36
38
40
4
4
2
2
1
float
float
u16
u16
u8
41
u8
42
46
50
54
4
4
4
4
s32
s32
s32
s32
ms
ms
ms
ms
latency.avg
latency.lmin
latency.lmax
latency.current
58
62
66
70
4
4
4
4
s32
s32
s32
s32
ms
ms
ms
ms
obs
obs
obs
obs
74
Description
a.tx throughput
a.rx throughput
a.crc error count
a.io error count
a.tx buffer level
uart
uart
uart
uart
uart
b.tx throughput
b.rx throughput
b.crc error count
b.io error count
b.tx buffer level
uart
uart
uart
uart
uart
ftdi.tx throughput
ftdi.rx throughput
ftdi.crc error count
ftdi.io error count
ftdi.tx buffer level
period.avg
period.pmin
period.pmax
period.current
73
Swift Navigation
Deprecated
Offset
(bytes)
Size
(bytes)
Format
Units
Name
0
4
8
10
12
4
4
2
2
1
float
float
u16
u16
u8
kB/s
kB/s
uart
uart
uart
uart
uart
13
u8
14
18
22
24
26
4
4
2
2
1
float
float
u16
u16
u8
27
u8
28
32
36
38
40
4
4
2
2
1
float
float
u16
u16
u8
41
u8
42
46
50
54
4
4
4
4
s32
s32
s32
s32
58
Description
a.tx throughput
a.rx throughput
a.crc error count
a.io error count
a.tx buffer level
uart
uart
uart
uart
uart
b.tx throughput
b.rx throughput
b.crc error count
b.io error count
b.tx buffer level
uart
uart
uart
uart
uart
ftdi.tx throughput
ftdi.rx throughput
ftdi.crc error count
ftdi.io error count
ftdi.tx buffer level
latency.avg
latency.lmin
latency.lmax
latency.current
74
Swift Navigation
This message reports the state of the Integer Ambiguity Resolution (IAR) process, which resolves unknown integer ambiguities from double-differenced carrier-phase measurements from satellite observations.
Offset (bytes)
Size (bytes)
Format
u32
Units
Name
Description
num hyps
75
Swift Navigation
This message allows setting a mask to prevent a particular satellite from being used in various Piksi
subsystems.
Offset
(bytes)
Size (bytes)
Format
1
3
4
2
1
1
Units
Name
Description
u8
mask
u16
u8
u8
sid.sat
sid.code
sid.reserved
Value
Description
0
1
Enabled
Skip this satellite on future acquisitions
R
es
er
ve
d
Tr
a
A ck
cq in
ui g
sit ch
io an
n n
ch els
an (
ne Ta
l ( bl
Ta e 7
bl .6
e .1
7. 5)
6.
14
)
Value
Description
0
1
Enabled
Drop this PRN if currently tracking
76
Swift Navigation
This message contains temperature and voltage level measurements from the processors monitoring
system and the RF frontend die temperature if available.
Offset
(bytes)
Size (bytes)
Format
Units
Name
Description
s16
dev vin
Device V in
2
4
6
2
2
2
s16
s16
s16
cpu vint
cpu vaux
cpu temperature
Processor V int
Processor V aux
Processor temperature
s16
V / 11 *
1000
V * 1000
V * 1000
degrees C *
100
degrees C *
100
fe temperature
10
77
Swift Navigation
7.7
Tracking
The tracking message returns a variable-length array of tracking channel states. It reports status and
carrier-to-noise density measurements for all tracked satellites.
Offset
(bytes)
Size
(bytes)
Format
9N + 0
9N + 1
1
2
9N + 3
9N + 4
9N + 5
1
1
4
Units
Name
Description
u8
u16
states[N].state
states[N].sid.sat
u8
u8
float
states[N].sid.code
states[N].sid.reserved
states[N].cn0
dB Hz
9N
10
Value
Description
0
1
Disabled
Running
ck
Tr
a
es
er
ve
in
g
od
(T
ab
le
7.
7.
2)
78
Swift Navigation
When enabled, a tracking channel can output the correlations at each update interval.
Offset
(bytes)
Size (bytes)
Format
0
1
3
4
8N + 5
8N + 9
1
2
1
1
4
4
u8
u16
u8
u8
s32
s32
8N + 5
Units
Name
Description
channel
sid.sat
sid.code
sid.reserved
corrs[N].I
corrs[N].Q
79
Swift Navigation
7.8
User
This message can contain any application specific user data up to a maximum length of 255 bytes per
message.
Offset (bytes)
Size (bytes)
Format
u8[N]
Units
Name
Description
contents
80