Need help in making a drone autonomous using waypoint navigation

Hi community, I have been struggling in making a drone autonomous using M10 GPS module, Pixhawk 6X. Resetting all the parameters and calibrating the quadcopter for multiple number of times went into vain. Later I have verified the GPS connection and the IMU data and they seems to be okay. The UAV got armed in stabilized mode and immediately when switched to mission mode to follow the waypoints, the message window went on to show an error - “Switching to mission mode is currently not possible, no valid local position estimate, no valid global position estimate”. Can you guys please help me to figure this out.