mirror of
https://gitlab.com/orbital-debris-research/directed-study/report-1.git
synced 2025-06-16 06:56:45 +00:00
Merge branch 'main' of gitlab.com:orbital-debris-research/fusion-properties
This commit is contained in:
commit
dbaf3264bd
@ -50,13 +50,13 @@ fn main() {
|
|||||||
|
|
||||||
let mut outfile = fs::File::create("../compiled.csv").unwrap();
|
let mut outfile = fs::File::create("../compiled.csv").unwrap();
|
||||||
|
|
||||||
outfile.write_all(data.as_bytes()).unwrap();
|
outfile.write(data.as_bytes()).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_props(infile: Vec<String>) -> Properties {
|
fn parse_props(infile: Vec<String>) -> Properties {
|
||||||
let part_number = scan_fmt!(&infile[1], "Part Number {}", String).unwrap();
|
let part_number = scan_fmt!(&infile[1], "Part Number {/.+/}", String).unwrap();
|
||||||
let part_name = scan_fmt!(&infile[2], "Part Name {}", String).unwrap();
|
let part_name = scan_fmt!(&infile[2], "Part Name {/.+/}", String).unwrap();
|
||||||
let material_name = scan_fmt!(&infile[4], "Material Name {}", String).unwrap();
|
let material_name = scan_fmt!(&infile[4], "Material Name {/.+/}", String).unwrap();
|
||||||
|
|
||||||
let mass = scan_fmt!(&infile[14], "Mass {} g", f64).unwrap();
|
let mass = scan_fmt!(&infile[14], "Mass {} g", f64).unwrap();
|
||||||
let volume = scan_fmt!(&infile[15], "Volume {} mm^3", f64).unwrap();
|
let volume = scan_fmt!(&infile[15], "Volume {} mm^3", f64).unwrap();
|
||||||
@ -89,7 +89,7 @@ fn parse_props(infile: Vec<String>) -> Properties {
|
|||||||
let Izy = scan_fmt!(&infile[32], "Izy {}", f64).unwrap();
|
let Izy = scan_fmt!(&infile[32], "Izy {}", f64).unwrap();
|
||||||
let Izz = scan_fmt!(&infile[33], "Izz {}", f64).unwrap();
|
let Izz = scan_fmt!(&infile[33], "Izz {}", f64).unwrap();
|
||||||
|
|
||||||
Properties {
|
return Properties {
|
||||||
part_number,
|
part_number,
|
||||||
part_name,
|
part_name,
|
||||||
material_name,
|
material_name,
|
||||||
@ -112,5 +112,5 @@ fn parse_props(infile: Vec<String>) -> Properties {
|
|||||||
Izx,
|
Izx,
|
||||||
Izy,
|
Izy,
|
||||||
Izz,
|
Izz,
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user