IanMayo / ShipSimJS

0 stars 0 forks source link

Introduce interface "layer" around code #1

Open IanMayo opened 10 years ago

IanMayo commented 10 years ago

The code currently retrieves it's own values from the worksheet.

In the long run we may wish to introduce code tests, and when it moves to JS we need to be sure we understand the incoming/outgoing variables.

So, I think step event should start by retrieving the vlaues from the worksheet then calling the VBA. Once the VBA is complete, this "wrapper" code should then put the values

tsigit commented 10 years ago

(Resolution by chat on google with Ian)

IanMayo commented 10 years ago

Note: once we've separated the algorithm from the UI, we'll be able to simulate multiple ships at once.

IanMayo commented 10 years ago

I guess these would be the states:

tsigit commented 10 years ago

Dear Ian,

Hope you are very well reading my message.

I have a good news for you with the latest pushed version. In fact, based on the guidance and enhancement ticket here initiated by you, the algorithm is now 'almost' completely separated from the excel UI. I said almost because of a detail (namely 'acceleration time'), which is to be resolved with completion of Issue #7.

As you will see, now user can configure performance from the creation of every new ship. However, only max speed is fully exploited within the algorithm (cf. function adjSway() in MyDoTurn).

About the current version, the developed interface layer seems filling its primary intended purpose, which is multi-ship simulation. However, I haven't personnally tried more than the currently displayed 2 vessels 'ownship' and 'tsiship'. Yet, I suggest that you play with adding a third vessel and see how it works BTW. Please do not pay attention to the drawn vessel as the related function is still enhancing. Once the new vessel is present on the graph, you can adjust its shapes and colors directly on-chart, just like any other excel chart (I anticipate this will be the only thing you will need to do manually!).

You will also note the additional feature I added for each vessel. This is 'friendness': which is intended to further characterize the simulation as war-game (it tags each vessel as 'friend' or 'ennemy'. You will surely have someting to comment about this, so do not hesitate to let me know.

Hope you will enjoy this augmented version and looking forward to reading from you soon. Many thanks.

Kind regards, Tsi

IanMayo commented 10 years ago

Sure, will look today.

IanMayo commented 10 years ago

Hi there, nice work. Once you've implemented the graph drawing of the vessel position/status I think this issue will be complete.

tsigit commented 10 years ago

Dear Ian,

I would like to adress here at once issues #1 and #6, as you make mention about it above.

In fact, I would like to know your point of view about the most interesting status to be graphed, and I presume that these also anticipate their next intended use within the sonar development phase. Will really appreciate your input as I have not yet read about the matter from the book (I guess it probably has some hint about this, hasn't it?). Thanks in advance.

Kind regards, Tsi

IanMayo commented 10 years ago

Hi there, I think the original plotting that you did would be fine. One marker for the current location, another marker on a "stalk" represents the current course/speed vector.

No, the remark didn't relate to the sonar development.

tsigit commented 10 years ago

Thank you Ian, Regards, Tsi