Bowditch, Nathaniel, astronomer and mathematician