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
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,15 @@ help:
@echo " html to make all HTML language docs"
@echo " pdf to make SBP LaTeX datasheet"
@echo " python to make Python bindings"
@echo " pythonNG to make Python (JIT) bindings"
@echo " haskell to make Haskell bindings"
@echo " java to make Java bindings"
@echo " protobuf to make Protocol Buffer bindings"
@echo " release to handle some release tasks"
@echo " test to run all tests"
@echo

all: c python javascript java docs haskell protobuf
all: c python pythonNG javascript java docs haskell protobuf
docs: verify-prereq-docs pdf html

c: deps-c gen-c test-c
Expand Down
10 changes: 3 additions & 7 deletions c/include/libsbp/piksi.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,11 @@ typedef struct SBP_ATTR_PACKED {
} msg_reset_filters_t;


/** Initialize IAR from known baseline (host => device)
/** Deprecated
*
* 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 aren't a shared minimum number (4) of satellite
* observations between the two.
* Deprecated
*/
#define SBP_MSG_INIT_BASE 0x0023
#define SBP_MSG_INIT_BASE_DEP 0x0023


/** State of an RTOS thread
Expand Down
Binary file modified docs/sbp.pdf
Binary file not shown.
12 changes: 6 additions & 6 deletions haskell/src/SwiftNav/SBP/Msg.hs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ data SBPMsg =
| SBPMsgIarState MsgIarState Msg
| SBPMsgImuAux MsgImuAux Msg
| SBPMsgImuRaw MsgImuRaw Msg
| SBPMsgInitBase MsgInitBase Msg
| SBPMsgInitBaseDep MsgInitBaseDep Msg
| SBPMsgInsStatus MsgInsStatus Msg
| SBPMsgIono MsgIono Msg
| SBPMsgLinuxCpuState MsgLinuxCpuState Msg
Expand Down Expand Up @@ -324,7 +324,7 @@ instance Binary SBPMsg where
| _msgSBPType == msgIarState = SBPMsgIarState (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgImuAux = SBPMsgImuAux (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgImuRaw = SBPMsgImuRaw (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgInitBase = SBPMsgInitBase (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgInitBaseDep = SBPMsgInitBaseDep (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgInsStatus = SBPMsgInsStatus (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgIono = SBPMsgIono (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgLinuxCpuState = SBPMsgLinuxCpuState (decode (fromStrict (unBytes _msgSBPPayload))) m
Expand Down Expand Up @@ -502,7 +502,7 @@ instance Binary SBPMsg where
encoder (SBPMsgIarState _ m) = put m
encoder (SBPMsgImuAux _ m) = put m
encoder (SBPMsgImuRaw _ m) = put m
encoder (SBPMsgInitBase _ m) = put m
encoder (SBPMsgInitBaseDep _ m) = put m
encoder (SBPMsgInsStatus _ m) = put m
encoder (SBPMsgIono _ m) = put m
encoder (SBPMsgLinuxCpuState _ m) = put m
Expand Down Expand Up @@ -684,7 +684,7 @@ instance FromJSON SBPMsg where
| msgType == msgIarState = SBPMsgIarState <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgImuAux = SBPMsgImuAux <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgImuRaw = SBPMsgImuRaw <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgInitBase = SBPMsgInitBase <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgInitBaseDep = SBPMsgInitBaseDep <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgInsStatus = SBPMsgInsStatus <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgIono = SBPMsgIono <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgLinuxCpuState = SBPMsgLinuxCpuState <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
Expand Down Expand Up @@ -867,7 +867,7 @@ instance ToJSON SBPMsg where
toJSON (SBPMsgIarState n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgImuAux n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgImuRaw n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgInitBase _ m) = toJSON m
toJSON (SBPMsgInitBaseDep _ m) = toJSON m
toJSON (SBPMsgInsStatus n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgIono n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgLinuxCpuState n m) = toJSON n <<>> toJSON m
Expand Down Expand Up @@ -1044,7 +1044,7 @@ instance HasMsg SBPMsg where
msg f (SBPMsgIarState n m) = SBPMsgIarState n <$> f m
msg f (SBPMsgImuAux n m) = SBPMsgImuAux n <$> f m
msg f (SBPMsgImuRaw n m) = SBPMsgImuRaw n <$> f m
msg f (SBPMsgInitBase n m) = SBPMsgInitBase n <$> f m
msg f (SBPMsgInitBaseDep n m) = SBPMsgInitBaseDep n <$> f m
msg f (SBPMsgInsStatus n m) = SBPMsgInsStatus n <$> f m
msg f (SBPMsgIono n m) = SBPMsgIono n <$> f m
msg f (SBPMsgLinuxCpuState n m) = SBPMsgLinuxCpuState n <$> f m
Expand Down
25 changes: 11 additions & 14 deletions haskell/src/SwiftNav/SBP/Piksi.hs
Original file line number Diff line number Diff line change
Expand Up @@ -186,27 +186,24 @@ $(makeSBP 'msgResetFilters ''MsgResetFilters)
$(makeJSON "_msgResetFilters_" ''MsgResetFilters)
$(makeLenses ''MsgResetFilters)

msgInitBase :: Word16
msgInitBase = 0x0023
msgInitBaseDep :: Word16
msgInitBaseDep = 0x0023

-- | SBP class for message MSG_INIT_BASE (0x0023).
-- | SBP class for message MSG_INIT_BASE_DEP (0x0023).
--
-- 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 aren't a shared minimum number
-- (4) of satellite observations between the two.
data MsgInitBase = MsgInitBase
-- Deprecated
data MsgInitBaseDep = MsgInitBaseDep
deriving ( Show, Read, Eq )

instance Binary MsgInitBase where
instance Binary MsgInitBaseDep where
get =
pure MsgInitBase
pure MsgInitBaseDep

put MsgInitBase =
put MsgInitBaseDep =
pure ()
$(makeSBP 'msgInitBase ''MsgInitBase)
$(makeJSON "_msgInitBase_" ''MsgInitBase)
$(makeLenses ''MsgInitBase)
$(makeSBP 'msgInitBaseDep ''MsgInitBaseDep)
$(makeJSON "_msgInitBaseDep_" ''MsgInitBaseDep)
$(makeLenses ''MsgInitBaseDep)

msgThreadState :: Word16
msgThreadState = 0x0017
Expand Down
6 changes: 3 additions & 3 deletions java/src/com/swiftnav/sbp/client/MessageTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
import com.swiftnav.sbp.piksi.MsgCwResults;
import com.swiftnav.sbp.piksi.MsgCwStart;
import com.swiftnav.sbp.piksi.MsgResetFilters;
import com.swiftnav.sbp.piksi.MsgInitBase;
import com.swiftnav.sbp.piksi.MsgInitBaseDep;
import com.swiftnav.sbp.piksi.MsgThreadState;
import com.swiftnav.sbp.piksi.MsgUartState;
import com.swiftnav.sbp.piksi.MsgUartStateDepa;
Expand Down Expand Up @@ -432,8 +432,8 @@ static SBPMessage dispatch(SBPMessage msg) throws SBPBinaryException {
return new MsgCwStart(msg);
case MsgResetFilters.TYPE:
return new MsgResetFilters(msg);
case MsgInitBase.TYPE:
return new MsgInitBase(msg);
case MsgInitBaseDep.TYPE:
return new MsgInitBaseDep(msg);
case MsgThreadState.TYPE:
return new MsgThreadState(msg);
case MsgUartState.TYPE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,22 @@
import org.json.JSONArray;


/** SBP class for message MSG_INIT_BASE (0x0023).
/** SBP class for message MSG_INIT_BASE_DEP (0x0023).
*
* You can have MSG_INIT_BASE inherent its fields directly from
* You can have MSG_INIT_BASE_DEP inherent its fields directly from
* an inherited SBP object, or construct it inline using a dict of its
* fields.
*
* 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 aren't a shared minimum number (4) of satellite
* observations between the two. */
* Deprecated */

public class MsgInitBase extends SBPMessage {
public class MsgInitBaseDep extends SBPMessage {
public static final int TYPE = 0x0023;



public MsgInitBase (int sender) { super(sender, TYPE); }
public MsgInitBase () { super(TYPE); }
public MsgInitBase (SBPMessage msg) throws SBPBinaryException {
public MsgInitBaseDep (int sender) { super(sender, TYPE); }
public MsgInitBaseDep () { super(TYPE); }
public MsgInitBaseDep (SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type != TYPE;
}
Expand Down
4 changes: 2 additions & 2 deletions javascript/sbp.bundle.js

Large diffs are not rendered by default.

27 changes: 12 additions & 15 deletions javascript/sbp/piksi.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,29 +202,26 @@ MsgResetFilters.prototype.fieldSpec = [];
MsgResetFilters.prototype.fieldSpec.push(['filter', 'writeUInt8', 1]);

/**
* SBP class for message MSG_INIT_BASE (0x0023).
* SBP class for message MSG_INIT_BASE_DEP (0x0023).
*
* 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 aren't a shared minimum number (4) of
* satellite observations between the two.
* Deprecated
*
* @param sbp An SBP object with a payload to be decoded.
*/
var MsgInitBase = function (sbp, fields) {
var MsgInitBaseDep = function (sbp, fields) {
SBP.call(this, sbp);
this.messageType = "MSG_INIT_BASE";
this.messageType = "MSG_INIT_BASE_DEP";
this.fields = (fields || this.parser.parse(sbp.payload));

return this;
};
MsgInitBase.prototype = Object.create(SBP.prototype);
MsgInitBase.prototype.messageType = "MSG_INIT_BASE";
MsgInitBase.prototype.msg_type = 0x0023;
MsgInitBase.prototype.constructor = MsgInitBase;
MsgInitBase.prototype.parser = new Parser()
MsgInitBaseDep.prototype = Object.create(SBP.prototype);
MsgInitBaseDep.prototype.messageType = "MSG_INIT_BASE_DEP";
MsgInitBaseDep.prototype.msg_type = 0x0023;
MsgInitBaseDep.prototype.constructor = MsgInitBaseDep;
MsgInitBaseDep.prototype.parser = new Parser()
.endianess('little');
MsgInitBase.prototype.fieldSpec = [];
MsgInitBaseDep.prototype.fieldSpec = [];

/**
* SBP class for message MSG_THREAD_STATE (0x0017).
Expand Down Expand Up @@ -1003,8 +1000,8 @@ module.exports = {
MsgCwStart: MsgCwStart,
0x0022: MsgResetFilters,
MsgResetFilters: MsgResetFilters,
0x0023: MsgInitBase,
MsgInitBase: MsgInitBase,
0x0023: MsgInitBaseDep,
MsgInitBaseDep: MsgInitBaseDep,
0x0017: MsgThreadState,
MsgThreadState: MsgThreadState,
UARTChannel: UARTChannel,
Expand Down
11 changes: 0 additions & 11 deletions proto/piksi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,6 @@ message MsgResetFilters {
uint32 filter = 1;
}

/** Initialize IAR from known baseline (host => device)
*
* 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 aren't a shared minimum number (4) of satellite
* observations between the two.
*/
message MsgInitBase {
}

/** State of an RTOS thread
*
* The thread usage message from the device reports real-time
Expand Down
42 changes: 42 additions & 0 deletions python/sbp/jit/gnss.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,48 @@ def _payload_size(self):
ret += 1
return ret

class SvId(object):
"""SBP class for message SvId

You can have SvId inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.


A (Constellation ID, satellite ID) tuple that uniquely identifies
a space vehicle


"""
__slots__ = ['satId',
'constellation',
]
@classmethod
def parse_members(cls, buf, offset, length):
ret = {}
(__satId, offset, length) = get_u8(buf, offset, length)
ret['satId'] = __satId
(__constellation, offset, length) = get_u8(buf, offset, length)
ret['constellation'] = __constellation
return ret, offset, length

def _unpack_members(self, buf, offset, length):
res, off, length = self.parse_members(buf, offset, length)
if off == offset:
return {}, offset, length
self.satId = res['satId']
self.constellation = res['constellation']
return res, off, length

@classmethod
def _payload_size(self):
ret = 0
# satId: u8
ret += 1
# constellation: u8
ret += 1
return ret

class GnssSignalDep(object):
"""SBP class for message GnssSignalDep

Expand Down
Loading