|
|
|
@ -296,14 +296,14 @@ bool AP_GPS_NMEA::_term_complete()
@@ -296,14 +296,14 @@ bool AP_GPS_NMEA::_term_complete()
|
|
|
|
|
_last_HDT_ms = now; |
|
|
|
|
state.gps_yaw = wrap_360(_new_gps_yaw*0.01f); |
|
|
|
|
state.have_gps_yaw = true; |
|
|
|
|
if (state.gps_yaw >state.heading_offset ) |
|
|
|
|
{ |
|
|
|
|
state.heading = (float) state.gps_yaw - state.heading_offset ; |
|
|
|
|
}else{ |
|
|
|
|
state.heading = (float) state.gps_yaw +360.0 - state.heading_offset ; |
|
|
|
|
} |
|
|
|
|
// if (state.gps_yaw >state.heading_offset )
|
|
|
|
|
// {
|
|
|
|
|
// state.heading = (float) state.gps_yaw - state.heading_offset ;
|
|
|
|
|
// }else{
|
|
|
|
|
// state.heading = (float) state.gps_yaw +360.0 - state.heading_offset ;
|
|
|
|
|
// }
|
|
|
|
|
state.heading = (state.heading > gps.get_heading_offset() )?(state.heading - gps.get_heading_offset()):(state.heading + 360.0 - gps.get_heading_offset() ); |
|
|
|
|
|
|
|
|
|
state.last_gps_fixed_time_ms = AP_HAL::millis(); |
|
|
|
|
state.gps_yaw = state.heading; |
|
|
|
|
// state.have_gps_yaw = true;
|
|
|
|
|
// remember that we are setup to provide yaw. With
|
|
|
|
|