Open helsinkiAUV opened 8 years ago
I did a quick and dirty code for this. Check it out from my branch. Also the desired configuration file format should be decided.
I checked it out and it seems quite good.
Line 95 of atlanticSimulator.cpp is an excellent example of how you'll learn something new every time you have to deal with a language as monstrous as C++. For almost ten years have I programmed in C-based languages not knowing that you can shadow a variable of an outer scope by declaring a new variable with the same name in an inner scope!
However, in this case I think it could be a bug, since now the declaration (line 95) is thrown into bit space and the inputFile remains unchanged.
Also, I think it could be considered an error if "nameString" is not in the list of configuration options.
What do you think of these suggestions, mr. shamaanikala?
-Juho
However, in this case I think it could be a bug, since now the declaration (line 95) is thrown into bit space and the inputFile remains unchanged.
I just realized that I didn't test this at all. Ofcourse everything seems to be fine when the config file is exact copy of the hard coded values...
Also, I think it could be considered an error if "nameString" is not in the list of configuration options.
I was thinking about that too, but didn't do anything yet. I'll implement this too. I wonder if there exist a nice way to parse values from config files.
What should be obligatory and optional config parameters? Also if some parameter is optional, what would be the default value for it?
I think at this point only the input and output file names should be obligatory. The rest can have the above values.
Make the atlanticSimulator to read the following values from a config file:
You may choose the best design for the config file. However, Keep It Simple! No XML files or such.