Pymavlink based movement

Hey, guys. I am writing a code that uses keyboard input that will make the copter move a distance fixed in the itself. but the issue comes when i try printing “global_position_int” when it makes the journey, and it doesnt get updated, on sitl and in real-life. so i find ways around this issue by using the lat , lon calculated using the distance, as the input lat, lon for the next keyboard input. another issue comes up when i yaw the copter with my controller and then the code doesnt account for the change in heading as the “global_position_int” is not getting updated . any suggestion / fixes?