X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=utils%2FGPSsmooth%2Fgps_main.cxx;h=d28f8f1f4c58b7613ed6e874c2b32e3f615a88a5;hb=6baaee696f087ad79dde8e703815e4e52b6ca15d;hp=5dfc76c6729a242fb23ba392a0b29b7c0d3d4bf3;hpb=317302004332ed5b6082ea548c1b06b68fc4350c;p=flightgear.git diff --git a/utils/GPSsmooth/gps_main.cxx b/utils/GPSsmooth/gps_main.cxx index 5dfc76c67..d28f8f1f4 100644 --- a/utils/GPSsmooth/gps_main.cxx +++ b/utils/GPSsmooth/gps_main.cxx @@ -60,15 +60,15 @@ bool inited = false; // point value. By doing the BIG_ENDIAN test, I can optimize the // routine for big-endian processors so it can be as efficient as // possible -static void htond (double &x) +static void htond (double &x) { if ( sgIsLittleEndian() ) { int *Double_Overlay; int Holding_Buffer; - + Double_Overlay = (int *) &x; Holding_Buffer = Double_Overlay [0]; - + Double_Overlay [0] = htonl (Double_Overlay [1]); Double_Overlay [1] = htonl (Holding_Buffer); } else { @@ -77,15 +77,15 @@ static void htond (double &x) } // Float version -static void htonf (float &x) +static void htonf (float &x) { if ( sgIsLittleEndian() ) { int *Float_Overlay; int Holding_Buffer; - + Float_Overlay = (int *) &x; Holding_Buffer = Float_Overlay [0]; - + Float_Overlay [0] = htonl (Holding_Buffer); } else { return; @@ -281,7 +281,6 @@ static void gps2fg( const GPSPoint p, FGNetFDM *fdm, FGNetCtrls *ctrls ) static void send_data( const GPSPoint p ) { - int len; // int ctrlsize = sizeof( FGNetCtrls ); int fdmsize = sizeof( FGNetFDM ); @@ -291,7 +290,7 @@ static void send_data( const GPSPoint p ) { FGNetCtrls fgctrls; gps2fg( p, &fgfdm, &fgctrls ); - len = fdm_sock.send(&fgfdm, fdmsize, 0); + fdm_sock.send(&fgfdm, fdmsize, 0); } @@ -431,7 +430,7 @@ int main( int argc, char **argv ) { GPSPoint p, p0, p1; p0 = p1 = track.get_point( 0 ); - + while ( current_time < end_time ) { // cout << "current_time = " << current_time << " end_time = " // << end_time << endl;