Does anyone know if it is possible to perform a precision landing without a GPS? I am currently flying a quadcopter with Pixhawk 2.1, Pixy camera, and the MarkOne Beacon. I am mostly flying in GPS restricted environments and was wondering if it was possible to still perform a precision landing in AltHold instead of using loiter
Precision tracking will only work in navigation-enabled modes, but you do not necessarily need a GPS. For example, I have tracked a beacon in Land and Precision Loiter modes after setting EK2_GPS_TYPE = 0 (No GPS).
I’m not sure if you’ll be able to change to these modes if you do not have any navigation sensor so you might have to find a way around that, but I do know that it will work.
I believe you can do a manual land by commanding the drone to descend/go left/right/whatever however as I understand it, without GPS it will drift over time. I think the answer above is better than mine but HTH.
It sends position/velocity commands, which ostensibly means that the EKF needs to be initialized. I’ve never tried it without any position sensor at all; I’ve only tried it by turning off the EKF’s use of the GPS in flight.
BTW I corrected my post; the parameter I use to “turn off” the GPS is EK2_GPS_TYPE, not GPS_TYPE.
Ahh, that makes sense. We are using EKF 3 because we need external YAW sensor (dual GPS)
So right now if we set EKF gps type to 3 (no GPS), we get AHRS errors and EKF errors (obviously) because there is no positional data being used. Are you saying that if we were to plug in the IR lock in this state, the errors would go away and we could fly?
Is it the fact that the EKF sees velocity+position XY commands from somewhere/anywhere that enables it to pass the checks and arm?
If you want to use Precision Landing without GPS , you would need to use a positionnal or velocity estimator to feed the EKF. Optical Flow (like the PX4Flow) could be an option if the vehicle is landing over a non reflective surface with some features so the optical flow camera can process the Velocity Estimation. A RangeFinder is required for this configuration to work.
Enabling the IR-Lock won’t make the prearm errors go away. In our usage, we launch the drone with the GPS enabled (EK2_GPS_TYPE = 0). Then, while the drone is hovering over the beacon, we can set EK2_GPS_TYPE = 3 and the drone will continue tracking the beacon.
We have tested this a lot because we had a situation where GPS was unreliable at low altitude (while landing), so turning off GPS position fusion was necessary to track properly. My disclaimer is that we have only tried this on Copter 3.6.x with EKF2, so YMMV with Copter 4.x and EKF3.
LANDING_TARGET is intended for precision landing using input from a companion computer (PLND_TYPE = 1). ArduCopter has a built-in driver for the IR-Lock sensor (PLND_TYPE = 2) and does not use the LANDING_TARGET message, as all sensor data and offsets are handled internally.
I see, thank you! Do you know if it is possible to get Precision Loiter to work with a companion computer as well? Would that require the LANDING_TARGET message or would it work with SET_POSITION_TARGET_LOCAL_NED?
Right. You should be able to use LANDING_TARGET to do precision loiter and precision landing. Both of those are exactly the same as the normal Loiter (hover) and Land (descend) modes, except that they now follow the landing target.
I tried to find the mavlink_landing_target_t in the source code but it seems to be missing under mavlink/common. Am I perhaps missing something? I updated my mavlink directory with the one I found at the link below that includes mavlink_msg_landing_target.h. When compiling though, I get still get this error:
“error: mavlink_landing_target_t does not name a type, did you mean mavlink_attitude_target_t?”
I might have found the problem, I will report back here shortly.
Edit: That was the problem, if anyone else if having an include error, be sure to check if MESSAGE DEFINITIONS in common.h has the correct .h file. Otherwise, you may need to include it. In this case it was mavlink_msg_landing_target.h that needed to be included
It is not possible. If you review the source code, the precision landing logic is called in the method Mode::land_run_horizontal_control() which is called by ModeLand::gps_run(). The last one requires GPS as its name suggests.