I have a flight simulation project that consists of a Qt front end app that communicates with a JSBSim flight dynamics model over UDP. I'm searching for an OTW (out the window) viewer that I can also communicate with via UDP. I have a Cesium viewer running now, displayed by a Qt QWebView widget, and it looks nice, but I'm having trouble setting up the UDP connection.
Note: I'm brand new to javascript, so I'm trying to learn that as I go along. It seems my best bet is to use dgram.js, part of the node distribution, to receive the aircraft position/orientation data from the simulator and then move the viewer's camera accordingly.
My problem is that I can't get the require('dgram') line to work, which would indicate that the dgram module can't be found. I have node and npm installed, and am using the "nodejs server.js" command to run the server from within my cesium directory, which indicates that I have node successfully installed globally. From what I've read on the interwebz the last few days, I need the node modules installed locally in order for the require('dgram') to work.
Try as I might I can't figure out how/where to install node locally so that dgram can be found. I see that there is a node_modules directory in Cesium, but it doesn't contain dgram.js.
Any ideas?
Note(1): Linux, with Cesium installed at $HOME/cesium
Note(2): My project is QtJSBSim (hosted at sourceforge)