The sub will have a basic figure set in its .zon files e.g 210
All hull damage is then taken into account. 20% damage will reduce max depth.
One of the Navigators passive abilities places a additional % of extra depth that can be achieved but this can be offset when using another ablity that reduces the passive bonus effects.
Overall, Max diving depth in SH5 is much better than SH3 because it is dynamic and changes it's variables during gameplay on more that just hull damage.
You could say SH5 max depth is truely dynamic