如图,在△ABC中,∠BAC=90°,AB=AC=a,AD是△ABC的高,则AD的长为______.