Max Ground Speed and set altitude on hold position

I want to implement the set altitude and change max ground speed like qgc is doing using mavsdk or pymavlink. How can I achieve it?