![]() |
Tracking Party 1.1 [REL]
I have been finishing my application for computing a torpedo firing solution (allows one to manually compute a solution without the TDC). At least I hoped I was close to finishing it. When I recomputed the numbers for a particular set-up that seemed poor, I got a different answer. Going over and re-computing the whole thing over several days I found that I could not replicate the error. That is until I tried to recalculate with SH4 running. |
Are you saying that when you run your application, it works OK, but then starting SH4 and running it at the same time as the application, makes the application give erroneous information?
Is the error amount the same each time, or does it change if you restart SH4? What language /engine are you making your application in? |
Basically yes. I'm using Liberty Basic 4.04, and am running it through the editor, if that makes any difference. The operation system is Win Vista 32 bit, and I have 3 Gb RAM. |
You could add a few lines of code to output the values received by the program. That would at least tell you if the issue is within the programs functions/processes itself, or if the issue is an error in passing the values to the program. If the values being passed to the program are correct, I would then output the results of each calculation done internally at each step in an attempt to nail down exactly where the errors are being introduced. Does your program establish protected (reserved) memory space upon start up? Most languages will take care of this for you, but I am not familiar with Liberty Basic and it has been a while since I have played with code in any language for that matter. Debugging should be easy enough in any case. Solving the issue after you identify it specifically, well- that can be a whole new type of fun. LOL
|
Quote:
I don't really know the details of how this works. I had assumed that this was done automatically by the program language itself. If it doesn't, or fails for some reason, I wouldn't know what to do about it. Quote:
This is a good idea. I more or less assumed that it was one or more math steps that were going wrong. Quote:
Yeah, I know what you mean. :yep: |
Ok, I've played around with this some more and I believe I'm zeroing in on the problem(s). |
Another update: |
LOL - computers can be tough to communicate with sometimes. They always have to have things their own way for some reason. I am happy that you tamed the beast! :up:
When I was programming, I always used a naming convention for variable types to help me keep track of them all- something I learned way back when cutting my teeth using Q-Basic. Helps with debugging. In my experience, single character variable names should be avoided, but hey- it's all just part of the fun! |
Quote:
So true. :yep: |
While I don't know anything about Liberty Basic, programing languages usually have a very similar syntax....
We might be of some better assistance if we can view the source code. Otherwise we're just shooting in the dark. And my magic orb is undergoing maintenance. What JoeCorrado said: output every calculation step or variable change. Including your own input given to the program. Preferably saved into a log file for future reference. |
The problem with the changing value of the turning radius seems to be fixed now. Changing it from "r" to "rp" did the trick. I won't pretend to know why. |
Quote:
|
I get what you're saying, but the project is very nearly done now. In any case, it is not a mod of SH4 as such, but rather a math utility to calculate a torpedo firing solution. It doesn't receive inputs from the game, nor pass any information to the game directly. I have been using the game to "field test" the math. |
Released!
Just to let everyone know, I finally finished this baby. |
All times are GMT -5. The time now is 05:56 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.