Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
locapack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RMESS
bossche-public
locapack
Commits
45ad137c
Commit
45ad137c
authored
4 years ago
by
Adrien van den Bossche
Browse files
Options
Downloads
Patches
Plain Diff
Add createUniversalGnssPacketWithMovementId() method
parent
19147d8a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arduino/Locapack/Locapack.cpp
+35
-0
35 additions, 0 deletions
arduino/Locapack/Locapack.cpp
arduino/Locapack/Locapack.h
+6
-0
6 additions, 0 deletions
arduino/Locapack/Locapack.h
with
41 additions
and
0 deletions
arduino/Locapack/Locapack.cpp
+
35
−
0
View file @
45ad137c
...
...
@@ -220,6 +220,41 @@ int Locapack::createUniversalGnssPacket(universalGnssPacket_t* universalGnssPack
}
int
Locapack
::
createUniversalGnssPacketWithMovementId
(
universalGnssPacket_t
*
universalGnssPacket
,
uint8_t
movement_id
,
uint8_t
*
buffer
)
{
int
len
=
0
;
uint8_t
payload_buffer
[
MAX_BUFFER_LEN
];
int
payload_buffer_len
=
0
;
payload_buffer_len
=
makeUniversalGnssPayload
(
universalGnssPacket
->
valid_gnss_position
,
universalGnssPacket
->
latitude
,
universalGnssPacket
->
longitude
,
universalGnssPacket
->
altitude_present
,
universalGnssPacket
->
altitude
,
universalGnssPacket
->
dop_present
,
universalGnssPacket
->
dop
,
payload_buffer
);
// protocol_version_t PROTOCOL_V1
// uint8_t movement_id_presence_flag false
// uint8_t timestamp_presence_flag true
// packet_type_t packet_type PACKET_TYPE_UNIVERSAL_GNSS
// uint16_t sequence_number (internal sequence_number)
// uint64_t timestamp (millis)
// uint8_t movement_id disabled
// device_id_t* device_id (internal device_id)
// uint8_t* payload the UniversalGnssPacket generated
// uint8_t payload_len the generated packet length
// uint8_t* buffer the given buffer
len
=
makePacket
(
PROTOCOL_V1
,
true
,
true
,
PACKET_TYPE_UNIVERSAL_GNSS
,
++
_sequence_number_universalGnssPacket
,
(
uint64_t
)
millis
(),
movement_id
,
&
_device_id
,
payload_buffer
,
payload_buffer_len
,
buffer
);
return
len
;
}
int
Locapack
::
makeLocallyReferencedPayload
(
float
x
,
float
y
,
bool
z_present
,
float
z
,
bool
dop_present
,
float
dop
,
bool
frameofref_id_present
,
uint64_t
frameofref_id
,
uint8_t
*
buffer
)
{
...
...
This diff is collapsed.
Click to expand it.
arduino/Locapack/Locapack.h
+
6
−
0
View file @
45ad137c
...
...
@@ -166,6 +166,12 @@ class Locapack {
///
int
createUniversalGnssPacket
(
universalGnssPacket_t
*
gnss
,
uint8_t
*
buffer
);
///
/// @brief
/// @param
///
int
createUniversalGnssPacketWithMovementId
(
universalGnssPacket_t
*
universalGnssPacket
,
uint8_t
movement_id
,
uint8_t
*
buffer
);
///
/// @brief
/// @param
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment