Susan Laflin's Projects.

Project Number 8. Simulation of Semaphore.

Semaphore is a means of signalling by using the position of the arms to code letters and numbers. It was widely used, especially in the navy, before radio and telegraph systems were invented. Usually the signaller held flags to improve the visibility and indicate which of the many individuals on deck was sending the signal. Sometimes a wooden board was used with "arms" in the correct position. Note that it is the position that matters - it is irrelevant which arm is used, although for some letters it is much easier to use the right arm and so the left is seldom used, but would be equally correct if you wished to use it. This means of coding an alphanumeric string could be used as the basis for one or more projects.

As a pre-requisite for any of the projects, you will need to write programs which will accept alphanumeric input and display the result as a stick-figure in the correct position. You will need to show the face to make it clear which is the left side and which the right. Once this is working smoothly, you may progress to other versions. The basic project will need something more than this to qualify for a pass mark.

a) The simplest extension is to write a training program for people wishing to learn semaphore. This should have two options - the first to type in a character and have the character and the corresponding semaphore position displayed on the screen. (For numbers, you have two positions, the numeric shift followed by that number. After this, the next letter will have to have the letter shift and then the letter). The second option will need a random choice of letter and then display the figure and allow one or two attempts to identify it. You might also have a small selection of phrases which are displayed across the screen and the user has a number of attempts to type in the answer.The phrase may also appear as a row of figures. Once this software is working, you will need to include it in a series of lessons to make up your "TEACH ME SEMAPHORE" teaching package.

b) Another extension would be to include animation of the figure and the flag. Display the position for the first letter, holding flags which hang vertically from the sticks. Hold this position for a few seconds. Then move the arms to the next position and hold that for a few seconds. Try and get smooth movement of the arms from one position to the next and ensure that the flags on the end of the sticks continue to hang vertically. Finally, if time permits, add the software to allow a wind to make the flags flap. This is a non-trivial addition and a good implementation should certainly qualify for a (well-deserved) first class mark.

c) Another possibility is to assume the observer is not the person for whom the message is intended and so the view of the signaller is obscured. This provides incomplete information and the program should attempt to reconstruct the message, assuming the language used was English and some idea of the content of the message is known leading to a limited vocabulary. For example, if the left-hand side of the signaller was obscured, then the observer would be unable to distinguish between the letters "L", "M" and "N", but would know that one of these was intended. Having chosen a phrase at random from a previously supplied list, you should display the incomplete information and under each figure, a list of the possible letters. From this, the user or the program has to try and reconstruct the message.

Since semaphore is no longer used, there are not many manuals describing it. However the children's book "Winter Holiday" by Arthur Ransom (still available in paperback) does include a good description of the use of semaphore. The Sherlock Holmes story "The Dancing Men" may also give you some ideas for such a project, although he wasn't actually using semaphore. Beware of the descriptions found on the www - one used by a recent project was very misleading and actually contained an error. You should discuss these with your supervisor before relying on them.