Jump to content
The simFlight Network Forums

maufus

Members
  • Posts

    12
  • Joined

  • Last visited

About maufus

  • Birthday 01/01/1970

Contact Methods

  • Website URL
    http://
  • ICQ
    26697936

maufus's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Writing to 2E98, 2EA8, 2EB8 offsets while in SLEW, something moves: rudder and elevators, by example, but with ailerons only the left one moves (I tried different aircrafts). Any tips for right aileron??
  2. For FS-to-FS test case we do use windows timing: it's not very precise timing, but almost quick. With a simple 'Sleep(0)' in the data read&send loop we send messages at intervals ranging from 5-6 to 15ms. To get quicker sending times, just minimize the source FS window (when minimized FS continues to run but its CPU usage is 1/10 than usual). My main loop at receiver's side is: while (netRunning == true) { itmp = sizeof(inaddr); retval = csock->ReceiveFrom(inbuff, BUFSZ, (SOCKADDR*) &inaddr, &itmp, 0); if (retval == sizeof(indata)) { fslat = inpkt->Latitude * LAT_DEG2FS; fslon = inpkt->Longitude * LON_DEG2FS; fsalt = inpkt->Altitude * ASL_M2FS; fspitch = inpkt->Thetad * PRY_DEG2FS; fsroll = inpkt->Phid * PRY_DEG2FS; fsyaw = inpkt->Psid * PRY_DEG2FS; fsuipc.Write(FS_LAT_FSUNITS, FS_LAT_FSUNITS_size, &fslat); fsuipc.Write(FS_LON_FSUNITS, FS_LON_FSUNITS_size, &fslon); fsuipc.Write(FS_ASLHGT_M65536, FS_ASLHGT_M65536_size, &fsalt); fsuipc.Write(FS_PITCH_CIRCLE, FS_PITCH_CIRCLE_size, &fspitch); fsuipc.Write(FS_ROLL_CIRCLE, FS_ROLL_CIRCLE_size, &fsroll); fsuipc.Write(FS_HDG_CIRCLE, FS_HDG_CIRCLE_size, &fsyaw); retval = fsuipc.Process(); } } while at the sender's: while (this->runFlag_ == TRUE) { Sleep(0); latDeg = FSDataInterface::GetLatDegrees(); // fsuipc->ReadAndProcess(0x560...) lonDeg = FSDataInterface::GetLonDegrees(); // fsuipc->ReadAndProcess(0x568...) hdgDeg = FSDataInterface::GetHeadingDegrees(); // fsuipc->ReadAndProcess(0x580...) pitchDeg = FSDataInterface::GetPitchDegrees(); // fsuipc->ReadAndProcess(0x578...) rollDeg = FSDataInterface::GetRollDegrees(); // fsuipc->ReadAndProcess(0x57c...) hgtasl_m = FSDataInterface::GetAltitudeASL_m(); // fsuipc->ReadAndProcess(0x570...) // ----------------- SEND DATA indata omsg; omsg.Latitude = latDeg; omsg.Longitude = lonDeg; omsg.Altitude = hgtasl_m; omsg.Thetad = pitchDeg; omsg.Phid = rollDeg; omsg.Psid = hdgDeg; pData = (void*) &omsg; dataLen = sizeof(omsg); dsink->Send(pData, dataLen); // This is a simple UDP socket } As an example, the FSDataInterface::GetLatDegrees() is double FSDataInterface::GetLatDegrees() { double dval = 0.0; DWORD dwResult; __int64 rVal; if (FSUIPC_Read(FS_LAT_FSUNITS, FS_LAT_FSUNITS_size, &rVal, &dwResult) && FSUIPC_Process(&dwResult)) { dval = (double) rVal; dval = dval * 90.0 / (10001750.0 * 65536.0 * 65536.0); } return dval; } PLS NOTE that we use 'double' because 'float' has insufficient precision! ALSO note that this code is stripped out of a test application so may be somehow incomplete/incorrect. Sorry for the long post - hope it's useful to somebody.
  3. We use the 0560 and 0568 offsets. Pay attention to the conversion functions: I suppose you send latitude and longitude degrees or radians angles over the net, maybe in a 'float' or 'double' field, and then convert them to 'FS UNITS'. Changing the order of multiplications/divisions may affect the conversion precision. What do you exactly mean with "choppy" ? We get smooth flying - very nice! Try installing FS9 on two separate machines. On one machine read FS UNITS and send them continously over the net without conversion. On the other side put directly the FS UNITS in FS9 and see what happens.
  4. Well, we're using MS FS2004 for a serious visual system and we got wonderful output. We send data (position and attitude plus a set of other custom data) at 10ms rate or 20ms in other cases. We set the frame rate limited to 50FPS and everything's fine. The only problem with us was that we needed a multi-monitor output, so we had to buy a very powerful computer. Believe me - it's not easy to buy a top performance PC (in Italy, at least!).
  5. Hi, I tried with RUDDER_CENTER, RUDDER_RIGHT and RUDDER_LEFT controls. They do not operate in SLEW - it seems that FS or FSUIPC enque such controls settings while in SLEW, because if you disable SLEW you'll see all of your sent controls to be executed all at once! Thankyou for your try, however!
  6. When driving aircraft position via FSUIPC you have to: - set SLEW MODE or - set PAUSE MODE or - set SIMULATION RATE to 0 (but this prevents you from seeing effects like rain, moving AI aircrafts etc). BYE!
  7. SOFTWARE: FS2004 (NOT updated to 9.1) and FSUIPC 3.30 (maybe not needed?) Hi all, I'd need to move ailerons, elevators, rudder and other mobile surfaces while in SLEW mode. I know programs like Wideview already provide something like that: wideview can control aircraft position and attitude, but does nothing with control surfaces. I tried via FSUIPC in different ways: - writing to 0BB2, 0BB4, 0BB6offsets, but surfaces don't move - writing to 2E98, 2EA8, 2EB8 offsets and something runs with rudder and elevators, but only the left aileron moves (I tried different aircrafts) So, any tips? Or is it possible to do it with a special gauge? Something that gets control values from custom UDP packets and writes simulation variables?
  8. Hi, I'm trying to use FS2004 as a visual system for a true simulator. I wrote a VC++ code which interfaces to FSUIPC writing all of the 6 DOF params in a single "process". Again: I do only write the 6 DOF params. The result is that the plane moves around the planned track (a circle on the horizontal plane) but it shakes while moving. My feeling is that FS2004 tries to apply its own dynamics after I set position and attitude. I tried with update periods of 50 and then 100ms. Do you think I should get faster? Or should I set some special status flag inside FS2004? FS2004 Version 9 (no update) / FSUIPC Version 3.30 (Registered)
  9. My need is to take a "video record" of a flight. For "video recording" I mean what you can do by selecting "Flight video" in the "Options" menu (pls note I own the Italian version of FS2004 - hope the translation is correct or meaningful) Is it possible to start, and then save, a "video recording" in FS2004 via FSUIPC (or in any other way) without user operation?
  10. Sorry, I just missed it! That's ok now! Thankyou! :wink:
  11. Sorry for the mess, I didn't mean ADVdisplay. By means of FSUIPC I write my text to 0x3380 and the length to 0x32fa and it comes up on the screen in that color combination (red on green). So my question is: can I change the color combination of the text appearing on Fligh Simulator' screen? Thankyou again.
  12. Hi, I'm using FSUIPC for my custom app. My need is to constantly have a text row on the screen for some readouts. I used ADVtext for it, but its color combination (red on green) is terrible for constant reading. Is there any way to change it? White on blue would be nice, just as ABL scripting does. Other ways to put some text on the screen via FSUIPC? thanx.
×
×
  • 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.