Skip to content

Commit

Permalink
SITL: VectorNav: Add support for sensors outside VN-100 and VN-300
Browse files Browse the repository at this point in the history
Includes naming changes to match new broadened usage
  • Loading branch information
lashVN committed Jul 3, 2024
1 parent 92d5cd4 commit 14d689a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libraries/SITL/SIM_VectorNav.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ VectorNav::VectorNav() :
{
}

struct PACKED VN_packet1 {
struct PACKED VN_INS_packet1 {
float uncompMag[3];
float uncompAccel[3];
float uncompAngRate[3];
Expand All @@ -46,7 +46,7 @@ struct PACKED VN_packet1 {
float velU;
};

struct PACKED VN_packet2 {
struct PACKED VN_INS_packet2 {
uint64_t timeGPS;
float temp;
uint8_t numGPS1Sats;
Expand Down Expand Up @@ -84,7 +84,7 @@ void VectorNav::send_packet1(void)
{
const auto &fdm = _sitl->state;

struct VN_packet1 pkt {};
struct VN_INS_packet1 pkt {};

pkt.uncompAccel[0] = fdm.xAccel;
pkt.uncompAccel[1] = fdm.yAccel;
Expand Down Expand Up @@ -146,7 +146,7 @@ void VectorNav::send_packet2(void)
{
const auto &fdm = _sitl->state;

struct VN_packet2 pkt {};
struct VN_INS_packet2 pkt {};

struct timeval tv;
simulation_timeval(&tv);
Expand Down

0 comments on commit 14d689a

Please sign in to comment.