It is connected to the ground in the sense that the air it is flying through is connected to the ground. i.e. the air is moving at generally the same velocity as the ground, give or take 20 or 30 knots or so. In a Westerly wind of 40 knots, the plane will be 40 knots faster if going East. In an Easterly wind of 40 knots, the plane will be 40 knots slower if going East. As far as the plane is concerned, the Earth is not rotating, nor is the shell of atmo.