pracstro 1.1.1

A simple astronomy library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use pracstro::{sol, time};

fn main() {
    let now = time::Date::now();
    for p in sol::PLANETS {
        let (ra, de) = p.location(now).equatorial();
        let ((rah, ram, _), (ded, dem, _)) = (ra.clock(), de.to_latitude().degminsec());
        println!(
            "{:<10} {:>2}h{:02} RA {:>3}°{:02}' De {:.2} AU",
            p.name,
            rah,
            ram,
            ded,
            dem,
            p.distance(now)
        );
    }
}