Skip to content

Commit

Permalink
mag_psi used
Browse files Browse the repository at this point in the history
  • Loading branch information
alireza787b committed Nov 29, 2023
1 parent b610939 commit e4d320e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MAVLinkManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,6 @@ void MAVLinkManager::setGPSVelocityData(mavlink_hil_gps_t& hil_gps) {
void MAVLinkManager::setGPSHeadingData(mavlink_hil_gps_t& hil_gps) {
uint16_t cog = static_cast<uint16_t>(DataRefManager::getFloat("sim/cockpit2/gauges/indicators/ground_track_mag_copilot") * 100);
hil_gps.cog = (cog == 0) ? 360 : cog;
uint16_t yaw = static_cast<uint16_t>(DataRefManager::getFloat("sim/flightmodel/position/psi") * 100);
uint16_t yaw = static_cast<uint16_t>(DataRefManager::getFloat("sim/flightmodel/position/mag_psi") * 100);
hil_gps.yaw = (yaw == 0) ? 360 : yaw;
}

0 comments on commit e4d320e

Please sign in to comment.