mirror of https://github.com/ArduPilot/ardupilot
Ap_Frsky_Telem: fix for apparent wind passthrough telemetry frame
This commit is contained in:
parent
83520d611b
commit
3c19312c56
|
@ -77,7 +77,7 @@ for FrSky SPort Passthrough
|
|||
#define WIND_ANGLE_LIMIT 0x7F
|
||||
#define WIND_SPEED_OFFSET 7
|
||||
#define WIND_APPARENT_ANGLE_OFFSET 15
|
||||
#define WIND_APPARENT_SPEED_OFFSET 23
|
||||
#define WIND_APPARENT_SPEED_OFFSET 22
|
||||
// for waypoint data
|
||||
#define WP_NUMBER_LIMIT 2047
|
||||
#define WP_DISTANCE_LIMIT 1023000
|
||||
|
@ -781,7 +781,7 @@ uint32_t AP_Frsky_SPort_Passthrough::calc_wind(void)
|
|||
// true wind speed in dm/s
|
||||
value |= prep_number(roundf(windvane->get_true_wind_speed() * 10), 2, 1) << WIND_SPEED_OFFSET;
|
||||
// apparent wind angle in 3 degree increments -180,180 (signed)
|
||||
value |= prep_number(roundf(degrees(windvane->get_apparent_wind_direction_rad()) * (1.0f/3.0f)), 2, 0);
|
||||
value |= prep_number(roundf(degrees(windvane->get_apparent_wind_direction_rad()) * (1.0f/3.0f)), 2, 0) << WIND_APPARENT_ANGLE_OFFSET;
|
||||
// apparent wind speed in dm/s
|
||||
value |= prep_number(roundf(windvane->get_apparent_wind_speed() * 10), 2, 1) << WIND_APPARENT_SPEED_OFFSET;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue