-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3b7ba8
commit c98778d
Showing
14 changed files
with
668 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#ifndef INCLUDE_SIMULATED_BSMID_H_ | ||
#define INCLUDE_SIMULATED_BSMID_H_ | ||
|
||
#include <iostream> | ||
#include <tmx/messages/message.hpp> | ||
|
||
namespace tmx | ||
{ | ||
namespace messages | ||
{ | ||
namespace simulation | ||
{ | ||
|
||
struct BSMID | ||
{ | ||
uint8_t BsmId = 0; | ||
|
||
BSMID() {} | ||
BSMID(std::uint8_t bsmId) : BsmId(bsmId) {} | ||
|
||
static message_tree_type to_tree(BSMID element) | ||
{ | ||
message_tree_type treeElement; | ||
treeElement.put("BsmId", element.BsmId); | ||
return treeElement; | ||
} | ||
|
||
static BSMID from_tree(message_tree_type &treeElement) | ||
{ | ||
BSMID element; | ||
element.BsmId = treeElement.get<std::uint8_t>("BsmId"); | ||
return element; | ||
} | ||
}; | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#ifndef INCLUDE_SIMULATED_COVARIANCE_H_ | ||
#define INCLUDE_SIMULATED_COVARIANCE_H_ | ||
|
||
#include <iostream> | ||
#include <tmx/messages/message.hpp> | ||
|
||
namespace tmx | ||
{ | ||
namespace messages | ||
{ | ||
namespace simulation | ||
{ | ||
// Row-major representation of the 6x6 covariance matrix | ||
// # The orientation parameters use a fixed-axis representation. | ||
// # In order, the parameters are: | ||
// # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis) | ||
struct Covariance | ||
{ | ||
double covariance = 0; | ||
|
||
Covariance() {} | ||
Covariance(double covariance) : covariance(covariance) {} | ||
|
||
static message_tree_type to_tree(Covariance element) | ||
{ | ||
message_tree_type treeElement; | ||
treeElement.put("Covariance", element.covariance); | ||
return treeElement; | ||
} | ||
|
||
static Covariance from_tree(message_tree_type &treeElement) | ||
{ | ||
Covariance element; | ||
element.covariance = treeElement.get<double>("Covariance"); | ||
return element; | ||
} | ||
}; | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.