Skip to content

Conversation

@JoePfeiffer
Copy link
Contributor

The "extension" example now uses the extension mechanism to add both listeners
The "scripting" example now uses JavaScript scripts to perform the same tasks as in the extension example

Finishes fixing #1923

…eners.

Modified simulation extension example to tell users where to look for the code for the extensions
@hcraigmiller
Copy link
Collaborator

I guess this is an area that I'm going to have to educate myself about. So, rather than commenting on whether the behavior is correct, I'll stick to describing the behavior.

First, when opening the example menu, there are now only two options, instead of three.

Menu

I re-ran the simulation for the Presets example from the Flight simulations tab, and it completed without error. To me it appeared to be functioning properly.

I re-ran each of the simulations for the Simulations extensions example from the Flight simulations tab, individually, and each completed without error. To me, each, individually, appeared to be functioning properly. When re-ran 1 and 2 simultaneously, and 1 and 3 simultaneously, each completed without error. But, if 2 and 3 are re-run simultaneously, an error appears.

Error

An error appears if all three simulations are run simultaneously too.

If there is any other testing procedure that should be being used for this PR, please let me know.

@JoePfeiffer
Copy link
Contributor Author

Hmmm, this is unexpected. My local build is showing both "Simulation Extensions" and "Simulation scripting", so something seems to have gone wrong with my commit.

Errors when running two sims at once is really weird. I suspect some sort of crosstalk between them... which will be unpleasant to find. Darn.

Incidentally, thanks for doing these PR checks. There is no more thankless role than QC, and I for one really appreciate you doing it. So at least one person here thanks you!

@SiboVG
Copy link
Member

SiboVG commented Jan 7, 2023

Incidentally, thanks for doing these PR checks. There is no more thankless role than QC, and I for one really appreciate you doing it. So at least one person here thanks you!

Make that two!

@JoePfeiffer JoePfeiffer marked this pull request as draft January 7, 2023 15:08
@hcraigmiller
Copy link
Collaborator

hcraigmiller commented Jan 7, 2023

I've been looking more closely at these simulations, and I would recommend resizing the parachutes. Changing the drogue to 55 cm will reduce the descent rate to just under 100 fps and changing the main to either the FRS-16-96 or the IFC-72-N will reduce the descent rate to below 18 fps (either should open safely up to 120 fps), or, if space or mass is at a premium, the IFC-72-S. To me, 32+ fps is too fast on the ground hit.

@JoePfeiffer
Copy link
Contributor Author

I've been looking more closely at these simulations, and I would recommend resizing the parachutes. Changing the drogue to 55 cm will reduce the descent rate to just under 100 fps and changing the main to either the FRS-16-96 or the IFC-72-N will reduce the descent rate to below 18 fps (either should open safely up to 120 fps), or, if space or mass is at a premium, the IFC-72-S. To me, 32+ fps is too fast on the ground hit.

Good idea (I was just looking at the extensions and scripting, not whether the rest of the example made sense!). I enlarged the drogue to get a main deploy speed under 70fps (24in drogue) and the main to get a landing speed just a little over 20fps (60in main).

@JoePfeiffer
Copy link
Contributor Author

This has proved to be much knottier than I expected -- it's enough of an edge case that I'm happy for it to simply be a known issue when RC1 goes out.

@JoePfeiffer
Copy link
Contributor Author

Long time to make a small change in the end.

15.03 made a copy of the Rocket when executing a simulation; at some point early in the changes leading to 22.02 that was dropped. Trying to have both simulation branches changing settings in a single rocket caused a conflict and crash.

This now also makes a copy of the Rocket, as 15.03 used to do.

@JoePfeiffer JoePfeiffer marked this pull request as ready for review January 17, 2023 16:46
@hcraigmiller
Copy link
Collaborator

Functions as expected; no anomalies found.

Will Simulation scripting be the new name going forward, instead of Simulation extensions and scripting?

Build 1453
[Windows 11 Pro; Version 22H2; OS Build 22621.521; Windows Feature Experience Pack 1000.22634.1000.0]
[Java "11.0.15" 2022-04-19 LTS; Java(TM) SE Runtime Environment 18.9 (build 11.0.15+8-LTS-149)]

@JoePfeiffer
Copy link
Contributor Author

Will Simulation scripting be the new name going forward, instead of Simulation extensions and scripting?

That's what I'm thinking. The Simulation extensions example includes examples of simulation extensions; the Simulation scripting example does the same thing (though without a configuration GUI) using JavaScript.

@hcraigmiller
Copy link
Collaborator

That's what I'm thinking. The Simulation extensions example includes examples of simulation extensions; the Simulation scripting example does the same thing (though without a configuration GUI) using JavaScript.

Looks good to go then. I'm going to have to spend some time learning how to use the extensions and scripting features.

@JoePfeiffer
Copy link
Contributor Author

Looks good to go then. I'm going to have to spend some time learning how to use the extensions and scripting features.

Coincidentally, I'm documenting extensions now on the wiki while it's still fresh in my mind. Do you know if one user can see a draft on the wiki in another user's namespace? If so, here's the current status:
https://wiki.openrocket.info/User:JoePfeiffer/Extensions_and_Listeners

@SiboVG
Copy link
Member

SiboVG commented Jan 17, 2023

Coincidentally, I'm documenting extensions now on the wiki while it's still fresh in my mind. Do you know if one user can see a draft on the wiki in another user's namespace? If so, here's the current status:
https://wiki.openrocket.info/User:JoePfeiffer/Extensions_and_Listeners

Yes we can. Small tip: if you ever want to know if someone else can see a webpage you can see, you can open an incognito window on Google Chrome and open the page there. Incognito tabs don't use your stored cookies/caches. Of course that is assuming you use Chrome.

@SiboVG SiboVG linked an issue Jan 17, 2023 that may be closed by this pull request
@SiboVG SiboVG merged commit 29e49f1 into openrocket:unstable Jan 17, 2023
@JoePfeiffer JoePfeiffer deleted the fix-1923 branch January 18, 2023 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Simulation extension error on load of examples

3 participants