Jump to content
The simFlight Network Forums

GauWin

Members
  • Posts

    7
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    France

GauWin's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi Pete, Last question please, I need to change the weather. Can I use FSUIPC for that or use another interface ? If possible handle it from another computer with socket. Thank you for all, Rémi
  2. I settle the problem ! Thank you for your help Pete :razz:
  3. Thank you for your answers Pete. And sorry but i don't ignore you, I have difficulty to translate into French. But now i understand better. Rémi
  4. Ok so my structure should look like typedef struct Plane { int pitch; int head; int bank; double lat; double log; double alt; } Plane; [/CODE] long long or double for altitude, longitude and latitude ? And if I use long long (my compiler can) how can I convert double in long long ? Sorry but I do not understand everything I'm a beginner ... Thank you so mutch for all, Rémi
  5. I receive a structure with my socket, but how to write the FSUIPC_Write() ? With what offset ? Yes, but I can not translate everything. I use C for this work. You think the conversion (altitude,latitude,longitude) are correct ? or not optimized ? Thank you very much for your help
  6. My code double longitude; double latitude; double altitude; int intLogB=0; int intLogH=0; double logB=0; double logH=0; int intLatB=0; int intLatH=0; double latB=0; double latH=0; int intAltH=0; int intAltB=0; double doubleAltH=0; double doubleAltB=0; double doubleAlt=0; //Calcul altitude doubleAltB=modf(doubleAlt,&doubleAltH); intAltH=doubleAltH; doubleAltB=doubleAltB*1000; intAltB=doubleAltB; //intAltB=5; //Calculs longitude longitude=longitude/(360.0/(65536.0 * 65536.0)); logB=modf(longitude,&logH); logB=logB*(65536.0*65536.0); v=modf(logB,&logB); intLogB=logB; intLogH=logH; //Calculs latitude latitude=latitude/(90.0/10001750.0); latB=modf(latitude,&latH); latB=latB*(65536.0*65536.0); v=modf(latB,&latB); intLatB=latB; intLatH=latH; ( ... ) //Angles FSUIPC_Write(0x0578,4,&intPitch,&dwResult); FSUIPC_Write(0x057C,4,&intBank,&dwResult); FSUIPC_Write(0x0580,4,&intHead,&dwResult); //Latitude FSUIPC_Write(0x0560,4,&intLatB,&dwResult); FSUIPC_Write(0x0564,4,&intLatH,&dwResult); //Longitude FSUIPC_Write(0x056C,4,&intLogH,&dwResult); FSUIPC_Write(0x0568,4,&intLogB,&dwResult); //Altitude FSUIPC_Write(0x0570,4,&intAltB,&dwResult); FSUIPC_Write(0x0574,4,&intAltH,&dwResult); FSUIPC_Process(&dwResult); [/CODE] I think I have solved this problem. But when I fly near the ground I see the plane moving from left to right in jerking. So I think the latitude, altitude and longitude are the problem. Sorry but i don't understand everything, can you give me an example? Thank you for your help, Rémi
  7. Hi Pete Sorry for my bad English, i'm a young French student in computer science. I use FSUIPC for my professional training, indeed i have to replace the old visualization program of a flight simulator (FlightGear) by Flight Simulator X. For this work I use 2 Thread. The first thread receives data through a socket and the second write with FSUIPC. The server converts data and send this one with the socket. I use 32-bit PC and i have little problem of fluidity image. I think it's because of conversion. Example of latitude : int intLatB=0; int intLatH=0; double latB=0; double latH=0; double latitude; // -------------------------------------------------------------------------------- latitude=latitude/(90.0/10001750.0); latB=modf(latitude,&latH); latB=latB*(65536.0*65536.0); v=modf(latB,&latB); intLatB=latB; intLatH=latH; ( ... ) //Latitude FSUIPC_Write(0x0560,4,&intLatB,&dwResult); FSUIPC_Write(0x0564,4,&intLatH,&dwResult); // -------------------------------------------------------------------------------- [/CODE] This is correct? Or you have another idea? Thank you in advance for your help and sorry again for my very bad English. Regards, Rémi
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.