// Modified by Cdr. VS Renganthan <vsranga@ada.ernet.in>, 12 Oct 2K
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <simgear/io/iochannel.hxx>
+#include <simgear/io/sg_socket.hxx>
#include <simgear/constants.h>
#include <Controls/controls.hxx>
copy_to_FGADA();
// Write FGExternal structure from socket to establish connection
int result = fdmsock->write(OutBuffer, nbytes);
- printf("Connection established.\n");
+ printf("Connection established = %d.\n", result);
}
}
copy_to_FGADA();
fgGetDouble("/sim/view/offset",view_offset);
- if ( view_offset == 0.0) {
- memcpy (&OutBuffer, &visuals_to_sixdof, sizeof (OutBuffer));
- int result = fdmsock->write(OutBuffer, nbytes);
- }
+ if ( view_offset == 0.0) {
+ memcpy (&OutBuffer, &visuals_to_sixdof, sizeof (OutBuffer));
+ fdmsock->write(OutBuffer, nbytes);
+ }
}
// Convert from the FGInterface struct to the FGADA struct (output)
bool FGADA::copy_to_FGADA () {
- ground_elevation = scenery.get_cur_elev();
+ ground_elevation = globals->get_scenery()->get_cur_elev();
return true;
}