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: Redirecting to latest version of document (main)
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).” (Altitude (MC) · PX4 v1.9.0 User Guide)
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?
I am aware that this thread is long closed, but I had a few questions that may be relative to my situation.
The vertical ascent is set to a default of 3m/s then is this only achieved if the throttle stick is at 100%?
I am having issues in my missions where the drone is not ascending nearly fast enough to reach the desired altitude. It seems to put a preference and ground speed over all else and is messing up with my LiDAR missions.
Can I impact its ability to climb at these velocities by changing an acceleration value? Is there a more simple solution that places weight on altitude vs speed so the drone will adjust its speed to reach the desired waypoint`s altitude?
Please create a new issue. This answer is for a specific question about a specific mode on PX4 v1.9 - unless you’re working on that same mode and close to that same version it is better to ask a new question and cross link if you think this question is relevant.