Skip to content

Commit

Permalink
AP_ExternalAHRS_VectorNav: Resolve SITL failures
Browse files Browse the repository at this point in the history
  • Loading branch information
lashVN committed Jul 19, 2024
1 parent efb74b0 commit 657c982
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions libraries/AP_ExternalAHRS/AP_ExternalAHRS_VectorNav.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ void AP_ExternalAHRS_VectorNav::process_imu_packet(const uint8_t *b)
// @Field: GY: Rotation rate Y-axis
// @Field: GZ: Rotation rate Z-axis

AP::logger().WriteStreaming("EAHIM", "TimeUS,Temp,Pres,MX,MY,MZ,AX,AY,AZ,GX,GY,GZ",
AP::logger().WriteStreaming("EAHI", "TimeUS,Temp,Pres,MX,MY,MZ,AX,AY,AZ,GX,GY,GZ",
"sdPGGGoooEEE", "F00000000000",
"Qfffffffffff",
AP_HAL::micros64(),
Expand Down Expand Up @@ -587,7 +587,7 @@ void AP_ExternalAHRS_VectorNav::process_ahrs_ekf_packet(const uint8_t *b) {
// @Field: PU: Pitch uncertainty
// @Field: RU: Roll uncertainty

AP::logger().WriteStreaming("EAHAT", "TimeUS,Q1,Q2,Q3,Q4,Yaw,Pitch,Roll,YU,PU,RU",
AP::logger().WriteStreaming("EAHA", "TimeUS,Q1,Q2,Q3,Q4,Yaw,Pitch,Roll,YU,PU,RU",
"s----dddddd", "F0000000000",
"Qffffffffff",
AP_HAL::micros64(),
Expand Down Expand Up @@ -631,7 +631,7 @@ void AP_ExternalAHRS_VectorNav::process_ins_ekf_packet(const uint8_t *b) {
// @Field: PU: Pitch uncertainty
// @Field: RU: Roll uncertainty

AP::logger().WriteStreaming("EAHAT", "TimeUS,Q1,Q2,Q3,Q4,Yaw,Pitch,Roll,YU,PU,RU",
AP::logger().WriteStreaming("EAHA", "TimeUS,Q1,Q2,Q3,Q4,Yaw,Pitch,Roll,YU,PU,RU",
"s----dddddd", "F0000000000",
"Qffffffffff",
now,
Expand All @@ -652,8 +652,8 @@ void AP_ExternalAHRS_VectorNav::process_ins_ekf_packet(const uint8_t *b) {
// @Field: PosU: Filter estimated position uncertainty
// @Field: VelU: Filter estimated Velocity uncertainty

AP::logger().WriteStreaming("EAHKF", "TimeUS,InsStatus,Lat,Lon,Alt,VelN,VelE,VelD,PosU,VelU",
"s-ddmnnndn", "F00000000",
AP::logger().WriteStreaming("EAHK", "TimeUS,InsStatus,Lat,Lon,Alt,VelN,VelE,VelD,PosU,VelU",
"s-ddmnnndn", "F000000000",
"QHdddfffff",
now,
pkt.insStatus,
Expand Down
6 changes: 3 additions & 3 deletions libraries/SITL/SIM_VectorNav.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void VectorNav::send_imu_packet(void)
pkt.pressure = pressure_Pa*0.001 + rand_float() * 0.01;

const uint8_t sync_byte = 0xFA;
write_to_autopilot((char *)sync_byte, 1);
write_to_autopilot((char *)&sync_byte, 1);
write_to_autopilot((char *)&VN_IMU_packet_sim::header, sizeof(VN_IMU_packet_sim::header));
write_to_autopilot((char *)&pkt, sizeof(pkt));

Expand Down Expand Up @@ -174,7 +174,7 @@ void VectorNav::send_ins_ekf_packet(void)
pkt.velU = 0.25;

const uint8_t sync_byte = 0xFA;
write_to_autopilot((char *)sync_byte, 1);
write_to_autopilot((char *)&sync_byte, 1);
write_to_autopilot((char *)&VN_INS_ekf_packet_sim::header, sizeof(VN_INS_ekf_packet_sim::header));
write_to_autopilot((char *)&pkt, sizeof(pkt));

Expand Down Expand Up @@ -221,7 +221,7 @@ void VectorNav::send_ins_gnss_packet(void)
pkt.fix2 = 3;

const uint8_t sync_byte = 0xFA;
write_to_autopilot((char *)sync_byte, 1);
write_to_autopilot((char *)&sync_byte, 1);
write_to_autopilot((char *)&VN_INS_gnss_packet_sim::header, sizeof(VN_INS_gnss_packet_sim::header));
write_to_autopilot((char *)&pkt, sizeof(pkt));

Expand Down

0 comments on commit 657c982

Please sign in to comment.