It might be good for performance to, when a player has activated gravity on a ship, consider that player part of the ship, not unlike turrets and docked ships. This will prevent glitches and boost performance.
i.e. the player will be on the coordinate grid of the ship instead of simply having...