This commit is contained in:
yuni 2024-04-14 22:34:12 +02:00
parent 3c317111d3
commit d1aaefb490
3 changed files with 3 additions and 3 deletions

View file

@ -34,7 +34,7 @@ MAX_APPARENT_MAGNITUDE = 7.0
print("// This file was autogenerated by \"genrate_starchart.py\" using data from the") print("// This file was autogenerated by \"genrate_starchart.py\" using data from the")
print("// HYG database: https://github.com/astronexus/HYG-Database/tree/main/hyg") print("// HYG database: https://github.com/astronexus/HYG-Database/tree/main/hyg")
print("// License: CC BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/") print("// License: CC BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/")
print("// Each star's values: [x, y, z, magnitude, color index, distance, name]") print("// Each star's values: (x, y, z, magnitude, color index, distance, name)")
print("[") print("[")

View file

@ -1,7 +1,7 @@
// This file was autogenerated by "genrate_starchart.py" using data from the // This file was autogenerated by "genrate_starchart.py" using data from the
// HYG database: https://github.com/astronexus/HYG-Database/tree/main/hyg // HYG database: https://github.com/astronexus/HYG-Database/tree/main/hyg
// License: CC BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/ // License: CC BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/
// Each star's values: [x, y, z, magnitude, color index, distance, name] // Each star's values: (x, y, z, magnitude, color index, distance, name)
[ [
(1.0,0.0,-0.0,-26.7,0.656,0.0,"Sol"), (1.0,0.0,-0.0,-26.7,0.656,0.0,"Sol"),
(-0.1875,-0.2876,-0.9392,-1.44,0.009,2.6371,"Sirius"), (-0.1875,-0.2876,-0.9392,-1.44,0.009,2.6371,"Sirius"),

View file

@ -12,7 +12,7 @@ pub const PARSEC2METER: f64 = 3.0857e16;
pub const DIST_JUPTER_SUN: f64 = 778479.0e6; pub const DIST_JUPTER_SUN: f64 = 778479.0e6;
pub const EARTH_GRAVITY: f32 = 9.81; pub const EARTH_GRAVITY: f32 = 9.81;
// Each star's values: [x, y, z, magnitude, color index, distance, name] // Each star's values: (x, y, z, magnitude, color index, distance, name)
pub const STARS: &[(f32, f32, f32, f32, f32, f32, &str)] = &include!("data/stars.in"); pub const STARS: &[(f32, f32, f32, f32, f32, f32, &str)] = &include!("data/stars.in");
pub fn star_color_index_to_rgb(color_index: f32) -> (f32, f32, f32) { pub fn star_color_index_to_rgb(color_index: f32) -> (f32, f32, f32) {