- Joined
- Mar 31, 2012
- Messages
- 2,298
- Reaction score
- 4
- Points
- 0
Last update (2014-02-03) in RED.
Orb::Connect Web Edition
Bringing Orbiter into the Web era!
Launch checklist:
1. Unpack the attached add-on
2. Enable OrbConnect.dll module.
3. Launch the simulation.
4. Open http://127.0.0.1:38888/ in a Web browser.
5. Try clicking around the panel
FAQ
Why??? Because. Seriously, you don't see how this can be useful?
What browser does it work with? I have tested with Firefox. Any modern browser should work -- the client-side code is not abusive in any way.
Orbiter hangs when I use RCS controls. Try disabling OrbiterSound.
Firefox hangs when clicking the engine controls. It will unhang after a few seconds.
I don't like layout of the controls! No problem, just edit www\index.html to suit your needs.
I want to add more controls or make my own panel. Have a look at www\example.html to see how this is done.
Does it work over the network? Of course. Just make sure that your firewall is not blocking incoming connections to TCP port 38888.
Does it work with my phone/tablet? It does with my Android 4.0 tablet:
Can I have multiple clients? Of course.
Can I have multiple panels? Sure. Just make several .html files and use browser tabs or something.
Can this be used to control X? If X is accessible via Orb::Connect, then yes. See Doc\OrbConnect\OrbConnectUserGuide-2.1.pdf.
My simpit already uses Orb::Connect server! I'm not going to rewrite everything to run over HTTP! There is no need. The Orb::Connect server operates the same as in stock version, on port 37777.
How does it work? I have added an HTTP server to Orb::Connect. This server has two functions. First, it serves files located under "www" directory. Second, if the client sends a POST request to /cgi with Orb::Connect commands, these commands are passed to Orb::Connect core, and the result is returned to the client. On the client side, there is a JavaScript library which handles communication with the server.
Can you put it in normal terms? There is a web server in Orbiter. Your browser connect to the web server, and loads the HTML file with the panel layout. The JavaScript code in that file handles updates.
Are you saying that I can control spacecraft using a web browser? Yes!
What is the update frequency? It is set on the client, with the parameter passed to OrbiterClient::start(). The included examples use 5Hz.
What is the impact on frame rate? I have not observed any. It should be very small, because the HTTP server is written in a non-blocking way.
Did you write the HTTP server yourself? No. I have used mongoose.
What about license? Both Orb::Connect and mongoose are under GPL, so the resulting combination is under GPL.
Where is the source code? Included in the download, under Orbitersdk directory.
What modifications did you make to Orb::Connect? Not many. I have added 4 files implementing the web server functionality (http.cpp, http.h, mongoose.c, mongoose.h) and added needed hooks in OrbConnect.cpp. Everything else is unchanged.
REVISION HISTORY
Rev. 19, 2014-02-23
Make the tabbed interface default
Fix SHIP:FOCUS:STATUS2 crash.
Update docs.
Add engine control.
Add about dialog
Implement truster control.
VesselCommandParser.cpp: use thruster groups instead of engine groups (bring code in line with documentation )
orbiterclient.js: add helped function for SHIP:FOCUS:SENDBUFFEREDKEY
example.html: add example for sendBufferedKey
XRVesselCtrl.h: upgrade to 3.0 (vdrorb)
XRCtlCommandParser.cpp: bugfix: setDescentHoldAP could not set TargetDescentRate (vdrorb)
XRCtlCommandParser.cpp: add new fields from XRVesselCtrl API 3.0 (vdrorb)
VesselCommandParser.cpp: add SendBufferedKey (vdrorb)
Initial release (2.1-web), 2014-02-23
Orb::Connect Web Edition
Bringing Orbiter into the Web era!
Launch checklist:
1. Unpack the attached add-on
2. Enable OrbConnect.dll module.
3. Launch the simulation.
4. Open http://127.0.0.1:38888/ in a Web browser.
5. Try clicking around the panel
FAQ
Why??? Because. Seriously, you don't see how this can be useful?
What browser does it work with? I have tested with Firefox. Any modern browser should work -- the client-side code is not abusive in any way.
Orbiter hangs when I use RCS controls. Try disabling OrbiterSound.
Firefox hangs when clicking the engine controls. It will unhang after a few seconds.
I don't like layout of the controls! No problem, just edit www\index.html to suit your needs.
I want to add more controls or make my own panel. Have a look at www\example.html to see how this is done.
Does it work over the network? Of course. Just make sure that your firewall is not blocking incoming connections to TCP port 38888.
Does it work with my phone/tablet? It does with my Android 4.0 tablet:
Can I have multiple clients? Of course.
Can I have multiple panels? Sure. Just make several .html files and use browser tabs or something.
Can this be used to control X? If X is accessible via Orb::Connect, then yes. See Doc\OrbConnect\OrbConnectUserGuide-2.1.pdf.
My simpit already uses Orb::Connect server! I'm not going to rewrite everything to run over HTTP! There is no need. The Orb::Connect server operates the same as in stock version, on port 37777.
How does it work? I have added an HTTP server to Orb::Connect. This server has two functions. First, it serves files located under "www" directory. Second, if the client sends a POST request to /cgi with Orb::Connect commands, these commands are passed to Orb::Connect core, and the result is returned to the client. On the client side, there is a JavaScript library which handles communication with the server.
Can you put it in normal terms? There is a web server in Orbiter. Your browser connect to the web server, and loads the HTML file with the panel layout. The JavaScript code in that file handles updates.
Are you saying that I can control spacecraft using a web browser? Yes!
What is the update frequency? It is set on the client, with the parameter passed to OrbiterClient::start(). The included examples use 5Hz.
What is the impact on frame rate? I have not observed any. It should be very small, because the HTTP server is written in a non-blocking way.
Did you write the HTTP server yourself? No. I have used mongoose.
What about license? Both Orb::Connect and mongoose are under GPL, so the resulting combination is under GPL.
Where is the source code? Included in the download, under Orbitersdk directory.
What modifications did you make to Orb::Connect? Not many. I have added 4 files implementing the web server functionality (http.cpp, http.h, mongoose.c, mongoose.h) and added needed hooks in OrbConnect.cpp. Everything else is unchanged.
REVISION HISTORY
Rev. 19, 2014-02-23
Make the tabbed interface default
Fix SHIP:FOCUS:STATUS2 crash.
Update docs.
Add engine control.
Add about dialog
Implement truster control.
VesselCommandParser.cpp: use thruster groups instead of engine groups (bring code in line with documentation )
orbiterclient.js: add helped function for SHIP:FOCUS:SENDBUFFEREDKEY
example.html: add example for sendBufferedKey
XRVesselCtrl.h: upgrade to 3.0 (vdrorb)
XRCtlCommandParser.cpp: bugfix: setDescentHoldAP could not set TargetDescentRate (vdrorb)
XRCtlCommandParser.cpp: add new fields from XRVesselCtrl API 3.0 (vdrorb)
VesselCommandParser.cpp: add SendBufferedKey (vdrorb)
Initial release (2.1-web), 2014-02-23
Attachments
Last edited: