-
-
Notifications
You must be signed in to change notification settings - Fork 533
[fixes #1354 & #1037] Add support for custom decimal places and exponential notation in simulation exports #1427
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
Idk, this is not per se a very dynamic solution (as in 'you only specify these 2 exceptions somewhere hidden deep inside a method'...) Ah well, it works for now.
|
Functions as expected, no anomalies found. |
|
Is there a way to speed up the export? The crude solution from #1037 was a bit faster at full decimal length (which was like 15 places), but it hangs for about a minute at just 6 decimal places with this pull |
|
Do you actually desire to export 6 decimal places? If so I would be intrigued to hear why. It's hard for me to understand how that would be valuable. |
Well two things: your code from #1037 did not include the But I do not see export delays longer than half a second, so I'm a bit confused why you have such huge delays? I used 'A simple model rocket' and exported all variables with 15 decimal precision and got an almost instant export. |
|
@Sparrowhawk120 I made some changes to the doubleToString code, hopefully resulting in a performance improvement for you. Could you check with this jar file whether anything has changed for you? |
|
@SiboVG I timed an export of Time, Lateral Dist, Lat, & Lon, and it still took 59 seconds to do an export at 6 decimal places with comma delimiting. Do you want me to send the .ork file I used? |
@neilweinstock I'm trying to start developing a visualizer for the 6DOF so I can use the Monte-Carlo method to create a landing splash zone. This would help for much larger-scale flights requiring FAA permits without the irritating monthly subscription of Rocksim Pro. |
How are export times for 22.02.beta.03? And do the results differ when you check/uncheck the use exponential notation? Also: what are the export times for your code from #1037? |
|
Oh yeah and do the results change with the latest unstable whether you export with 6 decimals or 15 decimals? |
I'm gonna preface this by saying the following results are incredibly perplexing to me because both with #1037 and the original 22.02.beta.03 I didn't previously have much issue with exporting. I'm not sure if this is a product of running the jar with Java 17, or if something is wrong with my system in some other way. Similar behavior was observed using the code in #1037 Similar behavior was observed using both my .ork file and the "Simple Model Rocket" example |
|
Thanks for the test results. It's indeed very strange that you have this issue. As I've said, I don't have any issues with it at all (export times all < 1 s). It may have something to do with the fact that we don't use the OpenCSV library for exporting to CSV, which may be more efficient than the custom CSV export (I know from a prior project that OpenCSV makes huge changes in delay times for reading CSVs, so maybe the same holds for writing CSVs). I'll file a new issue for it, thanks again for bringing it up. |
This PR fixes #1354 and #1037. I first implemented an increased, static decimal place for the latitude and longitude (for issue #1354) - which is the first commit which you can just ignore - but then found that it wasn't much extra effort to implement #1037 and add support to enter a custom number of decimal places for the simulation export variables. So that solves #1354 automatically, because users can now just choose the decimal places for any variable.
While I was at it, I also added a checkbox to decide whether to use exponential notation in the export (e.g. '1.5e-4') or not (e.g. '0.00015').
The simulation export panel thus looks like this (see the top right, 'Format settings'):

Here is a jar file for testing.