Which MAVLink commands can fly a copter without GPS?

I have a 3DR Solo that I want to fly indoors as part of a research project. It is a stock Solo, so I believe it runs a forked ArduCopter 3.3. I would like to disable GPS and be able to command this from an off-board computer. The off-board computer will be tracking the Solo, so as the Solo drifts around, it can send commands to correct for this.

Right now, I just want to test this out on the SITL. It seems like putting the copter in STABILIZE mode and then repeatedly sending MANUAL_SETPOINT, MANUAL_CONTROL, or SET_ACTUATOR_CONTROL_TARGET MAVLink messages would be the right approach. Does that make sense? Will those commands work? Is there a better or standard approach for this?

(I have been trying to do just that with dronekit-python sending the messages to SITL, but it doesn’t seem to work. I know it could be dronekit too, but I wanted to check with the ArduCopter community that my approach makes sense first.)

1 Like

Hey I am trying to do something similar using Solo. I am using Altitude Hold mode for this. Have you gone through Arducopter Indoor Navigation guide- link?

I dont know standard method but i am following the method mentioned in the link. I changed the parameters (ARMING_CHECK, AHRS_GPS_USE, EKF_GPS_TYPE, FS_BATTERY_ENABLE, FS_THR_ENABLE< FENCE_ENABLE, FS_EKF_ACTION, FS_EKF_THRESH) mentioned in the link for setting EKF data updates rather than GPS updates and few other changes.

However I am not completely successful yet as I get EKF Variance error and the UAV (simulation + physical solo) lands within 2/3 seconds

Thanks for your reply. Yes, I have seen that link. Based on that, I am using stabilize mode since they mention that alt-hold uses the barometer which is not reliable indoors. However, stabilize mode requires constant input to maintain altitude, so my simulated copter falls to the ground – because I think the commands I am using are not being received or processed by ArduCopter. So I am still trying to figure out which MAVLink commands to send. Which commands are you sending?

From what you said, I guess you are setting EKF_GPS_TYPE to 3 (No GPS use optical flow)? That is what I am using for that parameter. I would guess that doing that would remove the GPS input from the EKF, but I don’t know for sure. If not, you could try adjusting its EKF weights – I would guess that setting parameters like EKF_VELNE_NOISE, EKF_VELD_NOISE, EKF_POSNE_NOISE to their max value might force the EKF to not rely heavily on the GPS. This is not an ideal solution, but it might be something to test out.

In any case, without GPS, I would expect the position/orientation portion of EKF variance to grow over time. However, the velocity portions should not rise since they would likely be fed from the accelerometers and gyros. Based on the parameter documentation (link), the variance check parameter (FS_EKF_THRESH) is only for the velocity and compass variance. I’m guess here, but maybe by “compass variance”, they mean the heading variance (which would probably be jointly fed by both the GPS and the compass sensors). So, if you are getting a “ekf variance” error, maybe that indicates that the GPS measurements are still influencing this? I’m not sure. This page (link) also seems to support this hypothesis since it indicates that a heading error will trigger a EKF variance error like you are experiencing. It may be that in this case, your system is not configured to fallback to the legacy estimation system (called DCM). So, maybe by setting EKF_FALLBACK=1 (or by just always using the legacy system during flight by setting AHRS_EKF_TYPE=0) you can avoid this error? Again, everything I’ve said here is just a guess – I have not looked through the ArduCopter source code, so I don’t know how it all works.

Let me know how it goes.

I know this thread is a little dated but just wondering if you had any success with sending mavlink commands to copter without gps? Any insights on which commands work? i have been able to arm the copter in “alt hold” mode but the standard “takeoff” command seems to have no affect. although manual controls from the transmitter are working fine. I’d like the ability to do some of this from a gcs too if possible.

2 Likes