initial commit
This commit is contained in:
commit
8caddafdaa
20 changed files with 6288 additions and 0 deletions
2
orthros-network/src/lib.rs
Normal file
2
orthros-network/src/lib.rs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
pub mod starchart;
|
||||
pub const SCALEAU: f32 = 1.0;
|
||||
1
orthros-network/src/starchart/mod.rs
Normal file
1
orthros-network/src/starchart/mod.rs
Normal file
|
|
@ -0,0 +1 @@
|
|||
pub mod star;
|
||||
127
orthros-network/src/starchart/star.rs
Normal file
127
orthros-network/src/starchart/star.rs
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
use crate::SCALEAU;
|
||||
|
||||
const SOLARRADIUSTOLY: f32 = 7.35355e-8;
|
||||
|
||||
fn solar_radius_to_ly_scaled(r: f32) -> f32 {
|
||||
r * SOLARRADIUSTOLY * SCALEAU
|
||||
}
|
||||
pub enum StarClass {
|
||||
MType,
|
||||
BType,
|
||||
GType,
|
||||
}
|
||||
pub struct StarInfo {
|
||||
pub name: String,
|
||||
pub class: StarClass,
|
||||
pub diameter: f32,
|
||||
}
|
||||
pub fn star_diameter_range(class: &StarClass) -> std::ops::Range<f32> {
|
||||
match class {
|
||||
StarClass::MType => solar_radius_to_ly_scaled(0.102)..solar_radius_to_ly_scaled(0.7),
|
||||
StarClass::BType => solar_radius_to_ly_scaled(1.8)..solar_radius_to_ly_scaled(6.6),
|
||||
StarClass::GType => solar_radius_to_ly_scaled(0.96)..solar_radius_to_ly_scaled(1.15),
|
||||
}
|
||||
}
|
||||
// const STARSIZES: &
|
||||
pub const STARS: &[&str] = &[
|
||||
"Sun",
|
||||
"Sirius",
|
||||
"Canopus",
|
||||
"Alpha Centauri",
|
||||
"Arcturus",
|
||||
"Vega",
|
||||
"Capella",
|
||||
"Rigel",
|
||||
"Procyon",
|
||||
"Achernar",
|
||||
"Betelgeuse",
|
||||
"Hadar",
|
||||
"Altair",
|
||||
"Acrux",
|
||||
"Aldebaran",
|
||||
"Antares",
|
||||
"Spica",
|
||||
"Pollux",
|
||||
"Fomalhaut",
|
||||
"Deneb",
|
||||
"Mimosa",
|
||||
"Regulus",
|
||||
"Adhara",
|
||||
"Shaula",
|
||||
"Castor",
|
||||
"Gacrux",
|
||||
"Bellatrix",
|
||||
"Elnath",
|
||||
"Miaplacidus",
|
||||
"Alnilam",
|
||||
"Alnair",
|
||||
"Alioth",
|
||||
"Dubhe",
|
||||
"Alkaid",
|
||||
"Alhena",
|
||||
"Suhail",
|
||||
"Mirfak",
|
||||
"Wezen",
|
||||
"Sargas",
|
||||
"Avior",
|
||||
"Kaus Australis",
|
||||
"Alphard",
|
||||
"Hamal",
|
||||
"Diphda",
|
||||
"Peacock",
|
||||
"Menkalinan",
|
||||
"Rasalhague",
|
||||
"Algieba",
|
||||
"Markab",
|
||||
"Polaris",
|
||||
"Almach",
|
||||
"Zubenelgenubi",
|
||||
"Alpherg",
|
||||
"Rasalgethi",
|
||||
"Mira",
|
||||
"Alsephina",
|
||||
"Caph",
|
||||
"Nunki",
|
||||
"Sadalmelik",
|
||||
"Merak",
|
||||
"Ankaa",
|
||||
"Eltanin",
|
||||
"Aludra",
|
||||
"Kochab",
|
||||
"Zosma",
|
||||
"Menkent",
|
||||
"Muhlifain",
|
||||
"Nashira",
|
||||
"Algol",
|
||||
"Denebola",
|
||||
"Scheat",
|
||||
"Alnitak",
|
||||
"Mintaka",
|
||||
"Izar",
|
||||
"Saiph",
|
||||
"Phecda",
|
||||
"Tureis",
|
||||
"Alcor",
|
||||
"Meissa",
|
||||
"Sadr",
|
||||
"Atlas",
|
||||
"Pleione",
|
||||
"Electra",
|
||||
"Taygeta",
|
||||
"Maia",
|
||||
"Celaeno",
|
||||
"Sterope",
|
||||
"Merope",
|
||||
"Alrakis",
|
||||
"Tarf",
|
||||
"Rukbat",
|
||||
"Wasat",
|
||||
"Thuban",
|
||||
"Zubeneschamali",
|
||||
"Vindemiatrix",
|
||||
"Lesath",
|
||||
"Gienah",
|
||||
"Tarazed",
|
||||
"Tiaki",
|
||||
"Teegarden's Star",
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue