NavGun Development Thread

Started by Nobody, May 12, 2012, 01:31:27 PM

Previous topic - Next topic

Nobody

Formerly known as 'BigGun II'.
No one voted against a text-mode program so I stared work a few day ago. I haven't got an answer from Rick Robinson (the author of BigGun) if it would be okay to name ours in the same way, hence the change of names. You can read it as Naval Gun or Navalism GunSimulator - which do you perfer?

I intend to do this in an open source style and I would appreciate help.
Its written in (Free) Pascal so anyone who understands a little English should be able to help even if you haven't done any programing before. So if you want the output rearranged or in imperial units, just take a look and try implementing it yourself.

Included in the zip-file are the sources and the win32 executable for version 0.03 (a version history is included as a sort of 'easter egg' - a cookie for the one who finds it on his own), which doesn't include any ballistic/trajectory calculation yet. It's intended to test the user interface (any idea to improve it would be highly appreciated!) check for spelling mistakes etc.


Take a look!
And what do you think?

EDIT:
Also important: check if all characters are displayed correctly.

Current Version (v0.22)

Walter

Not bad. Didn't spot any splelign errosr (though an eagle-eyed user could still find something).

Whether it should be Naval Gun or Navalism Gun...
Uhm...
*uses magic 8-ball*
Hhmmm... try again later... :)

Nobody

Thanks Walter, but did you check all "sub-menus"?

Anyway, here comes version 0.10. Now including a very simplified range calculation. No penetration yet though. The results are surprisingly accurate (if you simulate WW2 guns), which was actually unintended.
Also much more user friendly (it now allows you to go back and change things instead of quitting).

A bit more feedback would be nice. Any comment helps!

Nobody

And a new version giving a bit more information (concerning shell weight/density) to the user. Mostly intended to assist Carthaginian and maybe snip.

KWorld

Gave it a quick try with a coast defence mortar (1908, 305mm/L15, mv 450 m/s, 350 kg shell).  The output looks OK (not quite sure what the last column is, time of flight perhaps?), until elevation hits 55 degrees, then things get wonky.  Most naval guns, of course, don't have this sort of elevation, but coastal mortars do.

Nobody

Quote from: KWorld on May 14, 2012, 08:38:59 AM
Gave it a quick try with a coast defence mortar (1908, 305mm/L15, mv 450 m/s, 350 kg shell).  The output looks OK (not quite sure what the last column is, time of flight perhaps?), until elevation hits 55 degrees, then things get wonky.  Most naval guns, of course, don't have this sort of elevation, but coastal mortars do.
Good points, thank you.
Last column? That should be 'AoF' = Angle of Fall (at the time of impact). Time in flight and maximum altitude are being calculated already as well, but not yet displayed.

The reason it gets 'wonky' is the limited size of the console. If you change that it should be fine. I would love to execute something like "mode con lines=50" when the program starts, but I can't because that is only supported by DOS. Maybe I should supply a batch-file which does that?

KWorld

Expanding the size of the console window doesn't have any effect.  This is running on Windows XP 64-bit.

Nobody

If you just 'drag' the window then probably not. At the very least you have to enlarge the window before you start the program itself. You can try doing that in properties, but I have no idea how the stuff is named in an English version of Windows.  :(

Or try using a batch-file. You have to extract it in the same directory as the executable and then start this "NavGun.bat" instead.

KWorld

Using the .bat file fixed the problem on Windows XP 64.

Delta Force

Quote from: Nobody on May 14, 2012, 09:43:37 AM
Quote from: KWorld on May 14, 2012, 08:38:59 AM
Gave it a quick try with a coast defence mortar (1908, 305mm/L15, mv 450 m/s, 350 kg shell).  The output looks OK (not quite sure what the last column is, time of flight perhaps?), until elevation hits 55 degrees, then things get wonky.  Most naval guns, of course, don't have this sort of elevation, but coastal mortars do.
Good points, thank you.
Last column? That should be 'AoF' = Angle of Fall (at the time of impact). Time in flight and maximum altitude are being calculated already as well, but not yet displayed.

The reason it gets 'wonky' is the limited size of the console. If you change that it should be fine. I would love to execute something like "mode con lines=50" when the program starts, but I can't because that is only supported by DOS. Maybe I should supply a batch-file which does that?

By only supported by DOS do you mean it is only supported by systems with DOS architecture (like Windows) or only by the ancient operating system known as DOS? If it is limited to systems with DOS architecture that shouldn't be that large of a problem since Springsharp only runs on Windows as it is. Even DOS would not be that big of a problem, at least for me, since emulators like DosBox are fairly simple to use.

Walter

Hmmm... Just a minor observation. When it asks me "ESC to abort and any other key to continue" I have noticed that when I hit <enter> on the numpad or the arrow keys or any of the <F> keys at the top, it shows the list and immediately snaps back to the sceen with "ESC to abort and any other key to continue" leaving me no time to read what it says. When I am at the screen with the angle, range, etc data and I hit those keys it goes back to the screen with "ESC to abort and any other key to continue" at the bottom and immediately throws out the angle, range, etc data screen again. Seems as if the program interprets hitting those particular keys once as hitting a key twice. Nothing really serious though and the easy way around that is to press one of the other keys that do work. :)

Nobody

#11
Quote from: Delta Force on May 15, 2012, 02:08:49 AM
Quote from: Nobody on May 14, 2012, 09:43:37 AM
The reason it gets 'wonky' is the limited size of the console. If you change that it should be fine. I would love to execute something like "mode con lines=50" when the program starts, but I can't because that is only supported by DOS. Maybe I should supply a batch-file which does that?

By only supported by DOS do you mean it is only supported by systems with DOS architecture (like Windows) or only by the ancient operating system known as DOS? If it is limited to systems with DOS architecture that shouldn't be that large of a problem since Springsharp only runs on Windows as it is. Even DOS would not be that big of a problem, at least for me, since emulators like DosBox are fairly simple to use.
No when I say DOS I mean dos. Not windows.
The batch-file probably only works on dos/win as well, but in theory the program is system independent at this point, and I would like to keep it that way if possible.


Quote from: Walter on May 15, 2012, 02:19:55 AM
Hmmm... Just a minor observation. When it asks me "ESC to abort and any other key to continue" I have noticed that when I hit <enter> on the numpad or the arrow keys or any of the <F> keys at the top, it shows the list and immediately snaps back to the sceen with "ESC to abort and any other key to continue" leaving me no time to read what it says. When I am at the screen with the angle, range, etc data and I hit those keys it goes back to the screen with "ESC to abort and any other key to continue" at the bottom and immediately throws out the angle, range, etc data screen again. Seems as if the program interprets hitting those particular keys once as hitting a key twice. Nothing really serious though and the easy way around that is to press one of the other keys that do work. :)
Yea that's because these keys indead create 2 characters each. Couple that with a keyboard-buffer and that's what you get. Maybe if one of those two characters is the same and not used anywhere else, I might be able to filter them out. Alternatively, press 'pause' once the calculation are done ^^.
Good point didn't notice/think of that.

UPDATE: and fixed, which created a new bug. Also fixed.

Nobody

#12
I've implemented the penetration algorithm from Rick Robinson's BigGun almost 1 to 1 and made some internal changes (hopefully improving maintenance).
HOWEVER, during testing with the 38cm/52 and the 16"/50 I was of the impression that the results appeared to be off by a factor of 10. Since I couldn't find any error I just added a additional x10 and made the v0.2 package (btw you won't need the batch-file unless you want to see results for angles above ~60°). Then I tested a 15 cm gun, with appalling results (and definitely not a factor of 10 this time)... anybody any idea why??

Nobody

Ha, I found the error! And what a error - one single character was wrong! *banging head against wall*

So, there you have it: a working, yet (very) simplified ballistic calculation plus a working penetration algorithm from BigGun.

Now before I proceed and replace the ballistic algorithm with an improved one, i would like to know:
  • is the user-interface okay or what would you like to change?
  • any mistakes (spelling, punctuation, etc.)?
  • is the data presented in an understandable way? Is the precision of the numbers too low or too high in some places? Or do you want to see more, less or different data?
  • is my - rather inconsistent - choice of words okay or would you choose different ones? In case of multiple variants, which is better in your opinion?
  • don't know. Anything else*?



    *) except wanting it in imperial units. That I leave to do for someone else. Or might consider it once I'm 'done'.

Carthaginian

I see no errors in the user interface.

The data is presented perfectly- it is simple and clear, and yet conveys everything we would need to know.

Your chosen terms will serve, such as 'density' as a relative comparison of how heavy the shell is in comparison to what year.

Your work is great- and we thank you for it. :D
So 'ere's to you, Fuzzy-Wuzzy, at your 'ome in old Baghdad;
You're a pore benighted 'eathen but a first-class fightin' man;
We gives you your certificate, an' if you want it signed
We'll come an' 'ave a romp with you whenever you're inclined.