Indoor flights, AHRS_GPS_USE

Hi there,

I have a vehicle equipped with GPS for ability to fly outdoors when GPS is available, but it also flies indoors in GPS-denied environments. I am reading the Indoor Flying Guidelines, which states

Disable GPS in non-auto** modes - set AHRS_GPS_USE to 0

https://ardupilot.org/copter/docs/indoor-flying.html

However, when I go to AHRS_GPS_USE in Mission Planner, the popup help window says

A value of zero should never be used for normal flight.

I am hoping to get some guidance here because it seems to be conflicting information, dependent on how one defines “normal flight”.

As it is, my RC9 is set to 90 (EKF Source Set) to switch between using GPS and Optical Flow/LIDAR depending on whether I am flying outdoors or in GPS-denied environments. So, should I write a script that monitors RC9 PWM and set AHRS_GPS_USE = 0 using Optical Flow and set AHRS_GPS_USE = 1 when using GPS? Or should I just leave it to 1 or should I leave it to 0?

Thank you

I have some time this week so I am going to try to set AHRS_GPS_USE to 0 and report back what happens.

Hi @tdempsey,

That page is really meant for users who wish to fly in completely manual modes indoors. For what you’re trying to do, the GPS/Non-GPS transitions page is more appropriate.

In short you shouldn’t need to change AHRS_GPS_USE = 0.

FYI @hwurzburg

@rmackay9 Exactly what needws to be changed/espanded on which pages?

That page is really meant for users who wish to fly in completely manual modes indoors.

This means flight modes such as Stabilize, Altitude Hold, and Loiter… is that correct? Those are the only flights modes I use.

what you’re trying to do, the GPS/Non-GPS transitions page is more appropriate.

I am doing the manual GPS/Non-GPS transition via RC switch. So for example, as soon as I fly into a space where it is either GPS-denied or I suspect GPS quality will be poor, I will manually switch to my Optical Flow/LIDAR sensor. I am wondering though, once I am in a GPS-denied environment, wouldn’t I want to disable any GPS usage?

Hi @tdempsey,

Loiter is a semi-autonomous mode in that the user controls where they want to vehicle to go but the autopilot is really in control of the attitude, speed and position of the vehicle. Loiter requires a position estimate. The EKF needs an external sensor beyond the IMU (e.g. optical flow, GPS, external navigation camera, etc) for Loiter to work.

By changing the EKF source set, you will be able to disable the EKF from using the GPS. No need to do anything more I think

1 Like