mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-24 05:45:59 +08:00
Update tfmini.c (#2460)
Tested with TFMini, now works correctly. Gain between 0..1 thus multiply not divide
This commit is contained in:
committed by
Gautier Hattenberger
parent
63805310d8
commit
58deebc744
@@ -157,7 +157,7 @@ static void tfmini_parse(uint8_t byte)
|
||||
float phi = stateGetNedToBodyEulers_f()->phi;
|
||||
float theta = stateGetNedToBodyEulers_f()->theta;
|
||||
float gain = (float)fabs((double)(cosf(phi) * cosf(theta)));
|
||||
tfmini.distance = tfmini.distance / gain;
|
||||
tfmini.distance = tfmini.distance * gain;
|
||||
}
|
||||
|
||||
// send message (if requested)
|
||||
|
||||
Reference in New Issue
Block a user