Question 1:
The quadcopter has the pixhawk 4 and does not have GPS and other extra sensors.
For that case, the altiude mode uses the barometer and accelerometer inside of the Pixhawk 4?
Question 2:
Are the barometer and accelerometer enough to hold the altitude without fluctuations?
Question 3:
Is my understanding below correct?
The throttle stick controls rate of ascend/descend [m/s].
With the settings below, the vertical velocity is correct for the throttle stick position?
Settings:
Maximum vertical ascent velocity. Default: 3 m/s.
Maximum vertical descent velocity. Default: 1 m/s.
Throttle Position & Vertical Velocity:
Throttle stick is at 25%. ⇒ Vertical descent velocity of 0.5 m/s is set.
Throttle stick is at 50%. ⇒ Vertical descent velocity of 0 m/s is set. (holding the altitude)
Throttle stick is at 75%. ⇒ Vertical asscent velocity of 1.5 m/s is set.
Question 4:
Where could I find the codes for the altitude mode logic?
Yes.
Generally you can hold vertical position fairly well - barometer is almost always used for calculating altitude. However note that since barometers calculate altitude from pressure, anything that affects the pressure can affect the estimate (e.g. bad weather). The estimator attempts to fuse the accelerometer data to compensate for this. An example of a problem case: https://docs.px4.io/master/en/advanced_config/static_pressure_buildup.html
Nearly. There is a deadzone at 50% (see docs). This is a zone in which moving the sticks up or down doesn’t change the altitude. In the zone, yes, the vertical velocity is zero. What this zone means though is that the “half way” positions might not be at 75 and 25% as you have indicated.
Also the velocity isn’t halved at the “half way points” - it is reversed. So at 0 it will be 3/ms down, and at 100% it will be 3m/s up.
Thank you very much for your response. I really appreciate it.
Do you know the range of the deadzone? The document says “the vehicle will take off if the throttle stick is raised above 62.5% percent (of the full range from bottom).” (https://docs.px4.io/v1.9.0/en/flight_modes/altitude_mc.html)
So, I’m guessing the deadzone is somewhere below 50% to 62.5%.
It seems that the link is broken. Could you update the link?