Browse Source

Copter : temporary mods to test use of flow sensor internal gyro data

mission-4.1.18
priseborough 11 years ago committed by Andrew Tridgell
parent
commit
635e593d55
  1. 8
      ArduCopter/ArduCopter.pde

8
ArduCopter/ArduCopter.pde

@ -1206,9 +1206,13 @@ static void update_optical_flow(void) @@ -1206,9 +1206,13 @@ static void update_optical_flow(void)
if (optflow.last_update() != last_of_update) {
last_of_update = optflow.last_update();
uint8_t quality = optflow.quality();
Vector2f raw = optflow.velocity();
Vector2f rawFlowRates = optflow.velocity();
Vector2i temp = optflow.raw();
Vector2f rawGyroRates;
rawGyroRates.x = 0.001f * float(temp.x);
rawGyroRates.y = 0.001f * float(temp.y);
float ground_distance_m = optflow.ground_distance_m();
ahrs.writeOptFlowMeas(quality, raw, ground_distance_m, last_of_update);
ahrs.writeOptFlowMeas(quality, rawFlowRates, rawGyroRates, ground_distance_m, last_of_update);
if (g.log_bitmask & MASK_LOG_OPTFLOW) {
Log_Write_Optflow();
}

Loading…
Cancel
Save