Simple Control Server


This example demonstrates how to use the DroolsTab as a spatial scenario simulation server. Using this server you can control navigating object from the Web-clients on base of an ordinary Web-browser, that is change their coordinates, courses and speeds and also assign them missions to accomplish. The example is in a "SimpleControlServer" Protege project (SimpleControlServer.pprj, SimpleControlServer.pins and SimpleControlServer.pont files)

    Running "SimpleControlServer" example

1. Start run_protege.sh (Linux, Mac OS X) or run_protege.bat (Windows).

2. Open the project SimpleControlServer.pprj. You need not compile ontology for this project, if you have done so for the "Sea" project.

3. Go to "Drools" Tab, create the RuleBase and evaluate "Create DroTimer from RuNA" and "Start Simple Control Server" scripts. After that you should see a message "HTTP Server listen on port 4444" in the DroolsTab console.

4. Go to the "Openmap" Tab, start timer and set time scale to 32:1.

5. Open the Web-brouser and input in an address field "http://localhost:4444/?REQUEST=MAP&CLIENT=TRAF". You should see a web page with a map on the left frame and the Control and Navigate panels on the right Frame.

6. Input "s1" into the "Object" field, check the "Info" box and click the "Submit" button. You should see information about the ship "s1" and the map parameters.

7. Input "315" into the "Course" field and "12" into the "Speed" field, uncheck the "Info" button and click the "Submit" button. You should see how the ship "s1" goes to north-west direction.

8. Now input "Arrive" into the "Mission" field and "?lat-59_30;?lon-29_30" into the "Parameters" field, click "Submit". You should see how the ship "s1" turn and goes to the corresponding point. When she comes there, you can input new coordinates into the "Parameters" field and issue "Arrive" command again. Missions to be implemented by scenarios. Only the "Arrive" scenario is implemented in this demo example. You can study it and create your own scenarios and missions.

9. You can use the "Navigate panel" to move the center of the map and its scale.

10. There are two more clients that can be used from other browser instances. Address strings for them are "http://localhost:4444/?REQUEST=MAP&CLIENT=HEAD" and "http://localhost:4444/?REQUEST=MAP&CLIENT=AIRB". You can create more clients youreslf - they are instances of the "HTTPClient" class.

If something goes wrong send me Java console output and the problem description.

    Ru (mailto:sorokin@oogis.ru)