Astrolabe is a brass circle with carefully adjusted rings marked off in degrees that can be used to calculate latitude.
The astrolabe had to be used only during daytime (cannot be used at night) because it depends on the visualization of the stars.Astrolabe could not be used in bad weather.
On the other hand, the magnetic compass depends mainly on the magnetic field of the Earth.
That's why it can be used at any time in the day (whether daytime or night) and in any weather.