Material Name,Units,Density,Low,High,Class,Rocketry Use,Body Tubes,Fin Sets,Launch Lugs,Cords,Nose,Chute,Streamer,Trans,Ring,Bulkhead,Engine Block,Sleeve,Tube Coupler,spare,spare,spare,spare,spare,spare,spare,Fixed dim type,Fixed dim units,Fixed dim value,\r
Fiber,lb/ft3,41,,,,1,0,0,0,0,0,0,0,0,1,1,0,0,0,,,,,,,,None,In.,0\r
lite ply,lb/ft3,22,,,,1,0,1,0,0,0,0,0,0,1,1,1,0,0,,,,,,,,None,In.,0\r
-\r
+Balsa,lb/ft3,8,,,Wood,1,1,1,0,0,1,0,0,1,1,1,1,0,0,,,,,,,,None,0,0\r
+Paper,lb/ft3,70,,,,1,1,1,1,0,1,0,1,1,1,1,1,1,1,,,,,,,,None,0,0\r
BalsaMachining.com,BMS60V2B,V2 Boat-tail with bored BT20 hole,in.,0.50,1.59,1.63,3.70,1.05,0.73,0.00,0.00,,solid,Balsa,0,,0,Ogive,0\r
BalsaMachining.com,BMSV2BT1,V2 Boat-tail with bored BT50 hole,in.,0.50,1.59,1.63,3.70,1.11,0.97,0.00,0.00,,solid,Balsa,0,,0,Ogive,0\r
BalsaMachining.com,BTC55Z,V2 Boat-tail with bored BT20 hole,in.,0.50,1.28,1.32,3.00,0.97,0.73,0.00,0.00,,solid,Balsa,0,,0,Ogive,0\r
-BalsaMachining.com,TA2050,Transition T20 to T50 2 in long,in.,0.50,0.71,0.73,2.00,0.97,,0.50,0.71,,solid,Balsa,0,oz.,0,Conical,0\r
-BalsaMachining.com,TA2050A,Transition T20 to T50 1 in long,in.,0.50,0.71,0.73,1.00,0.97,,0.75,0.95,,solid,Balsa,0,oz.,0,Conical,0\r
-BalsaMachining.com,TA2055,Transition T20 to T55 1.5 in long,in.,0.50,0.71,0.73,1.50,1.63,,0.75,1.28,,solid,Balsa,0,oz.,0,Conical,0\r
-BalsaMachining.com,TA2060,Transition T20 to T80 0.84 in long,in.,0.75,0.71,0.73,0.84,2.60,,0.75,2.55,,solid,Balsa,0,oz.,0,Conical,0\r
-BalsaMachining.com,TA5055,Transition T50 to T55 1 in long,in.,0.75,0.95,0.97,1.00,1.63,,0.75,1.28,,solid,Balsa,0,oz.,0,Conical,0\r
-BalsaMachining.com,TA5055L,Transiition T50 to T55 1.5 in long,in.,0.75,0.95,0.97,1.50,1.63,,0.75,1.28,,solid,Balsa,0,oz.,0,Conical,0\r
-BalsaMachining.com,TA5060,Transition T50 to T60 2 in long,in.,0.75,0.95,0.97,2.00,1.63,,0.75,1.59,,solid,Balsa,0,oz.,0,Conical,0\r
-BalsaMachining.com,TA520,Transition T5 to T20 0.78 in long,in.,0.50,0.51,0.54,0.78,0.73,,0.50,0.71,,solid,Balsa,0,oz.,0,Conical,0\r
-BalsaMachining.com,TA550,Transition T5 to T50 1 in long,in.,0.50,0.51,0.54,1.00,0.97,,0.50,0.95,,solid,Balsa,0,oz.,0,Conical,0\r
-BalsaMachining.com,TA555,Transiition T5 to T55 2.75 in long,in.,0.75,0.51,0.54,2.75,1.63,,0.75,1.28,,solid,Balsa,0,oz.,0,Conical,0\r
-BalsaMachining.com,TA5560,Transition T55 to T60 1 long,in.,1.00,1.28,1.63,1.00,1.63,,1.00,1.59,,solid,Balsa,0,oz.,0,Conical,0\r
-BalsaMachining.com,TA5560A,Transition T55 to T60 1.3 in long,in.,0.75,1.28,1.63,1.30,1.63,,0.75,1.59,,solid,Balsa,0,oz.,0,Conical,0\r
-BalsaMachining.com,TA6070,Transition T60 to T70 1.75 in long,in.,0.60,1.59,1.63,1.50,2.21,,0.60,2.17,,solid,Balsa,0,oz.,0,Conical,0\r
-BalsaMachining.com,TA6080,Transition T60 to T80 2.25 in long,in.,1.25,1.59,1.63,2.25,2.60,,1.50,2.55,,solid,Balsa,0,oz.,0,Conical,0\r
-BalsaMachining.com,TA7080,Transition T70 to T80 2 in long,in.,1.40,2.17,2.21,2.00,2.60,,1.40,2.55,,solid,Balsa,0,oz.,0,Conical,0\r
+BalsaMachining.com,TA2050,Transition T20 to T50 2 in long,in.,0.50,0.71,0.73,2.00,0.97,0,0.50,0.71,,solid,Balsa,0,oz.,0,Conical,0\r
+BalsaMachining.com,TA2050A,Transition T20 to T50 1 in long,in.,0.50,0.71,0.73,1.00,0.97,0,0.75,0.95,,solid,Balsa,0,oz.,0,Conical,0\r
+BalsaMachining.com,TA2055,Transition T20 to T55 1.5 in long,in.,0.50,0.71,0.73,1.50,1.63,0,0.75,1.28,,solid,Balsa,0,oz.,0,Conical,0\r
+BalsaMachining.com,TA2060,Transition T20 to T80 0.84 in long,in.,0.75,0.71,0.73,0.84,2.60,0,0.75,2.55,,solid,Balsa,0,oz.,0,Conical,0\r
+BalsaMachining.com,TA5055,Transition T50 to T55 1 in long,in.,0.75,0.95,0.97,1.00,1.63,0,0.75,1.28,,solid,Balsa,0,oz.,0,Conical,0\r
+BalsaMachining.com,TA5055L,Transiition T50 to T55 1.5 in long,in.,0.75,0.95,0.97,1.50,1.63,0,0.75,1.28,,solid,Balsa,0,oz.,0,Conical,0\r
+BalsaMachining.com,TA5060,Transition T50 to T60 2 in long,in.,0.75,0.95,0.97,2.00,1.63,0,0.75,1.59,,solid,Balsa,0,oz.,0,Conical,0\r
+BalsaMachining.com,TA520,Transition T5 to T20 0.78 in long,in.,0.50,0.51,0.54,0.78,0.73,0,0.50,0.71,,solid,Balsa,0,oz.,0,Conical,0\r
+BalsaMachining.com,TA550,Transition T5 to T50 1 in long,in.,0.50,0.51,0.54,1.00,0.97,0,0.50,0.95,,solid,Balsa,0,oz.,0,Conical,0\r
+BalsaMachining.com,TA555,Transiition T5 to T55 2.75 in long,in.,0.75,0.51,0.54,2.75,1.63,0,0.75,1.28,,solid,Balsa,0,oz.,0,Conical,0\r
+BalsaMachining.com,TA5560,Transition T55 to T60 1 long,in.,1.00,1.28,1.63,1.00,1.63,0,1.00,1.59,,solid,Balsa,0,oz.,0,Conical,0\r
+BalsaMachining.com,TA5560A,Transition T55 to T60 1.3 in long,in.,0.75,1.28,1.63,1.30,1.63,0,0.75,1.59,,solid,Balsa,0,oz.,0,Conical,0\r
+BalsaMachining.com,TA6070,Transition T60 to T70 1.75 in long,in.,0.60,1.59,1.63,1.50,2.21,0,0.60,2.17,,solid,Balsa,0,oz.,0,Conical,0\r
+BalsaMachining.com,TA6080,Transition T60 to T80 2.25 in long,in.,1.25,1.59,1.63,2.25,2.60,0,1.50,2.55,,solid,Balsa,0,oz.,0,Conical,0\r
+BalsaMachining.com,TA7080,Transition T70 to T80 2 in long,in.,1.40,2.17,2.21,2.00,2.60,0,1.40,2.55,,solid,Balsa,0,oz.,0,Conical,0\r
--- /dev/null
+Material Name,Units,Density,Low,High,Class,Rocketry Use,Body Tubes,Fin Sets,Launch Lugs,Cords,Nose,Chute,Stream,Trans,Ring,Bulkhead,Engine Block,Sleeve,Tube Coupler,spare,spare,spare,spare,spare,spare,spare,Known Dim type,Known Dim Units,Known Dim Value
+Cardboard,lb/ft3,43,,,,1,1,1,1,0,1,0,0,1,1,1,1,1,1,,,,,,,,None,0,0
+Birch,lb/ft3,42.5,,,Wood,1,0,1,0,0,1,0,1,1,1,1,1,0,0,,,,,,,,None,0,0
+Kraft phenolic,lb/ft3,59.85,,,,1,1,0,0,0,0,0,0,0,1,0,0,1,1,,,,,,,,None,0,0
+Polycarbonate,lb/ft3,74.9,,,,1,1,1,1,0,1,0,0,1,1,1,1,1,1,,,,,,,,None,0,0
Mfg.,Part No.,Desc.,Units,ID,OD,Length,Material,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine,Engine\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 38mm x 3/32 Airframe,in,0,1.52,0.094,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 38mm x 3/32 Coupler,in,0,1.37,0.094,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 54mm x 3/32 Airframe,in,0,2.152,0.094,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 54mm x 3/32 Coupler,in,0,2,0.094,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 3in x 3/32 Airframe,in,0,3,0.094,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 3in x 3/32 Coupler,in,0,2.875,0.094,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 4 in x 3/32 Airframe,in,0,3.9,0.094,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 4 in x 3/32 Coupler,in,0,3.775,0.094,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 5in x 1/8 Airframe,in,0,5,0.125,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 5in x 1/8 Coupler,in,0,4.85,0.125,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 5.5in x 1/8 Airframe,in,0,5.375,0.125,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 5.5in x 1/8 Coupler,in,0,5.225,0.125,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 6in x 1/8 Airframe,in,0,6,0.125,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 6in x 1/8 Coupler,in,0,5.775,0.125,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 7.5 inx 1/8 Airframe,in,0,7.518,0.125,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 7.5 inx 1/8 Coupler,in,0,7.33,0.125,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 8in x 1/8 Airframe,in,0,7.815,0.125,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 8in x 1/8 Coupler,in,0,7.815,0.125,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 9in x 1/8 Airframe,in,0,9,0.125,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G10 Bulkplate,G10 Fiberglass 11.5in x 3/16 Airframe,in,0,11.42,0.188,G10 fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 38mm x 3/32 Airframe,in,0,1.52,0.094,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 38mm x 3/32 Coupler,in,0,1.37,0.094,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 54mm x 3/32 Airframe,in,0,2.152,0.094,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 54mm x 3/32 Coupler,in,0,2,0.094,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 3in x 3/32 Airframe,in,0,3,0.094,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 3in x 3/32 Coupler,in,0,2.875,0.094,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 4 in x 3/32 Airframe,in,0,3.9,0.094,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 4 in x 3/32 Coupler,in,0,3.775,0.094,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 5in x 1/8 Airframe,in,0,5,0.125,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 5in x 1/8 Coupler,in,0,4.85,0.125,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 5.5in x 1/8 Airframe,in,0,5.375,0.125,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 5.5in x 1/8 Coupler,in,0,5.225,0.125,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 6in x 1/8 Airframe,in,0,6,0.125,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 6in x 1/8 Coupler,in,0,5.775,0.125,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 7.5 inx 1/8 Airframe,in,0,7.518,0.125,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 7.5 inx 1/8 Coupler,in,0,7.33,0.125,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 8in x 1/8 Airframe,in,0,7.815,0.125,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 8in x 1/8 Coupler,in,0,7.815,0.125,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 9in x 1/8 Airframe,in,0,9,0.125,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G10 Bulkplate,G10 Fiberglass 11.5in x 3/16 Airframe,in,0,11.42,0.188,G10 Fiberglass,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
Performance Rocketry,Birch Bulkplate,Baltic Birch 54mm x 1/16,in,0,2.152,0.0625,Birch,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
Performance Rocketry,Birch Bulkplate,Baltic Birch 2.5in x 1/16,in,0,2.5,0.0625,Birch,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
Performance Rocketry,Birch Bulkplate,Baltic Birch 3in x 3/32,in,0,3,0.094,Birch,0,g,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
--- /dev/null
+Material Name,Units,Density,Low,High,Class,Rocketry Use,Body Tubes,Fin Sets,Launch Lugs,Cords,Nose,Chute,Stream,Trans,Ring,Bulkhead,Engine Block,Sleeve,Tube Coupler,spare,spare,spare,spare,spare,spare,spare,Known Dim type,Known Dim Units,Known Dim Value
+Birch,lb/ft3,42.5,,,Wood,1,0,1,0,0,1,0,1,1,1,1,1,0,0,,,,,,,,None,0,0
+Carbon Fiber,kg/m3,1400,,,,1,1,1,0,0,0,1,0,0,1,1,1,1,1,,,,,,,,None,0,0
+Fiberglass,kg/m3,128.147704,,,,1,1,1,0,0,1,0,0,1,1,1,1,1,1,,,,,,,,None,0,0
+G10 Fiberglass,lb/ft3,118.94,,,,1,1,1,0,0,1,0,0,0,1,1,1,1,1,,,,,,,,None,0,0
+G12 Fiberglass,lb/ft3,118.94,,,,1,1,1,0,0,1,0,0,0,1,1,1,1,1,,,,,,,,None,0,0
+Polystyrene PS,lb/ft3,65.5,,,,1,1,1,1,0,1,0,0,1,1,1,1,1,1,,,,,,,,None,0,0
Performance Rocketry,11.5 in,Fiberglass Conical 4:1,in,47.25,11.67,0,6,11.42,0.25,cone,hollow,G10 Fiberglass,,oz,0,0,,,,,,,,,,,,,\r
Performance Rocketry,11.5 in,Fiberglass Nike Smoke,in,66.5,13.17,0,8,11.42,0.25,cone,hollow,G10 Fiberglass,,oz,0,3,,,,,,,,,,,,,\r
Performance Rocketry,16.5 in,Fiberglass Nike Smoke 6:1,in,93.5,18.75,0,10,16.25,0.25,cone,hollow,G10 Fiberglass,,oz,0,4.5,,,,,,,,,,,,,\r
-Performance Rocketry,24mm,Graphite Composite Conical 5:1,in,5.5,1.045,0,1.5,0.945,0.125,cone,hollow,Carbon fiber,,oz,0,0,,,,,,,,,,,,,\r
-Performance Rocketry,38mm ,Graphite Composite Conical 5:1,in,8.19,1.645,0,1.52,1.52,0.125,cone,hollow,Carbon fiber,,oz,0,0,,,,,,,,,,,,,\r
-Performance Rocketry,38mm,Graphite Composite Von Karman 5:1,in,8.19,1.645,0,1.52,1.52,0.125,sh,hollow,Carbon fiber,,oz,0,0,,,,,,,,,,,,,\r
-Performance Rocketry,54mm,Graphite Composite Conical 5:1,in,11,2.279,0,2.88,2.154,0.125,cone,hollow,Carbon fiber,,oz,0,0.5,,,,,,,,,,,,,\r
-Performance Rocketry,54mm,Graphite Composite Von Karman 5:1,in,11.5,2.279,0,2.88,2.154,0.125,sh,hollow,Carbon fiber,,oz,0,0,,,,,,,,,,,,,\r
-Performance Rocketry,3 in,Graphite Composite Conical 5:1,in,15.5,3.125,0,3.25,3,0.125,cone,hollow,Carbon fiber,,oz,0,0,,,,,,,,,,,,,\r
-Performance Rocketry,3 in,Graphite Composite Von Karman 5:1,in,15.5,3.125,0,3.25,3,0.125,sh,hollow,Carbon fiber,,oz,0,0,,,,,,,,,,,,,\r
-Performance Rocketry,4 in,Graphite Composite Conical 5:1,in,20.125,4.15,0,4.5,3.9,0.125,cone,hollow,Carbon fiber,,oz,0,0,,,,,,,,,,,,,\r
-Performance Rocketry,4 in,Graphite Composite Von Karman 5:1,in,20.125,4.15,0,4.5,3.9,0.125,sh,hollow,Carbon fiber,,oz,0,0,,,,,,,,,,,,,\r
-Performance Rocketry,5.5 in,Graphite Composite Conical 5:1,in,27.75,5.525,0,6,5.375,0.125,cone,hollow,Carbon fiber,,oz,0,0,,,,,,,,,,,,,\r
-Performance Rocketry,6 in,Graphite Composite Conical 5:1,in,31,6.17,0,6.5,6,0.125,cone,hollow,Carbon fiber,,oz,0,0,,,,,,,,,,,,,\r
-Performance Rocketry,7.5 in,Graphite Composite Conical 5:1,in,39,7.708,0,8,7.518,0.125,cone,hollow,Carbon fiber,,oz,0,0,,,,,,,,,,,,,\r
+Performance Rocketry,24mm,Graphite Composite Conical 5:1,in,5.5,1.045,0,1.5,0.945,0.125,cone,hollow,Carbon Fiber,,oz,0,0,,,,,,,,,,,,,\r
+Performance Rocketry,38mm ,Graphite Composite Conical 5:1,in,8.19,1.645,0,1.52,1.52,0.125,cone,hollow,Carbon Fiber,,oz,0,0,,,,,,,,,,,,,\r
+Performance Rocketry,38mm,Graphite Composite Von Karman 5:1,in,8.19,1.645,0,1.52,1.52,0.125,sh,hollow,Carbon Fiber,,oz,0,0,,,,,,,,,,,,,\r
+Performance Rocketry,54mm,Graphite Composite Conical 5:1,in,11,2.279,0,2.88,2.154,0.125,cone,hollow,Carbon Fiber,,oz,0,0.5,,,,,,,,,,,,,\r
+Performance Rocketry,54mm,Graphite Composite Von Karman 5:1,in,11.5,2.279,0,2.88,2.154,0.125,sh,hollow,Carbon Fiber,,oz,0,0,,,,,,,,,,,,,\r
+Performance Rocketry,3 in,Graphite Composite Conical 5:1,in,15.5,3.125,0,3.25,3,0.125,cone,hollow,Carbon Fiber,,oz,0,0,,,,,,,,,,,,,\r
+Performance Rocketry,3 in,Graphite Composite Von Karman 5:1,in,15.5,3.125,0,3.25,3,0.125,sh,hollow,Carbon Fiber,,oz,0,0,,,,,,,,,,,,,\r
+Performance Rocketry,4 in,Graphite Composite Conical 5:1,in,20.125,4.15,0,4.5,3.9,0.125,cone,hollow,Carbon Fiber,,oz,0,0,,,,,,,,,,,,,\r
+Performance Rocketry,4 in,Graphite Composite Von Karman 5:1,in,20.125,4.15,0,4.5,3.9,0.125,sh,hollow,Carbon Fiber,,oz,0,0,,,,,,,,,,,,,\r
+Performance Rocketry,5.5 in,Graphite Composite Conical 5:1,in,27.75,5.525,0,6,5.375,0.125,cone,hollow,Carbon Fiber,,oz,0,0,,,,,,,,,,,,,\r
+Performance Rocketry,6 in,Graphite Composite Conical 5:1,in,31,6.17,0,6.5,6,0.125,cone,hollow,Carbon Fiber,,oz,0,0,,,,,,,,,,,,,\r
+Performance Rocketry,7.5 in,Graphite Composite Conical 5:1,in,39,7.708,0,8,7.518,0.125,cone,hollow,Carbon Fiber,,oz,0,0,,,,,,,,,,,,,\r
Performance Rocketry,Std. G10 Fiberglass Coupler,8.25 Inch Coupler/16in,in,7.815,7.998,16,G10 Fiberglass,8,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
Performance Rocketry,Std. G10 Fiberglass Coupler,9 Inch Coupler/16in,in,8.75,8.998,16,G10 Fiberglass,8,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
Performance Rocketry,Std. G10 Fiberglass Coupler,11.5 Inch Coupler/24in,in,11.15,11.415,24,G10 Fiberglass,12,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,.94in Coupler/4in,in,0.75,0.943,4,G12 Fiberglass Filament Wound,2,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,1.14in Coupler/4in,in,1,1.143,4,G12 Fiberglass Filament Wound,2,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,1.52in Coupler/4in,in,1.37,1.518,4,G12 Fiberglass Filament Wound,2,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,2.15in Coupler/6in,in,2,2.15,6,G12 Fiberglass Filament Wound,3,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,2.15in Coupler Long/8in,in,2,2.15,8,G12 Fiberglass Filament Wound,4,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,2.5 Inch Coupler/6in,in,2.375,2.558,6,G12 Fiberglass Filament Wound,3,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,3 Inch Coupler/6in,in,2.875,2.998,6,G12 Fiberglass Filament Wound,3,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,3 Inch Coupler Long/9in,in,2.875,2.998,9,G12 Fiberglass Filament Wound,4.5,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,3.5 Inch Coupler/8in,in,3.25,3.398,8,G12 Fiberglass Filament Wound,4,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,4 Inch Coupler/9in,in,3.755,3.898,9,G12 Fiberglass Filament Wound,4.5,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,4 Inch Coupler Long/12in,in,3.755,3.898,12,G12 Fiberglass Filament Wound,6,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,4.1 Inch Coupler/9in,in,3.9,3.998,9,G12 Fiberglass Filament Wound,4.5,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,4.5 Inch Coupler/9in,in,4.25,4.373,9,G12 Fiberglass Filament Wound,4.5,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,5 Inch Coupler/12in,in,4.815,4.998,12,G12 Fiberglass Filament Wound,6,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,5 Inch Coupler Long/12in,in,4.815,4.998,12,G12 Fiberglass Filament Wound,6,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,5.5 Inch Coupler/12in,in,5.18,5.373,12,G12 Fiberglass Filament Wound,6,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,6 Inch Coupler/12in,in,5.775,5.998,12,G12 Fiberglass Filament Wound,6,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,6 Inch Coupler Long/18in,in,5.775,5.998,18,G12 Fiberglass Filament Wound,9,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,7 Inch Coupler/16in,in,6.5,6.808,16,G12 Fiberglass Filament Wound,8,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,7.5 Inch Coupler/16in,in,7.33,7.516,16,G12 Fiberglass Filament Wound,8,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,8 Inch Coupler/16in,in,7.518,7.813,16,G12 Fiberglass Filament Wound,8,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
-Performance Rocketry,G12 Fiberglass FW Coupler,8.25 Inch Coupler/16in,in,7.815,7.998,16,G12 Fiberglass Filament Wound,8,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,.94in Coupler/4in,in,0.75,0.943,4,G12 Fiberglass,2,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,1.14in Coupler/4in,in,1,1.143,4,G12 Fiberglass,2,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,1.52in Coupler/4in,in,1.37,1.518,4,G12 Fiberglass,2,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,2.15in Coupler/6in,in,2,2.15,6,G12 Fiberglass,3,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,2.15in Coupler Long/8in,in,2,2.15,8,G12 Fiberglass,4,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,2.5 Inch Coupler/6in,in,2.375,2.558,6,G12 Fiberglass,3,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,3 Inch Coupler/6in,in,2.875,2.998,6,G12 Fiberglass,3,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,3 Inch Coupler Long/9in,in,2.875,2.998,9,G12 Fiberglass,4.5,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,3.5 Inch Coupler/8in,in,3.25,3.398,8,G12 Fiberglass,4,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,4 Inch Coupler/9in,in,3.755,3.898,9,G12 Fiberglass,4.5,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,4 Inch Coupler Long/12in,in,3.755,3.898,12,G12 Fiberglass,6,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,4.1 Inch Coupler/9in,in,3.9,3.998,9,G12 Fiberglass,4.5,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,4.5 Inch Coupler/9in,in,4.25,4.373,9,G12 Fiberglass,4.5,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,5 Inch Coupler/12in,in,4.815,4.998,12,G12 Fiberglass,6,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,5 Inch Coupler Long/12in,in,4.815,4.998,12,G12 Fiberglass,6,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,5.5 Inch Coupler/12in,in,5.18,5.373,12,G12 Fiberglass,6,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,6 Inch Coupler/12in,in,5.775,5.998,12,G12 Fiberglass,6,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,6 Inch Coupler Long/18in,in,5.775,5.998,18,G12 Fiberglass,9,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,7 Inch Coupler/16in,in,6.5,6.808,16,G12 Fiberglass,8,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,7.5 Inch Coupler/16in,in,7.33,7.516,16,G12 Fiberglass,8,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,8 Inch Coupler/16in,in,7.518,7.813,16,G12 Fiberglass,8,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
+Performance Rocketry,G12 Fiberglass FW Coupler,8.25 Inch Coupler/16in,in,7.815,7.998,16,G12 Fiberglass,8,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
Performance Rocketry,Carbon Fiber FW Coupler,.94in Coupler/4in,in,0.75,0.943,4,Carbon Fiber,2,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
Performance Rocketry,Carbon Fiber FW Coupler,1.14in Coupler/4in,in,1,1.143,4,Carbon Fiber,2,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
Performance Rocketry,Carbon Fiber FW Coupler,1.52in Coupler/4in,in,1.37,1.518,4,Carbon Fiber,2,oz,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r
Cork (Solid),lb/ft3,15,15,15,Wood,y,n,n,n,n,y,n,n,n,n,y,y,n,n,n,n,n,n,n,n,n,n,n,n\r
Cottonwood,lb/ft3,25,25,25,Wood,n,y,y,y,n,y,y,y,y,y,y,y,y,y,n,n,n,n,n,n,n,n,n,n\r
Epoxy,lb/ft3,78.3,78.3,78.3,Plastic,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n\r
+Fiberglass,kg/m3,128.147704,n,n,n,1,1,1,0,0,1,0,0,1,1,1,1,1,1,n,n,n,n,n,n,n,None,0,0\r
Fir (Douglas),lb/ft3,35,35,35,Wood,y,n,y,n,n,y,n,n,y,y,y,y,n,n,n,n,n,n,n,n,n,n,n,n\r
Fir (White),lb/ft3,25,25,25,Wood,y,n,y,n,n,y,n,n,y,y,y,y,n,n,n,n,n,n,n,n,n,n,n,n\r
G10 fiberglass,lb/ft3,118.94,118.27,118.61,Plastic,y,n,y,n,n,n,n,n,n,y,y,y,n,n,n,n,n,n,n,n,n,n,n,n\r
--- /dev/null
+Material Name,Units,Density,Low,High,Class,Rocketry Use,Body Tubes,Fin Sets,Launch Lugs,Cords,Nose,Chute,Stream,Trans,Ring,Bulkhead,Engine Block,Sleeve,Tube Coupler,spare,spare,spare,spare,spare,spare,spare,Known Dim type,Known Dim Units,Known Dim Value
+Balsa,lb/ft3,8,,,Wood,1,1,1,0,0,1,0,0,1,1,1,1,0,0,,,,,,,,None,0,0
+Polycarbonate,lb/ft3,74.9,,,,1,1,1,1,0,1,0,0,1,1,1,1,1,1,,,,,,,,None,0,0
+Spiral/Glassine,lb/ft3,53,,,,1,1,1,1,0,1,0,0,1,1,1,1,1,1,,,,,,,,None,0,0
+Fiber,lb/ft3,41,,,,1,0,0,0,0,0,0,0,0,1,1,0,0,0,,,,,,,,None,0,0
+lite ply,lb/ft3,22,,,Composite,1,0,1,0,0,0,0,0,0,1,1,1,0,0,,,,,,,,None,0,0
+Paper,lb/ft3,70,,,,1,1,1,1,0,1,0,1,1,1,1,1,1,1,,,,,,,,None,0,0
}
}
+ public void setProperty(TypedPropertyMap preset, T value) {
+ if (value != null) {
+ preset.put(key, value);
+ }
+ }
+
+ public TypedKey<T> getKey() {
+ return key;
+ }
+
private static Object parseFromString( Class<?> type, String value ) {
if ( type.equals(Manufacturer.class)) {
Manufacturer m = Manufacturer.getManufacturer(value);
return Boolean.parseBoolean(value);
}
if ( type.isAssignableFrom(Double.class) ) {
- return Double.parseDouble(value);
+ try {
+ return Double.parseDouble(value);
+ }
+ catch (NumberFormatException nfe) {
+ return 0d;
+ }
}
if ( type.equals(String.class ) ) {
return value;
}
throw new IllegalArgumentException("Invalid type " + type.getName() + " for component preset parameter." );
}
-
+
private static Material getMaterialFor( String translatedName ) {
Material material;
material = Databases.findMaterial(Material.Type.BULK, translatedName);
import net.sf.openrocket.rocketcomponent.Transition;
+import java.util.HashSet;
+import java.util.Set;
+
/**
* Models the nose cone shape of a rocket. Maps from Rocksim's notion to OpenRocket's.
*/
public enum RocksimNoseConeCode {
- CONICAL (0, Transition.Shape.CONICAL),
- OGIVE (1, Transition.Shape.OGIVE),
- PARABOLIC (2, Transition.Shape.ELLIPSOID), //Rocksim' PARABOLIC most closely resembles an ELLIPSOID in OpenRocket
- ELLIPTICAL (3, Transition.Shape.ELLIPSOID),
- POWER_SERIES (4, Transition.Shape.POWER),
+ CONICAL(0, Transition.Shape.CONICAL, "Conic", "Cone"),
+ OGIVE(1, Transition.Shape.OGIVE),
+ PARABOLIC(2, Transition.Shape.ELLIPSOID), //Rocksim' PARABOLIC most closely resembles an ELLIPSOID in OpenRocket
+ ELLIPTICAL(3, Transition.Shape.ELLIPSOID),
+ POWER_SERIES(4, Transition.Shape.POWER),
PARABOLIC_SERIES(5, Transition.Shape.PARABOLIC),
- HAACK (6, Transition.Shape.HAACK);
+ HAACK(6, Transition.Shape.HAACK);
- /** The Rocksim enumeration value. Sent in XML. */
+ /**
+ * The Rocksim enumeration value. Sent in XML.
+ */
private final int ordinal;
-
- /** The corresponding OpenRocket shape. */
+
+ /**
+ * The corresponding OpenRocket shape.
+ */
private final Transition.Shape shape;
+ /**
+ * Names of the shape that are sometimes found in NCDATA.CSV
+ */
+ private Set<String> shapeNames = new HashSet<String>();
+
/**
* Constructor.
- *
- * @param idx the Rocksim shape code
- * @param aShape the corresponding OpenRocket shape
+ *
+ * @param idx the Rocksim shape code
+ * @param aShape the corresponding OpenRocket shape
+ * @param theShapeNames an array of alternate names
*/
- private RocksimNoseConeCode(int idx, Transition.Shape aShape) {
+ private RocksimNoseConeCode(int idx, Transition.Shape aShape, String... theShapeNames) {
ordinal = idx;
shape = aShape;
+ shapeNames.add(this.name().toLowerCase());
+ if (theShapeNames != null) {
+ for (String theShapeName : theShapeNames) {
+ shapeNames.add(theShapeName.toLowerCase());
+ }
+ }
}
/**
* Get the OpenRocket shape that corresponds to the Rocksim shape.
- *
+ *
* @return a shape
*/
public Transition.Shape asOpenRocket() {
/**
* Lookup an instance of this enum based upon the Rocksim code.
- *
- * @param rocksimShapeCode the Rocksim code (from XML)
+ *
+ * @param rocksimShapeCode the Rocksim code (from XML)
* @return an instance of this enum
*/
public static RocksimNoseConeCode fromCode(int rocksimShapeCode) {
/**
* Lookup an ordinal value for the Rocksim code.
- *
- * @param type the OR Shape
- *
+ *
+ * @param type the OR Shape
* @return the Rocksim code
*/
public static int toCode(Transition.Shape type) {
}
return ELLIPTICAL.ordinal; //Default
}
+
+ /**
+ * Given the name of a shape, map it into an instance of this enum.
+ *
+ * @param theName the name of the shape; case does not matter
+ * @return the corresponding enum instance; defaults to PARABOLIC if not found.
+ */
+ public static RocksimNoseConeCode fromShapeName(String theName) {
+ RocksimNoseConeCode[] values = values();
+ for (RocksimNoseConeCode value : values) {
+ if (value.shapeNames.contains(theName.toLowerCase())) {
+ return value;
+ }
+ }
+ return PARABOLIC; //Default
+ }
+
+ /**
+ * Convenience method that determines if the parameter is an integer that refers to a shape code, or the name
+ * of the shape itself. This basically combines fromCode and fromShapeName into one method.
+ *
+ * @param nameOrOrdinalString the shape number or shape name
+ * @return an instance of this enum; defaults to PARABOLIC if not found
+ */
+ public static RocksimNoseConeCode fromShapeNameOrCode(String nameOrOrdinalString) {
+ try {
+ return fromCode(Integer.parseInt(nameOrOrdinalString));
+ }
+ catch (NumberFormatException nfe) {
+ return fromShapeName(nameOrOrdinalString);
+ }
+ }
}
package net.sf.openrocket.preset;
+import net.sf.openrocket.material.Material;
+import net.sf.openrocket.motor.Manufacturer;
+import net.sf.openrocket.rocketcomponent.ExternalComponent.Finish;
+import net.sf.openrocket.rocketcomponent.Transition.Shape;
+import net.sf.openrocket.unit.UnitGroup;
+import net.sf.openrocket.util.BugException;
+import net.sf.openrocket.util.TextUtil;
+
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.security.MessageDigest;
import java.util.List;
import java.util.Map;
-import net.sf.openrocket.material.Material;
-import net.sf.openrocket.motor.Manufacturer;
-import net.sf.openrocket.rocketcomponent.ExternalComponent.Finish;
-import net.sf.openrocket.rocketcomponent.Transition.Shape;
-import net.sf.openrocket.unit.UnitGroup;
-import net.sf.openrocket.util.BugException;
-import net.sf.openrocket.util.TextUtil;
-
/**
* A model for a preset component.
* <p>
* A preset component contains a component class type, manufacturer information,
* part information, and a method that returns a prototype of the preset component.
- *
+ *
* @author Sampo Niskanen <sampo.niskanen@iki.fi>
*/
// FIXME - Implement clone.
ComponentPreset.INNER_DIAMETER,
ComponentPreset.OUTER_DIAMETER,
ComponentPreset.LENGTH} ),
-
+
NOSE_CONE( new TypedKey<?>[] {
ComponentPreset.MANUFACTURER,
ComponentPreset.PARTNO,
ComponentPreset.DESCRIPTION,
ComponentPreset.SHAPE,
ComponentPreset.FORE_OUTER_DIAMETER,
- ComponentPreset.OUTER_DIAMETER,
+ ComponentPreset.FORE_SHOULDER_DIAMETER,
+ ComponentPreset.FORE_SHOULDER_LENGTH,
+ ComponentPreset.AFT_OUTER_DIAMETER,
+ ComponentPreset.AFT_SHOULDER_DIAMETER,
+ ComponentPreset.AFT_SHOULDER_LENGTH,
ComponentPreset.LENGTH} ),
-
+
TUBE_COUPLER( new TypedKey<?>[] {
ComponentPreset.MANUFACTURER,
ComponentPreset.PARTNO,
ComponentPreset.OUTER_DIAMETER,
ComponentPreset.INNER_DIAMETER,
ComponentPreset.LENGTH} ),
-
+
BULK_HEAD( new TypedKey<?>[] {
ComponentPreset.MANUFACTURER,
ComponentPreset.PARTNO,
public TypedKey<?>[] getDisplayedColumns() {
return displayedColumns;
}
-
+
private static Map<Type,List<Type>> compatibleTypeMap = new HashMap<Type,List<Type>>();
static {
compatibleTypeMap.put( CENTERING_RING, Arrays.asList( CENTERING_RING, ENGINE_BLOCK ) );
compatibleTypeMap.put( NOSE_CONE, Arrays.asList( NOSE_CONE, TRANSITION));
}
-
+
}
public final static TypedKey<Manufacturer> MANUFACTURER = new TypedKey<Manufacturer>("Manufacturer", Manufacturer.class);
public final static TypedKey<Double> FORE_SHOULDER_LENGTH = new TypedKey<Double>("ForeShoulderLength",Double.class, UnitGroup.UNITS_LENGTH);
public final static TypedKey<Double> FORE_SHOULDER_DIAMETER = new TypedKey<Double>("ForeShoulderDiameter",Double.class, UnitGroup.UNITS_LENGTH);
public final static TypedKey<Double> FORE_OUTER_DIAMETER = new TypedKey<Double>("ForeOuterDiameter", Double.class, UnitGroup.UNITS_LENGTH);
+ public final static TypedKey<Double> AFT_SHOULDER_LENGTH = new TypedKey<Double>("AftShoulderLength",Double.class, UnitGroup.UNITS_LENGTH);
+ public final static TypedKey<Double> AFT_SHOULDER_DIAMETER = new TypedKey<Double>("AftShoulderDiameter",Double.class, UnitGroup.UNITS_LENGTH);
+ public final static TypedKey<Double> AFT_OUTER_DIAMETER = new TypedKey<Double>("AftOuterDiameter", Double.class, UnitGroup.UNITS_LENGTH);
public final static TypedKey<Shape> SHAPE = new TypedKey<Shape>("Shape", Shape.class);
public final static TypedKey<Material> MATERIAL = new TypedKey<Material>("Material", Material.class);
public final static TypedKey<Finish> FINISH = new TypedKey<Finish>("Finish", Finish.class);
FINISH,
MATERIAL
);
-
-
+
+
// package scope constructor to encourage use of factory.
ComponentPreset() {
}
/**
* Convenience method to retrieve the Type of this ComponentPreset.
- *
+ *
* @return
*/
public Type getType() {
<T> void put( TypedKey<T> key, T value ) {
properties.put(key, value);
}
-
+
public <T> T get(TypedKey<T> key) {
T value = properties.get(key);
if (value == null) {
digest = TextUtil.hexString(md5.digest( bos.toByteArray() ));
}
catch ( Exception e ) {
+ e.printStackTrace();
throw new BugException(e);
}
}
--- /dev/null
+package net.sf.openrocket.preset.loader;
+
+import au.com.bytecode.opencsv.CSVReader;
+import net.sf.openrocket.database.Databases;
+import net.sf.openrocket.file.preset.ColumnDefinition;
+import net.sf.openrocket.file.rocksim.RocksimNoseConeCode;
+import net.sf.openrocket.gui.print.PrintUnit;
+import net.sf.openrocket.gui.util.SwingPreferences;
+import net.sf.openrocket.material.Material;
+import net.sf.openrocket.preset.ComponentPreset;
+import net.sf.openrocket.preset.ComponentPresetFactory;
+import net.sf.openrocket.preset.InvalidComponentPresetException;
+import net.sf.openrocket.preset.TypedKey;
+import net.sf.openrocket.preset.TypedPropertyMap;
+import net.sf.openrocket.startup.Application;
+import net.sf.openrocket.unit.UnitGroup;
+import net.sf.openrocket.util.ArrayList;
+import net.sf.openrocket.util.BugException;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Primary entry point for parsing component CSV files that are in Rocksim format.
+ */
+public class RocksimComponentFileLoader {
+
+ /**
+ * Common unit of measure key. Rocksim format allows different types of units.
+ */
+ public final static TypedKey<String> UNITS_OF_MEASURE = new TypedKey<String>("Units", String.class);
+
+
+ public static List<String[]> load(RocksimComponentFileType type) {
+ return load(RocksimComponentFileLoader.class.getResourceAsStream("/performancerocketry/" + type.getDefaultFileName()));
+ }
+
+ public static List<String[]> load(File file) throws FileNotFoundException {
+ return load(new FileInputStream(file));
+ }
+
+ public static List<String[]> load(InputStream is) {
+ if (is == null) {
+ return new ArrayList<String[]>();
+ }
+ InputStreamReader r = null;
+ try {
+ r = new InputStreamReader(is);
+
+ // Create the CSV reader. Use comma separator.
+ CSVReader reader = new CSVReader(r, ',', '\'', '\\');
+
+ //Read and throw away the header row.
+ reader.readNext();
+
+ //Read the rest of the file as data rows.
+ return reader.readAll();
+ }
+ catch (IOException e) {
+ }
+ finally {
+ if (r != null) {
+ try {
+ r.close();
+ }
+ catch (IOException e) {
+ }
+ }
+ }
+
+ return new ArrayList<String[]>();
+ }
+
+ /**
+ * Rocksim CSV units are either inches or mm. A value of 0 or "in." indicate inches. A value of 1 or "mm" indicate
+ * millimeters.
+ *
+ * @param units the value from the file
+ * @return true if it's inches
+ */
+ private static boolean isInches(String units) {
+ String tmp = units.trim().toLowerCase();
+ return "0".equals(tmp) || tmp.startsWith("in");
+ }
+
+ /**
+ * Convert inches or millimeters to meters.
+ *
+ * @param units a Rocksim CSV string representing the kind of units.
+ * @param value the original value within the CSV file
+ * @return the value in meters
+ */
+ private static double convertLength(String units, double value) {
+ if (isInches(units)) {
+ return PrintUnit.INCHES.toMeters(value);
+ }
+ else {
+ return PrintUnit.MILLIMETERS.toMeters(value);
+ }
+ }
+
+ /**
+ * Remove all occurrences of the given character. Note: this is done because some manufacturers embed double
+ * quotes in their descriptions or material names. Those are stripped away because they cause all sorts of
+ * matching/lookup issues.
+ *
+ * @param target the target string to be operated upon
+ * @param toBeRemoved the character to remove
+ * @return target, minus every occurrence of toBeRemoved
+ */
+ private static String stripAll(String target, Character toBeRemoved) {
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < target.length(); i++) {
+ Character c = target.charAt(i);
+ if (!c.equals(toBeRemoved)) {
+ sb.append(c);
+ }
+ }
+ return sb.toString();
+ }
+
+ /**
+ * Convert all words in a given string to Camel Case (first letter capitalized). Words are assumed to be
+ * separated by a space. Note: this is done because some manufacturers define their material name in Camel Case
+ * but the component part references the material in lower case. That causes matching/lookup issues that's
+ * easiest handled this way (rather than converting everything to lower case.
+ *
+ * @param target the target string to be operated upon
+ * @return target, with the first letter of each word in uppercase
+ */
+ private static String toCamelCase(String target) {
+ StringBuilder sb = new StringBuilder();
+ String[] t = target.split("[ ]");
+ if (t != null && t.length > 0) {
+ for (int i = 0; i < t.length; i++) {
+ String s = t[i];
+ s = s.substring(0, 1).toUpperCase() + s.substring(1).toLowerCase();
+ sb.append(s).append(" ");
+ }
+ return sb.toString().trim();
+ }
+ else {
+ return target;
+ }
+ }
+
+ private static Collection<ComponentPreset> commonLoader(final List<String[]> theData,
+ final List<TypedKey<?>> keyMap,
+ final Map<String, Material> materialMap,
+ final ComponentPreset.Type type) {
+ Collection<ComponentPreset> result = new ArrayList<ComponentPreset>();
+ List<TypedPropertyMap> templates = new java.util.ArrayList<TypedPropertyMap>();
+ Set<String> favorites = Application.getPreferences().getComponentFavorites();
+ Integer uom = null;
+
+ ColumnDefinition[] columns = new ColumnDefinition[keyMap.size()];
+ for (int i = 0; i < keyMap.size(); i++) {
+ TypedKey key = keyMap.get(i);
+ if (key != null) {
+ columns[i] = new ColumnDefinition(key);
+ }
+ if (key.getName().equals("Units")) {
+ uom = i;
+ }
+ }
+
+ for (int i = 0; i < theData.size(); i++) {
+ String[] item = theData.get(i);
+ TypedPropertyMap preset = new TypedPropertyMap();
+
+ for (int j = 0; j < columns.length; j++) {
+ if (j < item.length) {
+ String value = item[j];
+ if (value == null) {
+ continue;
+ }
+ value = value.trim();
+ value = stripAll(value, '"');
+ if (value.length() == 0) {
+ continue;
+ }
+ final TypedKey typedKey = columns[j].getKey();
+ if (typedKey.equals(ComponentPreset.MATERIAL)) {
+ preset.put(ComponentPreset.MATERIAL, materialMap.get(value));
+ }
+ else if (typedKey.equals(ComponentPreset.SHAPE)) {
+ preset.put(ComponentPreset.SHAPE, RocksimNoseConeCode.fromShapeNameOrCode(value).asOpenRocket());
+ }
+ else {
+ final UnitGroup unitGroup = typedKey.getUnitGroup();
+ if (unitGroup != null && unitGroup.equals(UnitGroup.UNITS_LENGTH)) {
+ columns[j].setProperty(preset, convertLength(item[uom], Double.valueOf(value)));
+ }
+ else {
+ columns[j].setProperty(preset, value);
+ }
+ }
+ }
+ }
+ preset.put(ComponentPreset.TYPE, type);
+ templates.add(preset);
+ }
+
+ for (TypedPropertyMap o : templates) {
+ try {
+ ComponentPreset preset = ComponentPresetFactory.create(o);
+ if (favorites.contains(preset.preferenceKey())) {
+ preset.setFavorite(true);
+ }
+ result.add(preset);
+ }
+ catch (InvalidComponentPresetException ex) {
+ throw new BugException(ex);
+ }
+ }
+
+ return result;
+ }
+
+ static class BodyTubeLoader {
+ private final static int MFG_INDEX = 0;
+ private final static int PART_NO_INDEX = 1;
+ private final static int DESCRIPTION_INDEX = 2;
+ private final static int UNITS_INDEX = 3;
+ private final static int ID_INDEX = 4;
+ private final static int OD_INDEX = 5;
+ private final static int LENGTH_INDEX = 6;
+ private final static int MATERIAL_INDEX = 7;
+
+ public final static List<TypedKey<?>> keyMap = new ArrayList<TypedKey<?>>(8);
+
+ static {
+ keyMap.add(MFG_INDEX, ComponentPreset.MANUFACTURER);
+ keyMap.add(PART_NO_INDEX, ComponentPreset.PARTNO);
+ keyMap.add(DESCRIPTION_INDEX, ComponentPreset.DESCRIPTION);
+ keyMap.add(UNITS_INDEX, UNITS_OF_MEASURE);
+ keyMap.add(ID_INDEX, ComponentPreset.INNER_DIAMETER);
+ keyMap.add(OD_INDEX, ComponentPreset.OUTER_DIAMETER);
+ keyMap.add(LENGTH_INDEX, ComponentPreset.LENGTH);
+ keyMap.add(MATERIAL_INDEX, ComponentPreset.MATERIAL);
+ }
+
+ public Collection<ComponentPreset> load(Map<String, Material> materialMap) {
+ List<String[]> data = RocksimComponentFileLoader.load(RocksimComponentFileType.BODY_TUBE);
+ return commonLoader(data, keyMap, materialMap, ComponentPreset.Type.BODY_TUBE);
+ }
+
+ public Collection<ComponentPreset> load(Map<String, Material> materialMap, File file) throws
+ FileNotFoundException {
+ List<String[]> data = RocksimComponentFileLoader.load(file);
+ return commonLoader(data, keyMap, materialMap, ComponentPreset.Type.BODY_TUBE);
+ }
+
+ }
+
+ /**
+ * Tube coupler parser. Although there are additional fields in the file, they are not used by
+ * most (any?) manufacturers so we ignore them entirely.
+ */
+ static class TubeCouplerLoader extends BodyTubeLoader {
+ public Collection<ComponentPreset> load(Map<String, Material> materialMap) {
+ List<String[]> data = RocksimComponentFileLoader.load(RocksimComponentFileType.TUBE_COUPLER);
+ return commonLoader(data, keyMap, materialMap, ComponentPreset.Type.TUBE_COUPLER);
+ }
+
+ public Collection<ComponentPreset> load(Map<String, Material> materialMap, File file) throws
+ FileNotFoundException {
+ List<String[]> data = RocksimComponentFileLoader.load(file);
+ return commonLoader(data, keyMap, materialMap, ComponentPreset.Type.TUBE_COUPLER);
+ }
+ }
+
+ /**
+ * Engine block parser. Although there are additional fields in the file, they are not used by
+ * most (any?) manufacturers so we ignore them entirely.
+ */
+ static class EngineBlockLoader extends BodyTubeLoader {
+ public Collection<ComponentPreset> load(Map<String, Material> materialMap) {
+ List<String[]> data = RocksimComponentFileLoader.load(RocksimComponentFileType.ENGINE_BLOCK);
+ return commonLoader(data, keyMap, materialMap, ComponentPreset.Type.ENGINE_BLOCK);
+ }
+
+ public Collection<ComponentPreset> load(Map<String, Material> materialMap, File file) throws
+ FileNotFoundException {
+ List<String[]> data = RocksimComponentFileLoader.load(file);
+ return commonLoader(data, keyMap, materialMap, ComponentPreset.Type.ENGINE_BLOCK);
+ }
+ }
+
+
+ static class BulkheadLoader extends BodyTubeLoader {
+ public Collection<ComponentPreset> load(Map<String, Material> materialMap) {
+ List<String[]> data = RocksimComponentFileLoader.load(RocksimComponentFileType.BULKHEAD);
+ return commonLoader(data, keyMap, materialMap, ComponentPreset.Type.BULK_HEAD);
+ }
+
+ public Collection<ComponentPreset> load(Map<String, Material> materialMap, File file) throws
+ FileNotFoundException {
+ List<String[]> data = RocksimComponentFileLoader.load(file);
+ return commonLoader(data, keyMap, materialMap, ComponentPreset.Type.BULK_HEAD);
+ }
+ }
+
+ static class CenteringRingLoader extends BodyTubeLoader {
+ public Collection<ComponentPreset> load(Map<String, Material> materialMap) {
+ List<String[]> data = RocksimComponentFileLoader.load(RocksimComponentFileType.CENTERING_RING);
+ return commonLoader(data, keyMap, materialMap, ComponentPreset.Type.CENTERING_RING);
+ }
+
+ public Collection<ComponentPreset> load(Map<String, Material> materialMap, File file) throws
+ FileNotFoundException {
+ List<String[]> data = RocksimComponentFileLoader.load(file);
+ return commonLoader(data, keyMap, materialMap, ComponentPreset.Type.CENTERING_RING);
+ }
+ }
+
+ static class NoseConeLoader {
+ public static final int MFG_INDEX = 0;
+ public static final int PART_NO_INDEX = 1;
+ public static final int DESCRIPTION_INDEX = 2;
+ public static final int UNITS_INDEX = 3;
+ public static final int LENGTH_INDEX = 4;
+ public static final int OUTER_DIA_INDEX = 5;
+ public static final int LD_RATIO_INDEX = 6;
+ public static final int INSERT_LENGTH_INDEX = 7;
+ public static final int INSERT_OD_INDEX = 8;
+ public static final int THICKNESS_INDEX = 9;
+ public static final int SHAPE_INDEX = 10;
+ public static final int CONFIG_INDEX = 11;
+ public static final int MATERIAL_INDEX = 12;
+ public static final int CG_LOC_INDEX = 13;
+ public static final int MASS_UNITS_INDEX = 14;
+ public static final int MASS_INDEX = 15;
+ public static final int BASE_EXT_LEN_INDEX = 16;
+
+ public final static TypedKey<Double> LD_RATIO = new TypedKey<Double>("Len/Dia Ratio", Double.class);
+ public final static TypedKey<Double> BASE_EXT_LEN = new TypedKey<Double>("Base Ext Len", Double.class, UnitGroup.UNITS_LENGTH);
+ public final static TypedKey<String> CONFIG = new TypedKey<String>("Config", String.class);
+ public final static TypedKey<Double> CG_LOC = new TypedKey<Double>("CG Loc", Double.class, UnitGroup.UNITS_LENGTH);
+ public final static List<TypedKey<?>> keyMap = new ArrayList<TypedKey<?>>(17);
+
+ static {
+ keyMap.add(MFG_INDEX, ComponentPreset.MANUFACTURER);
+ keyMap.add(PART_NO_INDEX, ComponentPreset.PARTNO);
+ keyMap.add(DESCRIPTION_INDEX, ComponentPreset.DESCRIPTION);
+ keyMap.add(UNITS_INDEX, UNITS_OF_MEASURE);
+ keyMap.add(LENGTH_INDEX, ComponentPreset.LENGTH);
+ keyMap.add(OUTER_DIA_INDEX, ComponentPreset.OUTER_DIAMETER);
+ keyMap.add(LD_RATIO_INDEX, LD_RATIO);
+ keyMap.add(INSERT_LENGTH_INDEX, ComponentPreset.SHOULDER_LENGTH);
+ keyMap.add(INSERT_OD_INDEX, ComponentPreset.SHOULDER_DIAMETER);
+ keyMap.add(THICKNESS_INDEX, ComponentPreset.THICKNESS);
+ keyMap.add(SHAPE_INDEX, ComponentPreset.SHAPE);
+ keyMap.add(CONFIG_INDEX, CONFIG);
+ keyMap.add(MATERIAL_INDEX, ComponentPreset.MATERIAL);
+ keyMap.add(CG_LOC_INDEX, CG_LOC);
+ keyMap.add(MASS_UNITS_INDEX, UNITS_OF_MEASURE);
+ keyMap.add(MASS_INDEX, ComponentPreset.MASS);
+ keyMap.add(BASE_EXT_LEN_INDEX, BASE_EXT_LEN);
+ }
+
+ public Collection<ComponentPreset> load(Map<String, Material> materialMap) {
+ List<String[]> data = RocksimComponentFileLoader.load(RocksimComponentFileType.NOSE_CONE);
+ return commonLoader(data, keyMap, materialMap, ComponentPreset.Type.NOSE_CONE);
+ }
+
+ public Collection<ComponentPreset> load(Map<String, Material> materialMap, File file) throws
+ FileNotFoundException {
+ List<String[]> data = RocksimComponentFileLoader.load(file);
+ return commonLoader(data, keyMap, materialMap, ComponentPreset.Type.NOSE_CONE);
+ }
+ }
+
+ static class TransitionLoader {
+ public static final int MFG_INDEX = 0;
+ public static final int PART_NO_INDEX = 1;
+ public static final int DESCRIPTION_INDEX = 2;
+ public static final int UNITS_INDEX = 3;
+ public static final int FRONT_INSERT_LENGTH_INDEX = 4;
+ public static final int FRONT_INSERT_OD_INDEX = 5;
+ public static final int FRONT_OD_INDEX = 6;
+ public static final int LENGTH_INDEX = 7;
+ public static final int REAR_OD_INDEX = 8;
+ public static final int CORE_DIA_INDEX = 9;
+ public static final int REAR_INSERT_LENGTH_INDEX = 10;
+ public static final int REAR_INSERT_OD_INDEX = 11;
+ public static final int THICKNESS_INDEX = 12;
+ public static final int CONFIG_INDEX = 13;
+ public static final int MATERIAL_INDEX = 14;
+ public static final int CG_LOC_INDEX = 15;
+ public static final int MASS_UNITS_INDEX = 16;
+ public static final int MASS_INDEX = 17;
+ public static final int SHAPE_INDEX = 18;
+
+ public final static TypedKey<String> CONFIG = new TypedKey<String>("Config", String.class);
+ public final static TypedKey<String> IGNORE = new TypedKey<String>("Ignore", String.class);
+ public final static TypedKey<Double> CG_LOC = new TypedKey<Double>("CG Loc", Double.class, UnitGroup.UNITS_LENGTH);
+ public final static List<TypedKey<?>> keyMap = new ArrayList<TypedKey<?>>(19);
+
+ static {
+ keyMap.add(MFG_INDEX, ComponentPreset.MANUFACTURER);
+ keyMap.add(PART_NO_INDEX, ComponentPreset.PARTNO);
+ keyMap.add(DESCRIPTION_INDEX, ComponentPreset.DESCRIPTION);
+ keyMap.add(UNITS_INDEX, UNITS_OF_MEASURE);
+ keyMap.add(FRONT_INSERT_LENGTH_INDEX, ComponentPreset.FORE_SHOULDER_LENGTH);
+ keyMap.add(FRONT_INSERT_OD_INDEX, ComponentPreset.FORE_SHOULDER_DIAMETER);
+ keyMap.add(FRONT_OD_INDEX, ComponentPreset.FORE_OUTER_DIAMETER);
+ keyMap.add(LENGTH_INDEX, ComponentPreset.LENGTH);
+ keyMap.add(REAR_OD_INDEX, ComponentPreset.OUTER_DIAMETER);
+ keyMap.add(CORE_DIA_INDEX, IGNORE);
+ keyMap.add(REAR_INSERT_LENGTH_INDEX, ComponentPreset.SHOULDER_LENGTH);
+ keyMap.add(REAR_INSERT_OD_INDEX, ComponentPreset.SHOULDER_DIAMETER);
+ keyMap.add(THICKNESS_INDEX, ComponentPreset.THICKNESS);
+ keyMap.add(CONFIG_INDEX, CONFIG);
+ keyMap.add(MATERIAL_INDEX, ComponentPreset.MATERIAL);
+ keyMap.add(CG_LOC_INDEX, CG_LOC);
+ keyMap.add(MASS_UNITS_INDEX, UNITS_OF_MEASURE);
+ keyMap.add(MASS_INDEX, ComponentPreset.MASS);
+ keyMap.add(SHAPE_INDEX, ComponentPreset.SHAPE);
+ }
+
+ public Collection<ComponentPreset> load(Map<String, Material> materialMap) {
+ List<String[]> data = RocksimComponentFileLoader.load(RocksimComponentFileType.TRANSITION);
+ return commonLoader(data, keyMap, materialMap, ComponentPreset.Type.TRANSITION);
+ }
+
+ public Collection<ComponentPreset> load(Map<String, Material> materialMap, File file) throws
+ FileNotFoundException {
+ List<String[]> data = RocksimComponentFileLoader.load(file);
+ return commonLoader(data, keyMap, materialMap, ComponentPreset.Type.TRANSITION);
+ }
+ }
+
+ static class MaterialLoader {
+ private final static int MATERIAL_INDEX = 0;
+ private final static int UNITS_INDEX = 1;
+ private final static int DENSITY_INDEX = 2;
+ private final static int LOW_INDEX = 3;
+ private final static int HIGH_INDEX = 4;
+ private final static int CLASS_INDEX = 5;
+ private final static int ROCKETRY_USE_INDEX = 6;
+ private final static int BODY_TUBES_INDEX = 7;
+ public static final int FIN_SETS_INDEX = 8;
+ public static final int LAUNCH_LUGS_INDEX = 9;
+ public static final int CORDS_INDEX = 10;
+ public static final int NOSE_INDEX = 11;
+ public static final int PARACHUTE_INDEX = 12;
+ public static final int STREAMER_INDEX = 13;
+ public static final int TRANSITION_INDEX = 14;
+ public static final int RING_INDEX = 15;
+ public static final int BULKHEAD_INDEX = 16;
+ public static final int ENGINE_BLOCK_INDEX = 17;
+ public static final int SLEEVE_INDEX = 18;
+ public static final int TUBE_COUPLER_INDEX = 19;
+ public static final int KNOWN_DIM_TYPE_INDEX = 27;
+ public static final int KNOWN_DIM_UNITS_INDEX = 28;
+ public static final int KNOWN_DIM_VALUE_INDEX = 29;
+
+ public final static List<TypedKey<?>> keyMap = new ArrayList<TypedKey<?>>(8);
+ public final static TypedKey<String> MATERIAL_NAME = new TypedKey<String>("Material Name", String.class);
+ public final static TypedKey<Double> DENSITY = new TypedKey<Double>("Density", Double.class);
+
+ static class MaterialAdapter {
+ Material.Type type;
+ double conversionFactor;
+
+ MaterialAdapter(Material.Type theType, double cf) {
+ type = theType;
+ conversionFactor = cf;
+ }
+ }
+
+ private final static Map<String, MaterialAdapter> materialAdapterMap = new HashMap<String, MaterialAdapter>();
+
+ static {
+ materialAdapterMap.put("g/cm", new MaterialAdapter(Material.Type.LINE, 0.1d));
+ materialAdapterMap.put("g/cm2", new MaterialAdapter(Material.Type.SURFACE, 10.0d));
+ materialAdapterMap.put("g/cm3", new MaterialAdapter(Material.Type.BULK, 1000.0d));
+ materialAdapterMap.put("kg/m3", new MaterialAdapter(Material.Type.BULK, 1d));
+ materialAdapterMap.put("lb/ft3", new MaterialAdapter(Material.Type.BULK, 16.0184634d));
+ materialAdapterMap.put("oz/in", new MaterialAdapter(Material.Type.LINE, 1.11612296d));
+ materialAdapterMap.put("oz/in2", new MaterialAdapter(Material.Type.SURFACE, 43.9418487));
+
+ keyMap.add(MATERIAL_INDEX, MATERIAL_NAME);
+ keyMap.add(UNITS_INDEX, UNITS_OF_MEASURE);
+ keyMap.add(DENSITY_INDEX, DENSITY);
+ }
+
+ static Map<String, Material> load() {
+ List<String[]> data = RocksimComponentFileLoader.load(RocksimComponentFileType.MATERIAL);
+ Map<String, Material> materialMap = new HashMap<String, Material>();
+
+ for (int i = 0; i < data.size(); i++) {
+ try {
+ String[] strings = data.get(i);
+ MaterialAdapter ma = materialAdapterMap.get(strings[UNITS_INDEX]);
+ double metricDensity = ma.conversionFactor * Double.parseDouble(strings[DENSITY_INDEX]);
+ final String cleanedMaterialName = stripAll(strings[MATERIAL_INDEX], '"').trim();
+ final Material material = Databases.findMaterial(ma.type, cleanedMaterialName,
+ metricDensity, true);
+ materialMap.put(cleanedMaterialName, material);
+ materialMap.put(cleanedMaterialName.toLowerCase(), material);
+ materialMap.put(toCamelCase(cleanedMaterialName), material);
+ }
+ catch (Exception e) {
+ //Trap a bad row and move on
+ //TODO: log it? Display to user?
+ }
+ }
+ return materialMap;
+ }
+ }
+
+ public static void main(String[] args) {
+ Application.setPreferences(new SwingPreferences());
+ Map<String, Material> materialMap = MaterialLoader.load();
+ Collection<ComponentPreset> presetNC = new NoseConeLoader().load(materialMap);
+ Collection<ComponentPreset> presetBC = new BodyTubeLoader().load(materialMap);
+ Collection<ComponentPreset> presetBH = new BulkheadLoader().load(materialMap);
+ Collection<ComponentPreset> presetCR = new CenteringRingLoader().load(materialMap);
+ Collection<ComponentPreset> presetTC = new TubeCouplerLoader().load(materialMap);
+ Collection<ComponentPreset> presetTR = new TransitionLoader().load(materialMap);
+ Collection<ComponentPreset> presetEB = new EngineBlockLoader().load(materialMap);
+
+ for (Iterator<ComponentPreset> iterator = presetNC.iterator(); iterator.hasNext(); ) {
+ ComponentPreset next = iterator.next();
+ System.err.println(next);
+ }
+ for (Iterator<ComponentPreset> iterator = presetBC.iterator(); iterator.hasNext(); ) {
+ ComponentPreset next = iterator.next();
+ System.err.println(next);
+ }
+ for (Iterator<ComponentPreset> iterator = presetBH.iterator(); iterator.hasNext(); ) {
+ ComponentPreset next = iterator.next();
+ System.err.println(next);
+ }
+ for (Iterator<ComponentPreset> iterator = presetCR.iterator(); iterator.hasNext(); ) {
+ ComponentPreset next = iterator.next();
+ System.err.println(next);
+ }
+ for (Iterator<ComponentPreset> iterator = presetTC.iterator(); iterator.hasNext(); ) {
+ ComponentPreset next = iterator.next();
+ System.err.println(next);
+ }
+ for (Iterator<ComponentPreset> iterator = presetTR.iterator(); iterator.hasNext(); ) {
+ ComponentPreset next = iterator.next();
+ System.err.println(next);
+ }
+ for (Iterator<ComponentPreset> iterator = presetEB.iterator(); iterator.hasNext(); ) {
+ ComponentPreset next = iterator.next();
+ System.err.println(next);
+ }
+ }
+}
+
+//Errata:
+//The oddities I've found thus far in the stock Rocksim data:
+//1. BTDATA.CSV - Totally Tubular goofed up their part no. and description columns (They messed up TCDATA also)
+//2. NCDATA.CSV - Estes Balsa nose cones are classified as G10 Fiberglass
+//3. TRDATA.CSV - Apogee Saturn LEM Transition has no part number; Balsa Machining transitions have blank diameter
--- /dev/null
+package net.sf.openrocket.preset.loader;
+
+import java.util.Arrays;
+
+/**
+ * Definition of the typical Rocksim component files and their formats.
+ */
+public enum RocksimComponentFileType {
+ BODY_TUBE("BTDATA.CSV", "Mfg.", "Part No.", "Desc.", "Units", "ID", "OD", "Length", "Material", "Engine"),
+ BULKHEAD("BHDATA.CSV", "Mfg.", "Part No.", "Desc.", "Units", "ID", "OD", "Length", "Material", "Engine", "Engine",
+ "Engine", "Engine", "Engine", "Engine", "Engine", "Engine", "Engine", "Engine", "Engine"),
+ CENTERING_RING("CRDATA.CSV", "Mfg.", "Part No.", "Desc.", "Units", "ID", "OD", "Length", "Material", "AutoSize"),
+ CUSTOM_FIN("CSDATA.CSV"),
+ ENGINE_BLOCK("EBDATA.CSV", "Mfg.", "Part No.", "Desc.", "Units", "ID", "OD", "Length", "Material", "CG", "Mass Units", "Mass", "AutoSize"),
+ FIN("FSDATA.CSV"),
+ LAUNCH_LUG("LLDATA.CSV"),
+ MASS_OBJECT("MODATA.CSV", "Mfg.", "Part no", "Desc", "Units", "Name", "Type", "Length", "Material", "Mass units", "Mass"),
+ MATERIAL("MATERIAL.CSV", "Material Name", "Units", "Density", "Low", "High", "Class", "Rocketry Use", "Body Tubes",
+ "Fin Sets", "Launch Lugs", "Cords", "Nose", "Chute", "Stream", "Trans", "Ring", "Bulkhead", "Engine Block", "Sleeve",
+ "Tube Coupler", "spare", "spare", "spare", "spare", "spare", "spare", "spare", "Known Dim type", "Known Dim Units", "Known Dim Value"),
+ NOSE_CONE("NCDATA.CSV", "Mfg.","Part No.","Desc.","Units","Length","Outer Dia","L/D Ratio","Insert Length","Insert OD",
+ "Thickness","Shape","Config","Material","CG Loc","Mass Units","Mass","Base Ext. Len"),
+ PARACHUTE("PCDATA.CSV"),
+ SLEEVE("SLDATA.CSV"),
+ STREAMER("STDATA.CSV"),
+ TUBE_COUPLER("TCDATA.CSV", "Mfg.", "Part No.", "Desc.", "Units", "ID", "OD", "Length", "Material", "Mass Units", "CG", "Mass", "AutoSize"),
+ TRANSITION("TRDATA.CSV", "Mfg.", "Part No.", "Desc.", "Units", "Front Insert Len", "Front Insert OD", "Front OD", "Length",
+ "Rear OD", "Core Dia.", "Rear Insert Len", "Rear Insert OD", "Thickness", "Config", "Material", "CG Loc",
+ "Mass Units", "Mass", "Shape", "Shape", "Shape", "Shape", "Shape", "Shape", "Shape", "Shape", "Shape", "Shape", "Shape", "Shape");
+
+ /**
+ * The default filename for the type of data.
+ */
+ private final String defaultFileName;
+
+ /**
+ * The column names.
+ */
+ private final String[] columns;
+
+ /**
+ * Constructor.
+ *
+ * @param theDefaultFileName the default filename
+ * @param theColumns the array of column names in the file
+ */
+ private RocksimComponentFileType(final String theDefaultFileName, String... theColumns) {
+ defaultFileName = theDefaultFileName;
+ columns = theColumns;
+ }
+
+ /**
+ * Get the typical file name used for this type of component data.
+ *
+ * @return a filename
+ */
+ public String getDefaultFileName() {
+ return defaultFileName;
+ }
+
+ /**
+ * Try to be omniscient and figure out what kind of data file it is given an array of header (column) names.
+ *
+ * @param headers an array of column names
+ * @return the data type of the file, or null if unable to match the header names
+ */
+ public static RocksimComponentFileType determineType(String[] headers) {
+ RocksimComponentFileType[] types = values();
+ for (int i = 0; i < types.length; i++) {
+ RocksimComponentFileType type = types[i];
+ if (Arrays.equals(headers, type.columns)) {
+ return type;
+ }
+ }
+ return null;
+ }
+}