#==================== # R script to calculate distance to star # using parallax. #==================== theta=3.7276e-06 # Parallax (example is that of # Proxima Centauri). dist.au=1/tan(theta) # Distance in AU. dist.au # -- dist.ly=dist.au/63270 # 63270 LY per AU. dist.ly # Distance in LY.