Altitude hold difference between Dusk and Daylight flying?

I am having issues between the behavior of my Hexacopter with pixhawk when I fly at Dusk and when I fly in morning with sunlight. At dusk the altitude is not bad in Atl Hold and Loiter. During the day time the alt hold is very poor 2-3 meter variations within 15-20 seconds.

I have a feeling its either temp or maybe sunlight dependent.

Link to bin files

4-15 was a dusk flight to test battery life. I set it to fly at 2 meters seemed to do so without too much issues

4-16 is the next morning. I made multiple flights over 1.5 hours changing psc_accz_I and P and thst_expo and what not. didnt seem to help. around 10:42 it was getting crazy


Anyway I was planning on trying TCAL_Enabled and TCAL_Baro_expo.

But there is this warning : This feature is not useful for most autopilots including the Pixracer and Pixhawk family of boards

Is it worth doing this with pixhawk and what is the range of values for TCAL_BARO_EXPO. the instructions say set to a non zero value. which is very vague. O

I read sunlight might cause issues.

any help would be appreciated

Bin files: Hex Loiter Alt Variation - Google Drive

I

I remember reading years ago about the effect of light and covered some of my early FC’s barometers with a dark foam, even if located inside the case. Make sure the foam is open cell type, that is you can blow air through it. Found this:
[Baro sensor is sensitive to sunlight - PX4 Autopilot / Flight Controllers - Discussion Forum, for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink] (Baro sensor is sensitive to sunlight - Flight Controllers - Discussion Forum, for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink)

There were many articles about this at the time

Thank you for the link I read some messages about sunlight affecting the Baro. I will try to shield the baro from light and test.

Hope it helps. Be sure to cover with a dark-black foam (not pink or other light color). I found that a lot of packaging foam from electronics works well. Just cover the barometer (has a hole) and make sure you can blow air through whatever kind of foam you use. It made a difference on my builds to both light and propwash affecting the machine.
Good luck,
Joe

I ordered some black open cell foam. Should be delivered tomorrow and I can add the foam. I looked at you link and others and it seems to be the cure. I hope so.

This hexa was supposed to be a relaxing inexpensive build so I can get familiar with qground control for work, but it’s quite a learning curve. Without this forum I would have replaced the Pixhawk with something from mRo.

Just to be clear you are not having issues with Loiter?

At dusk I have no issues with loiter or alt hold. In the day time I have issues.

with loiter as well in day time? i am asking because i thought loiter would not be dependent on baro, which in turn would not be affected by light / temp

Loiter in day time is not good. Same as Alt Hold. From what I read Loiter altitude holding is the same as Alt Hold. Barometric pressure is used to estimate altitude, not gps altitude.

From my understanding loiter is alt hold with gps position lat long holding added.

That’s right. They both use the Altitude Hold Controller. Right out of the Loiter Wiki:
Loiter mode incorporates the altitude controller from AltHold mode. Details for tuning AltHold are on this wiki page

I opened the pixhawk and there was no foam in the little well. I put some open cell foam black in the well and added some black electrical tape to the inside the pixhawk case to help keep light out. Won’t have a chance to test till Friday or this weekend. Will report results.

Would like to report a successful test of the foam covering the Baro. Did a short test (two 1 mint flights back to back) at 10:30 AM in full sunllight with no altitude holding issues in alt hold, loiter and RTL.

Very thankful for your advice and am gaining confidence with this hexa.

Very stable altitude holding. easy less than 1 ft max and with in 6 inches most of the time in loiter.

1 Like