Given his strong interest in astronomy, Oriani was appointed on the staff of the Observatory of Brera in Milan in 1776, becoming assistant astronomer in 1778 and director in 1802. In 1778 he began publishing various in-depth dissertations on astronomical objects, the Effemeridi di Milano. A very capable astronomer, Oriani's work began to attract considerable attention. His research in the areas of astronomic refraction, the obliquity of the ecliptic, and orbital theory were of considerable noteworthiness in themselves; but his greatest achievement was his detailed research of the planet Uranus, which had been discovered by Sir William Herschel in 1781. Oriani devoted significant time to observations of Uranus, calculating its orbital properties which he published as a booklet of tables in 1793. After others had shown that Uranus was not on a parabolic orbit but rather in a roughly circular orbit, he calculated the orbit in 1783. In 1789, Oriani improved his calculations by accounting for the gravitational effects of Jupiter and Saturn. In addition to his continual contributions to the Effemeridi, he published a series of memoirs on spherical trigonometry: the Memorie dell' Istituto Italiano, 1806–10, and the Istruzione suelle misure e sui pesi, 1831. For his work in astronomy, Oriani was honored by naming asteroid 4540 "Oriani". This asteroid had been discovered at the Osservatorio San Vittore in Bologna, Italy on 6 November 1988.
Oriani's theorem
In De refractionibus astronomicis, Oriani showed that astronomical refraction could be expanded as a series of odd powers of, where Z is the observed zenith distance. Such a series had previously been derived by J. H. Lambert, who dropped all but the first term. However, Oriani investigated the higher terms, and he found that neither of the first two terms depended on the structure of the atmosphere. The series expansion he obtained was effective at up to 85 degrees from the zenith. Unlike previous approximations, however, Oriani's two-term expression did not depend on a hypothesis regarding atmospheric temperature or air density in relation to altitude. Thus, the effects of atmospheric curvature are only dependent upon the temperature and pressure at the location of the observer. Oriani's theorem explains why Cassini's uniform-density model works well except near the horizon—the atmospheric refraction from the zenith to a zenith distance of 70° is not dependent on the details of the distribution of the gas.