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
12 changes: 12 additions & 0 deletions c/include/libsbp/cpp/message_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,18 @@ struct MessageTraits<msg_utc_time_t> {
};


template<>
struct MessageTraits<msg_gps_time_gnss_t> {
static constexpr u16 id = 260;
};


template<>
struct MessageTraits<msg_utc_time_gnss_t> {
static constexpr u16 id = 261;
};


template<>
struct MessageTraits<msg_settings_register_resp_t> {
static constexpr u16 id = 431;
Expand Down
46 changes: 46 additions & 0 deletions c/include/libsbp/navigation.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,33 @@ from -500000 to 500000)
} msg_gps_time_t;


/** GPS Time
*
* 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.
*/
#define SBP_MSG_GPS_TIME_GNSS 0x0104
typedef struct SBP_ATTR_PACKED {
u16 wn; /**< GPS week number [weeks] */
u32 tow; /**< GPS time of week rounded to the nearest millisecond [ms] */
s32 ns_residual; /**< Nanosecond residual of millisecond-rounded TOW (ranges
from -500000 to 500000)
[ns] */
u8 flags; /**< Status flags (reserved) */
} msg_gps_time_gnss_t;


/** UTC Time
*
* This message reports the Universal Coordinated Time (UTC). Note the flags
Expand All @@ -91,6 +118,25 @@ typedef struct SBP_ATTR_PACKED {
} msg_utc_time_t;


/** UTC Time
*
* This message reports the Universal Coordinated Time (UTC). Note the flags
* which indicate the source of the UTC offset value and source of the time fix.
*/
#define SBP_MSG_UTC_TIME_GNSS 0x0105
typedef struct SBP_ATTR_PACKED {
u8 flags; /**< Indicates source and time validity */
u32 tow; /**< GPS time of week rounded to the nearest millisecond [ms] */
u16 year; /**< Year [year] */
u8 month; /**< Month (range 1 .. 12) [months] */
u8 day; /**< days in the month (range 1-31) [day] */
u8 hours; /**< hours of day (range 0-23) [hours] */
u8 minutes; /**< minutes of hour (range 0-59) [minutes] */
u8 seconds; /**< seconds of minute (range 0-60) rounded down [seconds] */
u32 ns; /**< nanoseconds of second (range 0-999999999) [nanoseconds] */
} msg_utc_time_gnss_t;


/** Dilution of Precision
*
* This dilution of precision (DOP) message describes the effect of
Expand Down
26 changes: 17 additions & 9 deletions c/include/libsbp/observation.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,16 @@ typedef struct SBP_ATTR_PACKED {
float af1; /**< Polynomial clock correction coefficient (clock drift) [s/s] */
float af2; /**< Polynomial clock correction coefficient (rate of clock drift) [s/s^2] */
gps_time_sec_t toc; /**< Clock reference */
u8 iode; /**< Issue of ephemeris data */
u16 iodc; /**< Issue of clock data */
u8 iode; /**< Issue of ephemeris data

Calculated from the navigation data parameter t_oe per RTCM/CSNO recommendation:
IODE = mod (t_oe / 720, 240)
*/
u16 iodc; /**< Issue of clock data

Calculated from the navigation data parameter t_oe per RTCM/CSNO recommendation:
IODE = mod (t_oc / 720, 240)
*/
} msg_ephemeris_bds_t;


Expand Down Expand Up @@ -405,8 +413,8 @@ typedef struct SBP_ATTR_PACKED {
double af1; /**< Polynomial clock correction coefficient (clock drift) [s/s] */
float af2; /**< Polynomial clock correction coefficient (rate of clock drift) [s/s^2] */
gps_time_sec_t toc; /**< Clock reference */
u16 iode; /**< Issue of ephemeris data */
u16 iodc; /**< Issue of clock data */
u16 iode; /**< Issue of data (IODnav) */
u16 iodc; /**< Issue of data (IODnav). Always equal to iode */
} msg_ephemeris_gal_dep_a_t;


Expand Down Expand Up @@ -441,9 +449,9 @@ typedef struct SBP_ATTR_PACKED {
double af1; /**< Polynomial clock correction coefficient (clock drift) [s/s] */
float af2; /**< Polynomial clock correction coefficient (rate of clock drift) [s/s^2] */
gps_time_sec_t toc; /**< Clock reference */
u16 iode; /**< Issue of ephemeris data */
u16 iodc; /**< Issue of clock data */
u8 source; /**< 0=I/NAV, 1=F/NAV, ... */
u16 iode; /**< Issue of data (IODnav) */
u16 iodc; /**< Issue of data (IODnav). Always equal to iode */
u8 source; /**< 0=I/NAV, 1=F/NAV */
} msg_ephemeris_gal_t;


Expand Down Expand Up @@ -559,7 +567,7 @@ typedef struct SBP_ATTR_PACKED {
double vel[3]; /**< Velocity vector of the SV at tb in PZ-90.02 coordinates system [m/s] */
double acc[3]; /**< Acceleration vector of the SV at tb in PZ-90.02 coordinates sys [m/s^2] */
u8 fcn; /**< Frequency slot. FCN+8 (that is [1..14]). 0 or 0xFF for invalid */
u8 iod; /**< Issue of ephemeris data */
u8 iod; /**< Issue of data. Equal to the 7 bits of the immediate data word t_b */
} msg_ephemeris_glo_dep_d_t;


Expand All @@ -581,7 +589,7 @@ typedef struct SBP_ATTR_PACKED {
double vel[3]; /**< Velocity vector of the SV at tb in PZ-90.02 coordinates system [m/s] */
float acc[3]; /**< Acceleration vector of the SV at tb in PZ-90.02 coordinates sys [m/s^2] */
u8 fcn; /**< Frequency slot. FCN+8 (that is [1..14]). 0 or 0xFF for invalid */
u8 iod; /**< Issue of ephemeris data */
u8 iod; /**< Issue of data. Equal to the 7 bits of the immediate data word t_b */
} msg_ephemeris_glo_t;


Expand Down
5 changes: 0 additions & 5 deletions c/include/libsbp/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,6 @@ typedef struct SBP_ATTR_PACKED {
#define SBP_MSG_GROUP_META 0xFF0A
typedef struct SBP_ATTR_PACKED {
u8 group_id; /**< Id of the Msgs Group, 0 is Unknown, 1 is Bestpos, 2 is Gnss */
u16 wn; /**< GPS Week Number or zero if Reference epoch is not GPS [weeks] */
u32 tom; /**< Time of Measurement in Milliseconds since reference epoch [ms] */
s32 ns_residual; /**< Nanosecond residual of millisecond-rounded TOM (ranges
from -500000 to 500000)
[ns] */
u8 flags; /**< Status flags (reserved) */
u8 n_group_msgs; /**< Size of list group_msgs */
u16 group_msgs[0]; /**< An inorder list of message types included in the Solution Group,
Expand Down
14 changes: 7 additions & 7 deletions c/test/auto_check_sbp_system_36.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ START_TEST( test_auto_check_sbp_system_36 )

sbp_register_callback(&sbp_state, 0xFF0A, &logging_callback, &DUMMY_MEMORY_FOR_CALLBACKS, &n);

u8 test_data[] = {85,10,255,238,238,15,192,7,64,226,1,0,0,0,0,0,3,10,2,2,255,156,76, };
u8 test_data[] = {85,10,255,238,238,9,1,2,3,10,255,10,2,2,255,2,14, };

dummy_reset();
sbp_send_message(&sbp_state, 0xFF0A, 61166, sizeof(test_data), test_data, &dummy_write);
Expand All @@ -125,12 +125,12 @@ START_TEST( test_auto_check_sbp_system_36 )
msg_group_meta_t* msg = ( msg_group_meta_t *)((void *)last_msg + 6);
// Run tests against fields
fail_unless(msg != 0, "stub to prevent warnings if msg isn't used");
fail_unless(msg->flags == 3, "incorrect value for flags, expected 3, is %d", msg->flags);
fail_unless(msg->group_msgs[0] == 522, "incorrect value for group_msgs[0], expected 522, is %d", msg->group_msgs[0]);
fail_unless(msg->group_msgs[1] == 65282, "incorrect value for group_msgs[1], expected 65282, is %d", msg->group_msgs[1]);
fail_unless(msg->ns_residual == 0, "incorrect value for ns_residual, expected 0, is %d", msg->ns_residual);
fail_unless(msg->tom == 123456, "incorrect value for tom, expected 123456, is %d", msg->tom);
fail_unless(msg->wn == 1984, "incorrect value for wn, expected 1984, is %d", msg->wn);
fail_unless(msg->flags == 2, "incorrect value for flags, expected 2, is %d", msg->flags);
fail_unless(msg->group_id == 1, "incorrect value for group_id, expected 1, is %d", msg->group_id);
fail_unless(msg->group_msgs[0] == 65290, "incorrect value for group_msgs[0], expected 65290, is %d", msg->group_msgs[0]);
fail_unless(msg->group_msgs[1] == 522, "incorrect value for group_msgs[1], expected 522, is %d", msg->group_msgs[1]);
fail_unless(msg->group_msgs[2] == 65282, "incorrect value for group_msgs[2], expected 65282, is %d", msg->group_msgs[2]);
fail_unless(msg->n_group_msgs == 3, "incorrect value for n_group_msgs, expected 3, is %d", msg->n_group_msgs);
}
}
END_TEST
Expand Down
Binary file modified docs/sbp.pdf
Binary file not shown.
12 changes: 12 additions & 0 deletions haskell/src/SwiftNav/SBP/Msg.hs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ data SBPMsg =
| SBPMsgGnssTimeOffset MsgGnssTimeOffset Msg
| SBPMsgGpsTime MsgGpsTime Msg
| SBPMsgGpsTimeDepA MsgGpsTimeDepA Msg
| SBPMsgGpsTimeGnss MsgGpsTimeGnss Msg
| SBPMsgGroupDelay MsgGroupDelay Msg
| SBPMsgGroupDelayDepA MsgGroupDelayDepA Msg
| SBPMsgGroupDelayDepB MsgGroupDelayDepB Msg
Expand Down Expand Up @@ -233,6 +234,7 @@ data SBPMsg =
| SBPMsgUartStateDepa MsgUartStateDepa Msg
| SBPMsgUserData MsgUserData Msg
| SBPMsgUtcTime MsgUtcTime Msg
| SBPMsgUtcTimeGnss MsgUtcTimeGnss Msg
| SBPMsgVelBody MsgVelBody Msg
| SBPMsgVelEcef MsgVelEcef Msg
| SBPMsgVelEcefCov MsgVelEcefCov Msg
Expand Down Expand Up @@ -339,6 +341,7 @@ instance Binary SBPMsg where
| _msgSBPType == msgGnssTimeOffset = SBPMsgGnssTimeOffset (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgGpsTime = SBPMsgGpsTime (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgGpsTimeDepA = SBPMsgGpsTimeDepA (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgGpsTimeGnss = SBPMsgGpsTimeGnss (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgGroupDelay = SBPMsgGroupDelay (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgGroupDelayDepA = SBPMsgGroupDelayDepA (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgGroupDelayDepB = SBPMsgGroupDelayDepB (decode (fromStrict (unBytes _msgSBPPayload))) m
Expand Down Expand Up @@ -437,6 +440,7 @@ instance Binary SBPMsg where
| _msgSBPType == msgUartStateDepa = SBPMsgUartStateDepa (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgUserData = SBPMsgUserData (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgUtcTime = SBPMsgUtcTime (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgUtcTimeGnss = SBPMsgUtcTimeGnss (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgVelBody = SBPMsgVelBody (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgVelEcef = SBPMsgVelEcef (decode (fromStrict (unBytes _msgSBPPayload))) m
| _msgSBPType == msgVelEcefCov = SBPMsgVelEcefCov (decode (fromStrict (unBytes _msgSBPPayload))) m
Expand Down Expand Up @@ -535,6 +539,7 @@ instance Binary SBPMsg where
encoder (SBPMsgGnssTimeOffset _ m) = put m
encoder (SBPMsgGpsTime _ m) = put m
encoder (SBPMsgGpsTimeDepA _ m) = put m
encoder (SBPMsgGpsTimeGnss _ m) = put m
encoder (SBPMsgGroupDelay _ m) = put m
encoder (SBPMsgGroupDelayDepA _ m) = put m
encoder (SBPMsgGroupDelayDepB _ m) = put m
Expand Down Expand Up @@ -633,6 +638,7 @@ instance Binary SBPMsg where
encoder (SBPMsgUartStateDepa _ m) = put m
encoder (SBPMsgUserData _ m) = put m
encoder (SBPMsgUtcTime _ m) = put m
encoder (SBPMsgUtcTimeGnss _ m) = put m
encoder (SBPMsgVelBody _ m) = put m
encoder (SBPMsgVelEcef _ m) = put m
encoder (SBPMsgVelEcefCov _ m) = put m
Expand Down Expand Up @@ -735,6 +741,7 @@ instance FromJSON SBPMsg where
| msgType == msgGnssTimeOffset = SBPMsgGnssTimeOffset <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgGpsTime = SBPMsgGpsTime <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgGpsTimeDepA = SBPMsgGpsTimeDepA <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgGpsTimeGnss = SBPMsgGpsTimeGnss <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgGroupDelay = SBPMsgGroupDelay <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgGroupDelayDepA = SBPMsgGroupDelayDepA <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgGroupDelayDepB = SBPMsgGroupDelayDepB <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
Expand Down Expand Up @@ -833,6 +840,7 @@ instance FromJSON SBPMsg where
| msgType == msgUartStateDepa = SBPMsgUartStateDepa <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgUserData = SBPMsgUserData <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgUtcTime = SBPMsgUtcTime <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgUtcTimeGnss = SBPMsgUtcTimeGnss <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgVelBody = SBPMsgVelBody <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgVelEcef = SBPMsgVelEcef <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
| msgType == msgVelEcefCov = SBPMsgVelEcefCov <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj
Expand Down Expand Up @@ -936,6 +944,7 @@ instance ToJSON SBPMsg where
toJSON (SBPMsgGnssTimeOffset n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgGpsTime n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgGpsTimeDepA n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgGpsTimeGnss n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgGroupDelay n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgGroupDelayDepA n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgGroupDelayDepB n m) = toJSON n <<>> toJSON m
Expand Down Expand Up @@ -1034,6 +1043,7 @@ instance ToJSON SBPMsg where
toJSON (SBPMsgUartStateDepa n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgUserData n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgUtcTime n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgUtcTimeGnss n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgVelBody n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgVelEcef n m) = toJSON n <<>> toJSON m
toJSON (SBPMsgVelEcefCov n m) = toJSON n <<>> toJSON m
Expand Down Expand Up @@ -1131,6 +1141,7 @@ instance HasMsg SBPMsg where
msg f (SBPMsgGnssTimeOffset n m) = SBPMsgGnssTimeOffset n <$> f m
msg f (SBPMsgGpsTime n m) = SBPMsgGpsTime n <$> f m
msg f (SBPMsgGpsTimeDepA n m) = SBPMsgGpsTimeDepA n <$> f m
msg f (SBPMsgGpsTimeGnss n m) = SBPMsgGpsTimeGnss n <$> f m
msg f (SBPMsgGroupDelay n m) = SBPMsgGroupDelay n <$> f m
msg f (SBPMsgGroupDelayDepA n m) = SBPMsgGroupDelayDepA n <$> f m
msg f (SBPMsgGroupDelayDepB n m) = SBPMsgGroupDelayDepB n <$> f m
Expand Down Expand Up @@ -1229,6 +1240,7 @@ instance HasMsg SBPMsg where
msg f (SBPMsgUartStateDepa n m) = SBPMsgUartStateDepa n <$> f m
msg f (SBPMsgUserData n m) = SBPMsgUserData n <$> f m
msg f (SBPMsgUtcTime n m) = SBPMsgUtcTime n <$> f m
msg f (SBPMsgUtcTimeGnss n m) = SBPMsgUtcTimeGnss n <$> f m
msg f (SBPMsgVelBody n m) = SBPMsgVelBody n <$> f m
msg f (SBPMsgVelEcef n m) = SBPMsgVelEcef n <$> f m
msg f (SBPMsgVelEcefCov n m) = SBPMsgVelEcefCov n <$> f m
Expand Down
101 changes: 101 additions & 0 deletions haskell/src/SwiftNav/SBP/Navigation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,50 @@ $(makeSBP 'msgGpsTime ''MsgGpsTime)
$(makeJSON "_msgGpsTime_" ''MsgGpsTime)
$(makeLenses ''MsgGpsTime)

msgGpsTimeGnss :: Word16
msgGpsTimeGnss = 0x0104

-- | SBP class for message MSG_GPS_TIME_GNSS (0x0104).
--
-- 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.
data MsgGpsTimeGnss = MsgGpsTimeGnss
{ _msgGpsTimeGnss_wn :: !Word16
-- ^ GPS week number
, _msgGpsTimeGnss_tow :: !Word32
-- ^ GPS time of week rounded to the nearest millisecond
, _msgGpsTimeGnss_ns_residual :: !Int32
-- ^ Nanosecond residual of millisecond-rounded TOW (ranges from -500000 to
-- 500000)
, _msgGpsTimeGnss_flags :: !Word8
-- ^ Status flags (reserved)
} deriving ( Show, Read, Eq )

instance Binary MsgGpsTimeGnss where
get = do
_msgGpsTimeGnss_wn <- getWord16le
_msgGpsTimeGnss_tow <- getWord32le
_msgGpsTimeGnss_ns_residual <- (fromIntegral <$> getWord32le)
_msgGpsTimeGnss_flags <- getWord8
pure MsgGpsTimeGnss {..}

put MsgGpsTimeGnss {..} = do
putWord16le _msgGpsTimeGnss_wn
putWord32le _msgGpsTimeGnss_tow
(putWord32le . fromIntegral) _msgGpsTimeGnss_ns_residual
putWord8 _msgGpsTimeGnss_flags

$(makeSBP 'msgGpsTimeGnss ''MsgGpsTimeGnss)
$(makeJSON "_msgGpsTimeGnss_" ''MsgGpsTimeGnss)
$(makeLenses ''MsgGpsTimeGnss)

msgUtcTime :: Word16
msgUtcTime = 0x0103

Expand Down Expand Up @@ -150,6 +194,63 @@ $(makeSBP 'msgUtcTime ''MsgUtcTime)
$(makeJSON "_msgUtcTime_" ''MsgUtcTime)
$(makeLenses ''MsgUtcTime)

msgUtcTimeGnss :: Word16
msgUtcTimeGnss = 0x0105

-- | SBP class for message MSG_UTC_TIME_GNSS (0x0105).
--
-- This message reports the Universal Coordinated Time (UTC). Note the flags
-- which indicate the source of the UTC offset value and source of the time
-- fix.
data MsgUtcTimeGnss = MsgUtcTimeGnss
{ _msgUtcTimeGnss_flags :: !Word8
-- ^ Indicates source and time validity
, _msgUtcTimeGnss_tow :: !Word32
-- ^ GPS time of week rounded to the nearest millisecond
, _msgUtcTimeGnss_year :: !Word16
-- ^ Year
, _msgUtcTimeGnss_month :: !Word8
-- ^ Month (range 1 .. 12)
, _msgUtcTimeGnss_day :: !Word8
-- ^ days in the month (range 1-31)
, _msgUtcTimeGnss_hours :: !Word8
-- ^ hours of day (range 0-23)
, _msgUtcTimeGnss_minutes :: !Word8
-- ^ minutes of hour (range 0-59)
, _msgUtcTimeGnss_seconds :: !Word8
-- ^ seconds of minute (range 0-60) rounded down
, _msgUtcTimeGnss_ns :: !Word32
-- ^ nanoseconds of second (range 0-999999999)
} deriving ( Show, Read, Eq )

instance Binary MsgUtcTimeGnss where
get = do
_msgUtcTimeGnss_flags <- getWord8
_msgUtcTimeGnss_tow <- getWord32le
_msgUtcTimeGnss_year <- getWord16le
_msgUtcTimeGnss_month <- getWord8
_msgUtcTimeGnss_day <- getWord8
_msgUtcTimeGnss_hours <- getWord8
_msgUtcTimeGnss_minutes <- getWord8
_msgUtcTimeGnss_seconds <- getWord8
_msgUtcTimeGnss_ns <- getWord32le
pure MsgUtcTimeGnss {..}

put MsgUtcTimeGnss {..} = do
putWord8 _msgUtcTimeGnss_flags
putWord32le _msgUtcTimeGnss_tow
putWord16le _msgUtcTimeGnss_year
putWord8 _msgUtcTimeGnss_month
putWord8 _msgUtcTimeGnss_day
putWord8 _msgUtcTimeGnss_hours
putWord8 _msgUtcTimeGnss_minutes
putWord8 _msgUtcTimeGnss_seconds
putWord32le _msgUtcTimeGnss_ns

$(makeSBP 'msgUtcTimeGnss ''MsgUtcTimeGnss)
$(makeJSON "_msgUtcTimeGnss_" ''MsgUtcTimeGnss)
$(makeLenses ''MsgUtcTimeGnss)

msgDops :: Word16
msgDops = 0x0208

Expand Down
Loading