Position hold of drone with gps

hello guys i made simple fully autonomous quad copter . it work is just hold the particular height . but the problem is not able to hold the position its hovering on height but it drifting around please help me to fix this

Please tune the PID values and if that does not help, get a better GPS receiver.

Position hold is a GPS flight mode, so check the quality of the GPS lock. HDOP is the measure of the GPS accuracy you’re receiving, you want less than 2.0 at minimum, 1.0 is very good. You can find the HDOP value in mission planner or in the log

my pid is tuned at great . for balancing it work great but for it move around .
i need the hold the position without GPS because im testing in indoor and there is no range for GPS

my pid is tuned at great . for balancing it work great but for it move around .
i need the hold the position without GPS because im testing in indoor and there is no range for GPS

What sensor are you using to replace GPS?

@jagadish

Optical flow sensors are supported by ardupilot and may be what you’re looking for

http://ardupilot.org/copter/docs/common-optical-flow-sensors-landingpage.html

there is no any sensor for that i used only mpu6050 as imu, lidar for altitude only these two sensor
i just need hover on particular height n stay on that but in my case its hover but drifting around i need to hover on same location.
can u suggest any sensor ill used except gps because im test in indoor

firstly can optical flow sensor work same as lidar. i used lidar for vertical controll , i need position hold in horizontal plane. im able to hold vertical position but im fail to do for horizontal can you please help to solve these issue.
we can talk on mail here is my mail id. jagadish.etc@gmail.com

Read the documentation about optical flow, and post concrete questions after that.