Althld and loiter not hold altitude

i use apm2.8 and m8n gps. in stabilize mode drone is flying but altitude not hold.And when arming in althld mode when give throttle 30-40% then suddenly increase the throttle high and crash.and.previouly working fine in loiter and althld modebut now not working.In althold mode my quad behave crazzy. and i also cover the barometer by foam.
my log
Log File C:\Users\JYOTIRMOY\Documents\Mission Planner\logs\QUADROTOR\1\2019-03-20 00-07-19.log
Size (kb) 101.7666015625
No of lines 1801
Duration 3 days, 7:08:14
Vehicletype ArduCopter
Firmware Version V3.2.1
Firmware Hash 36b405fb
Hardware Type
Free Mem 0
Skipped Lines 0
Test: Autotune = UNKNOWN - No ATUN log data
Test: Brownout = GOOD -
Test: Compass = GOOD - No MAG data, unable to test mag_field interference

Test: Dupe Log Data = GOOD -
Test: Empty = GOOD -
Test: Event/Failsafe = FAIL - ERR found: GPS
Test: GPS = FAIL - Min satellites: 0, Max HDop: 2.21
Test: IMU Mismatch = UNKNOWN - No IMU log data
Test: Motor Balance = UNKNOWN -
Test: NaNs = FAIL - Found NaN in GPS.VZ

Test: OpticalFlow = FAIL - ‘FLOW_FXSCALER’ not found
Test: Parameters = GOOD -
Test: PM = GOOD -
Test: Pitch/Roll = GOOD -
Test: Thrust = GOOD -
Test: VCC = GOOD -

2nd log

File C:\Users\JYOTIRMOY\Documents\Mission Planner\logs\QUADROTOR\1\2019-03-20 00-04-15.log
Size (kb) 297.6005859375
No of lines 4744
Duration 3 days, 7:07:13
Vehicletype ArduCopter
Firmware Version V3.2.1
Firmware Hash 36b405fb
Hardware Type
Free Mem 0
Skipped Lines 0
Test: Autotune = UNKNOWN - No ATUN log data
Test: Brownout = GOOD -
Test: Compass = GOOD - No MAG data, unable to test mag_field interference

Test: Dupe Log Data = GOOD -
Test: Empty = GOOD -
Test: Event/Failsafe = FAIL - ERR found: GPS
Test: GPS = FAIL - Min satellites: 0, Max HDop: 3.36
Test: IMU Mismatch = UNKNOWN - No IMU log data
Test: Motor Balance = UNKNOWN -
Test: NaNs = GOOD -
Test: OpticalFlow = FAIL - ‘FLOW_FXSCALER’ not found
Test: Parameters = GOOD -
Test: PM = GOOD -
Test: Pitch/Roll = GOOD -
Test: Thrust = GOOD -
Test: VCC = GOOD -