A rocket is launched from the Space Coast of Florida and can be seen from local schools. The angle of elevation from Western High School and Pine High School are 41.25 degrees and 23.125 degrees respectively. If the two schools are 512 miles apart, how far is the rocket from Pine High School?