//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// $Id$
= fgGetNode("/instrumentation/nav/radials/reciprocal-radial-deg", true);
static SGPropertyNode *nav_gs_deflection
= fgGetNode("/instrumentation/nav/gs-needle-deflection", true);
- int i;
+ unsigned int i;
// Version sanity checking
net->version = FG_NET_GUI_VERSION;
// Environment
net->cur_time = globals->get_time_params()->get_cur_time();
net->warp = globals->get_warp();
- net->ground_elev = globals->get_scenery()->get_cur_elev();
+ net->ground_elev = cur_fdm_state->get_Runway_altitude_m();
// Approach
net->tuned_freq = nav_freq->getDoubleValue();
#if defined( FG_USE_NETWORK_BYTE_ORDER )
// Convert the net buffer to network format
- net->version = htons(net->version);
+ net->version = htonl(net->version);
htond(net->longitude);
htond(net->latitude);
for ( i = 0; i < net->num_tanks; ++i ) {
htonf(net->fuel_quantity[i]);
}
+ net->num_tanks = htonl(net->num_tanks);
net->cur_time = htonl( net->cur_time );
net->warp = htonl( net->warp );
htonf(net->tuned_freq);
htonf(net->nav_radial);
+ net->in_range = htonl( net->in_range );
htonf(net->dist_nm);
htonf(net->course_deviation_deg);
htonf(net->gs_deviation_deg);
void FGNetGUI2Props( FGNetGUI *net ) {
- int i;
+ unsigned int i;
#if defined( FG_USE_NETWORK_BYTE_ORDER )
// Convert to the net buffer from network format
- net->version = ntohs(net->version);
+ net->version = ntohl(net->version);
htond(net->longitude);
htond(net->latitude);
htonf(net->vcas);
htonf(net->climb_rate);
+ net->num_tanks = htonl(net->num_tanks);
for ( i = 0; i < net->num_tanks; ++i ) {
htonf(net->fuel_quantity[i]);
}
net->ground_elev = htonl( net->ground_elev );
htonf(net->tuned_freq);
+ htonf(net->nav_radial);
+ net->in_range = htonl( net->in_range );
htonf(net->dist_nm);
htonf(net->course_deviation_deg);
htonf(net->gs_deviation_deg);
}
globals->set_warp( net->warp );
- globals->get_scenery()->set_cur_elev( net->ground_elev );
// Approach
fgSetDouble( "/instrumentation/nav[0]/frequencies/selected-mhz",