Surface Tracking not Working on Loiter Mode

Hello Guys . I Just Had A Flight with my Hexa Copter and I Use “GPS” EK3 SRC Z 1 - 2 - 3 but I used range Finder and surface Tracking for better experience and maintaining altitude from surface in flight ,

in this Flight that I Attached a log . after i changed to loiter it goese Down . it seems it follows The GPS Altitude instead using Rangfinder for maintain Altitiude ,

you can see FC Follow Desired Alt perfectly

but it not followed Range finder Desired Alt at All

and as you can see while the drone is hovered the GPS Alt goes Up by Error and I Think the FC Tries to go down to maintain the Alt . but it should follow The range finder as SURFTRAK is enabled.

in below picture you can see the GPS Alt goes up bye Error and range finder shows Drone Comes Down (it follows GPS Data)

Please check this . thank you so much .

this is another Log . changing Alt is even Happend On Auto mode . it Start to climb just after reached some waypoint . and it happend twice .

i appreciate if you can check this if you have a chance . my code based on APM4.5.7
@rmackay9

Hi @DonaldJ,

Thanks for the report.

Considering how mature AP 4.5.x is, it’s unlikely that there is a software bug. It’s more likely a hardware or configuration issue.

One unusual thing about the setup is that it appears to be using a Lua rangefinder. That immediately makes me worry that there is a Lua script issue sending odd or incorrect data that is used by surface tracking.

I also see that the SURFTRAK_TC has been set to 4 which will make the response slower.

Thank you for check this out.

I check the Sensor Validation Data Again and every thing seems Normal.
I was worried maybe data Has a lag but it seems fine with 20Hz update rate .
can you check the second log. Copter start to climb in Auto Mode high to 10 meter after some waypoints but point was about 2 meter with terrain Frame .

another Question is “SURFTRAK_TC” is has affect on Auto mode terrain following or It only applies in Pilot modes ?

with respect

update on this .
I fly again to check SURFETRAK_TC effect on Auto Mode Terrain Tracking and this is a result
i done a Circular mission like this

with SURFTRAK_TC = 1 and SURFTRAK_TC = 4 and all points except Take off has a 4m Terrain Alt Frame

here is a log

Hi @DonaldJ,

Thanks for the log.

The surface tracking parameters will only apply in semi-autonomous modes like Loiter, AltHold, PosHold. They don’t apply to Auto, Guided or RTL modes.

I guess this vehicle is not flying standard ArduPilot but instead a non-public branch. With the limited resources we have on the dev team, it’s difficult to support private versions of the code. Maybe you could put standard AP on the vehicle and try again?

I’m not sure if you are the customer or supplier of this drone but if you’re the customer, because of AP’s GPLv3 license you may be able to get the AP software from the supplier. There are some caveats to this and it’s not really my problem but just FYI.

thank you . i try to upload the Official Stable and response soon

1 Like