-
-
Notifications
You must be signed in to change notification settings - Fork 532
[#875] Implement RASAero II importing #2123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Useful later for using the file name as the rocket name
Could probably be elaborated more for the separate handlers... I'm just sick of RASAero importing at this point
Apparently RASAero doesn't support recovery devices in other stages
# Conflicts: # core/src/net/sf/openrocket/rocketcomponent/RocketComponent.java # core/src/net/sf/openrocket/rocketcomponent/SymmetricComponent.java # core/test/net/sf/openrocket/rocketcomponent/SymmetricComponentVolumeTest.java # swing/src/net/sf/openrocket/gui/main/BasicFrame.java # swing/src/net/sf/openrocket/gui/util/Icons.java
|
@SiboVG, consensus reached: With corrections by @JoePfeiffer due to my continuous brain fart as to the vent band rule... |
Alright, thanks! Will correct it soon. |
|
Almost! If there are exactly three body tubes (ie no payload section and no vent band) and two recovery devices, device 1 is in tube 2 and device 2 is in tube 1. |
|
Addition requested by @JoePfeiffer: That should be it ... in your court @SiboVG. |
|
Phew, I'm gonna have a beer once this PR is merged. |
|
Looks good! Thanks for your patience with my nit picking @hcraigmiller and @SiboVG . Is it waiting on anything else? |
|
The new rules should be in place now. |
|
Errors: VBC = Vent Band Count 1 RECOVERY DEVICE 1 Body Tubes, VBC=0: Correct. 2 Body Tubes, VBC=0: Recovery Device 1 is positioned in BT-2 (Recovery Device 1 should be in BT-1). 3 Body Tubes, VBC=0: Correct. 4+ Body Tubes, VBC=0: Recovery Device 1 is positioned in BT-3 (Recovery Device 1 should be in BT-2). 3+ Body Tubes, VBC=1, VBP=2: Recovery Device 1 is positioned below the vent band (it should be above the vent band). 2 RECOVERY DEVICES 1 Body Tubes, VBC=0: Correct. 2 Body Tubes, VBC=0: Recovery Device 1 (deployment at apogee) is positioned over the top of Recovery Device 2 near the top of the first body tube (Recovery Device 1 should be in the second body tube). 3 Body Tubes, VBC=0: Recovery Device 1 (deployment at apogee) is positioned over the top of Recovery Device 2 near the top of the first body tube (Recovery Device 1 should be in the second body tube). 4 Body Tubes, VBC=0: Correct. 5 Body Tubes, VBC=0: Correct. 6 Body Tubes, VBC=0: Correct. 3 Body Tubes, VBC=1, VBP=2: Recovery Device 1 (deployment at apogee) is positioned over the top of Recovery Device 2 near the top of the body tube immediately above (Recovery Device 1 should be below) the first body tube of less than .8 calibers. 4 Body Tubes, VBC=1, VBP=2: Recovery Device 1 (deployment at apogee) is positioned over the top of Recovery Device 2 near the top of the body tube immediately above (Recovery Device 1 should be below) the first body tube of less than .8 calibers. IF BTC=>5 then (incorrectly) Recovery Device 1 is always placed in BT-2 and Recovery Device 2 is always placed in BT-3. 5 Body Tubes, VBC=1, VBP=2: Recovery Device 2 is positioned in BT-2 the vent band (should be BT-1 above the vent band). 5 Body Tubes, VBC=1, VBP=3: Recovery Device 1 is positioned in BT-3 the vent band (it should be below the vent band). 5 Body Tubes, VBC=1, VBP=4: Recovery Device 1 is positioned in BT-2 (should be BT-3) and the vent band Recovery Device 1 is positioned in BT-3 (should be BT-4) |
|
Sorry, there was a small logic error that cause issues with recovery device 1.
Okay, I thought from your image that once you have 4+ body tubes, I should ignore the VB. I'll adjust it. |
|
I hope it's correct this time. |
|
That's a bit odd, the logical appears to be correct at first sight. Could you maybe send me the .CDX1 file of one of the faulty tests @hcraigmiller? |
|
Here are all of the files. the file names are shown on the spreadsheet (correct and incorrect). |
|
Okay, I actually think my previous commit fixed the issue. I used an ArrayList, which can sometimes mess up the ordering of the items. Care to try again @hcraigmiller? |
|
Oh yeah, and I love how organized you are 😍. |
|
Alright, that merge was accidental. All of the placements are correct. Should the merge be left or reverted? |
Recovery device placement was the final check for this PR, so it's okay to leave it. |







This PR fixes #875 and implements RASAero II file (.CDX1) importing. Almost all RASAero components are compatible with OR, although sometimes through the use of inline pods), except for some special stuff like special fin cross sections (see #1626) and protrusions on body tubes. RASAero also uses per-simulation based rocket weight and CG (override).
In short, the following information is imported:
An immense shoutout to @hcraigmiller for very thorough testing of this PR, and also for doing some preliminary coding in the past (e.g. creating the icons).
Importing can be done in a dedicated menu item:

or in the File > Open menu:

Demo:
Screen.Recording.2023-03-19.at.20.53.32.mp4
I have written some basic unit tests, but haven't implemented parameter checking for every imported component type, or checking e.g. each possible combination of recovery device importing (there are edge cases). As said before, @hcraigmiller has already done a great deal of testing, so I'm fairly confident that the importing should be stable and correct. So, I will just created a new issue request for extending the unit tests after this PR is merged. (Remind me to do so in case I forget)
If you want additional information on the importing, I advise you to ask @hcraigmiller, as I'm a bit busy at work right now.