Jump to content
The simFlight Network Forums

almondega

Members
  • Posts

    22
  • Joined

  • Last visited

Posts posted by almondega

  1. But surely the copilot is controlling the server simulation, not his own. His own copy of FS is being controlled by your software. You can really only have one plane being simulated. The other is just a dummy following the controlling plane's actions.

    the dummy part is only to the position the aircraft (position.exe), inside the pilot and copilot can changes the buttons (the program "command.exe" sync this, using level-d sdk and some fsuipcs offsets)

    How far away is your copilot from your pilot?

    any place of the world, each one with your own FS, and this two programs to syncronize the aircrafts (like FSNet)

    the peoples who uses FSX will only need the command program, cuz the own fsx has a func to sync the position, i need to test this yet

    this is the only way that i know to fly like pilot/copilot and the both doing things inside the aircraft =/

    after that changes to UDP and 40ms and 1 process call per iteration, a flight manual, without AP doing very well, i'll test some offsets to try avoid the "pitch jumping" using AP, and try to find why my trim goes to 0 (in copilot side) and the pilot still sending me 5.. 6 trim elevetor

    tks

  2. What Server did it go via before?

    a server with same protocol to manage the connections

    the command program uses it, client/server/client, but the position now is direct client/client

    You should really not have both autopilots operating. Can't you make your program on the copilot side stop the A/P switching on?

    yes

    but turn a/p on and off is a work of the copilot...

    has a way to turn the "autopilot engine" off?

    i mean, all the lights and panels indicates that AP is on, but the FS dont process the ap?

    i had searched here in the offsets, but without success..

    it reads whatever is asked of it. The client sends the request to the server, just the once. The server remembers each client's data needs and watches the data in FS for changes. It then only sends changes.

    very good

    so, i read the offsets that i need and send to FS ;)

    Does the start-up work okay with other aircraft?

    i'v made a test here with a 737 default

    and the N2 and engines starts ok..

    i'll talk with the level-d's team whats going on

  3. UDP does the same job but without checks and retries

    i'd changed to UDP, now the pilot program conect direclty to the client/copilot side, without passing by a server

    set the frame rate limiters to, say, 20, then use 50 mSecs

    i'd seted to 40ms / 25fps, works fine without autopilot, but still somes "fight" when using autopilot at the copilot side, cuz the aircraft autopilot's try to do a thing, and receive a refresh position a little diferent, i'll try fix it...

    WideServer runs in the Server. You'd have to have WideClient running alongside FS on the Client. You discard the prgram you wrote for the Server end and instead amend your client program to give it TWO FSUIPC interfaces: one to the FSUIPC inside FS (as now), and the other to the same interface in Wideclient. You read from WideClient and write to FS.

    ok, I understand now what widefs does, but, my position programs reads only few offsets about position and send every 40ms to the client, the widefs reads much more offsets then it, right?

    To do this you cannot use the FSUIPC library itself. You will need to use the source code I supply instead, and modify it to use the different ClassName for that WideClient and, obviously, a different set of FSUIPC_... () calls. Alternatively you can add another parameter to the calls to identify which interface to use. Each one will need its own memory mapped file (part of the Open() actions.

    ok, only have to change the FindWindowEx func in each new FSUIPC_Open function, in this case will need two, and modify the others funcions to know what m_hWnd have to use

    Do without that "slide" stuff: done

    have only one FSUIPC_Process call per cycle: done

    equalise FS frame rates and your cycles, save 20 fps and50 mSecs: done

    but i still got a problemm in the level-d at the copilot's side

    the copilot receives the new positions every ~40ms and refresh yours FS offsets

    then, when going to start the engines, the N2% increases too slowly, so, i have to stop the position refresh, start the engines, and start the position refresh after this..

    i dont know why the N2% got lag, almost stop to increase, with a high offsets refresh rate, so that the engines do not start

    all the others stuffs works well

    tks

  4. You did your own TCP/IP code, didn't you? Are you using TCP or UDP? UDP is faster -- less checking, no repeats on error and so on.

    i'm using the winsock lib to get TCP/IP sockets. i'll read something about UDP, cuz i only found server/client tutorials using tcp/ip

    What sort of update rate are you achieving from the Server to the Client?

    the last test i'v did online, the pilot sends to the copilot every 200ms, should i decrease it to the minimum that dont changes the fps?

    If you can set the frame rate limiter in both Server and Client to, say, 25 or 30, so they are both updating at the same rate, and you send new positions at that rate, you should get no jerkiness

    i'll do it, but i think that my friends uses the same fps I.

    did you not think of using WideFS and only doing the software for the client end?

    are you saying that widefs can do this what i'm trying to do? this is great!!

    I didnt understand the rest of your message, u mean that i can run my FS and also run a server of widefs to the copilot get my position?

  5. I thought I told you right at the beginning that it was payware, not free?

    yes, but i bet in a trial test, but the server needs a key, no trial or try version

    It's a zero (i.e. stopped, no simulation, nothing), rate

    The client copy of FS just becomes a dummy worked by the server. Isn't that what you want?

    yes, i'v tested the rate 0 here, if the cliente/copilot set to 0, the pilot will have to send many others offsets, like N1%, fuel

    I don't understand all that "position slide"

    i'v created this to try avoid the "jump" in the copilot aircraft's position, i.e: the pilot is at pitch 0, and goes to the pitch 40, in yours fs its works perfectly, so, the pilot sends to the copilot: pitch 40. The pilot receives the 40 and refresh your fs, so your pitch goes from 0 to 40 in one frame (ugly), then i'v tried this "manual slide", the pos_slide function do (40-0) / 20 and increase the pitch 2 per 2, until 40 (the new value), like the pilot's aircraft or a solo flight did.

    i dont know other way to avoid this refresh jump

  6. Serial? WidevieW? Not last time I looked. TCP/IP, and I think IPX/SPX was added.

    sorry, my english aint's so good x)

    i mean this software needs a key, serial, password to work, at last the server needs, the clients dont, so, i cant test it

    Yes, a lot of people have said that. It's the FS sim engine taking over. Try a sim rate of zero.

    is this the Normal ou Slowest rate?

    Overload? Sorry, don't know what that means. If the processor is too heavily loaded, your FS frame rate will suffer, but things don't just stop working.

    i dont know what happend, when i'd used the pos_slide, the 767's engines dont had started, then, i'v seted the Sleep of the pos_slide to 200ms, and the engines begins to start, but with some lag, then i stop the pos_slide and the engines starts perfectly, so, i think that the pos_slide uses too much the fsuipc, and the level-d cant start your engines (a guess again)

    If it works except with the LevelD you might need to find out what the LevelD is doing differently.

    i'll test the sync program with pos_slide actived with a default aircraft to see if hav the same problem

    did you find you needed to write to those 3xxx offsets too?

    i tried it to minimize the copilots "lag" position refresh, i'll try too without it

    Normally the whole position and attitude is set directly via the 05xx values

    if i write the entire position struct (only one write, starting from the first position offset, writing the entire position struct), will be better then set offset by offset?

    And why separate Process calls?

    cuz the pos_slide uses Process too, so, i put it after the engines/position dont had refresh, to see is solve, but not x)

    tks pete

  7. i was searching for an aircraft share cockpit software, but found only fsnet and wideview

    and the wideview server needs serial...

    so, i'll keep my own software sync

    its working, altitude, latitude, longitude, pitch, bank, hdg, velocities, elevator, rudder, trim, alieron

    but its not perfect like a slide movement, the copilot's airplane changes yours positions with a little lag (like a pitch 0 going to 10 instantly, without passing by 1, 2, 3...)

    then, i'd created some functions to do this "slide"

    current pitch: 0

    new pitch: 10

    then, go 1 per 1 until 10

    isolated tests its working perfect, but, when i went to test with the level-d, i got a problem, maybe a overload os FSUIPC process, cuz the engines dont had started, the position dont had refreshed. (i'm talking about the copilot, cuz only the copilot receives the positions)

    here is the slide code:

    void pos_slide(DWORD flag, int pos_nova) {
        int value, pos_atual;
        FSUIPC_Read(flag,4,&pos_atual,&result);
        FSUIPC_Process(&result);
        if (pos_nova < pos_atual) {
            value = pos_atual - pos_nova;
            value /= 20;
            while (pos_atual > pos_nova) {
                Sleep(10);
                pos_atual -= value;
                if (pos_atual < pos_nova) pos_atual = pos_nova;
                FSUIPC_Write(flag,4,&pos_atual,&result);
                FSUIPC_Process(&result);
            }
        }
        else if (pos_nova > pos_atual) {
            value = pos_nova - pos_atual;
            value /= 20;
            while (pos_atual < pos_nova) {
                Sleep(10);
                pos_atual += value;
                if (pos_atual > pos_nova) pos_atual = pos_nova;
                FSUIPC_Write(flag,4,&pos_atual,&result);
                FSUIPC_Process(&result);
            }
        }
    }

    pos_atual = current position

    pos_nova = new position to set

    what i do: i got the new value, get the difference, and divide by 20, to set the inc/dec rate, so, all slide refresh will have 20 iterations

    but this did the fsuipc "block" or had some lag, as i'd said, engines dont starting, position dont get refreshed

    has a better way to do this slides, like a fsuipc offset to do it?

    this is the copilot code that receive the positions

    FSUIPC_Write(0x0BB2,2,&position.elevator,&result);
    FSUIPC_Write(0x0BB6,2,&position.alieron,&result);
    FSUIPC_Write(0x0BBA,2,&position.rudder,&result);
    
    FSUIPC_Write(0x3098,8,&position.late_speed,&result);
    FSUIPC_Write(0x3090,8,&position.long_speed,&result);
    FSUIPC_Write(0x30A0,8,&position.vert_speed,&result);
    FSUIPC_Write(0x30B0,8,&position.roll_speed,&result);
    FSUIPC_Write(0x30B8,8,&position.yaw_speed,&result);
    FSUIPC_Process(&result);
    
    pos_slide(0x0578,position.pitch);
    pos_slide(0x0580,position.hdg);
    pos_slide(0x057C,position.bank);
    FSUIPC_Write(0x0570,4,&position.altitude_lo,&result);
    FSUIPC_Write(0x0574,4,&position.altitude_hi,&result);
    FSUIPC_Write(0x0560,8,&position.latitude,&result);
    FSUIPC_Write(0x0568,8,&position.longitude,&result);
    FSUIPC_Write(0x0BC0,2,&position.trim,&result);
    FSUIPC_Process(&result);

    tks

  8. that is what your (other?) program is for

    yes, two programs, one to the level-d commands and other to syncronize the aircrafts

    Did you find out what was wrong with your program's writing of the altitude? Did you use the GSUIPC logging? I assume you are writing the altitude to offset 0570 (a 64-bit int with 32 bit fractional part)?

    my mistake, reading again the .doc and doing some tests...

    the meters are in 0574 (int) and the fractional 0570 (int)

    so, i have to get two variabels to read and write, its correct? or read/write all the 8 bytes in a "long long int" ?

    i was sending only the fractional part and writing into the fractional part

    so, the metric part was independent of the refresh and resulting in that "bug" altitude

    i'll make some changes here

    tks Pete

  9. I don't understand. The latitude and longitude identify the scenery location

    some tests i'd did, the latitude or longitude stay changing a little and i dont know why

    but Luciano Napolitano's WidevieW program does a good job.

    i'll take a look

    if it is a good program to aircraft sincronization, then i'll finish my project with the level-d 767 commands sincronization ^^

    its prety good fly the level-d with a copilot or pilot

    You say you write, through FSUIPC, an altitude value, and that the user aircraft in FS goes to the WRONG altitude?

    yes, i send my altitude position to the copilot, and he stays around 200 ~ 1000 feets under or above me, really very strange

    anyway, i create this project to fly (only) the Level-D 767 with a copilot, but theres no software like "share aircraft" from the fsx to get and set the values of the level-d's variables, and i did it, but i need too sincronizate the aircraft, so, i'll test the Napolitano's software =]

    tks

  10. Let me understand this a bit more. You are trying to have two PCs running FS with both pilots flying the same aircraft?

    You know that if you move to FSX you have this facility already built into FS? It's called "shared cockpits"

    yes, the level-d 767 aircraft, each one in your computer and fs, but like a pilot and copilot

    i dont think that "shared cockpits" in fsx works to the level-d commands, like the buttons in the overhead, fmc and this stuffs

    i'd created two programs: 1. 767 commands and 2. aircraft position sincronization, the command are all done as i'd said, still the problem of the altitude

    but, the level-d's fsx user can use the number 1 (commands) to the panel, oveheads and this stuffs, also the "shared cockpit" to sincronization of the aircraft

    but i have FS2004, and lots of peoples too, and except FSNet, that do the same work of the shared cockpit, i dont know if has another 3rd party freeware programs to sincronization position, if has will be very good.

    Not sure what weather, time and QNH have to do with an aircraft's altitude. Care to explain a little more?

    in some tests i'd did, the latitude or longitude still changing every second, in some airports this doesnt change, so, i think that the "fs world" slides, also the position of the aircraft (just a guess), and i'd tried test with the copilot at the same time clock, and no weather (because winds, QNH and others changes), the altitude problems remain

    And how are you imposing this onto the receiving copy of FS? Is that running in slew mode, pause mode or simulation rate x 0 mode?

    both aircraft are in the same mode, normal rate

    the pilot get yours geografic's position, if it has any change (every time), send to the copilot the data with the position.

    this is the struct i'm using at the moment:

    typedef struct LVLDPOS {
        int altitude;
        int bank;
        int hdg;
        long long latitude;
        long long longitude;
        int pitch;
        short int trim;
    } LVLDPOS;

    the pilot's altitude refresh is in 1ms "Sleep(1) (i dont saw any changes in the fps), also the copilot are every time listening any data to receive

    so, the FSUIPC Write all this values in yours FS, and do the Process

    Sounds like you have an error somewhere

    i did some local tests, same FS, Read and Write the altitude and others structs data, so, i'm getting the correct value from the fsuipc

    Have you checked what you are writing by using the facilities available -- e.g. FSUIPC Logging?

    no, i dont, i'll find were is it right now

    so, this is all at the moment

    i'll keep trying fix it

  11. hi

    i'm doing a copilot programm to the Level-D 767 under tcp/ip and level-d's SDK

    all the control of the level-d are done and working (except fmc)

    now, i'd started the sincronization of the aircrafts position using FSUIPC

    but i got some problemms about altitude

    possible cause: weather and local hour

    so, me and the copilot set the same weather in the fs: no-weather and same clock, same QNH

    some times after the takeoff, or near the crz level, the altitude has a difference between the aircrafts around 200~1000 feets

    this is what the position sincronization do:

    the pilot sends every 1ms yours aircraft's position to the copilot's aircraft

    this position include: hdg, bank, pitch, altitude, longitude, latitude and trim

    all works except this little error to set the same altitude

    any ideia whats going on?

    tks

    FS9, FSUIPC 3.75, Level-d 767 SP3

    this programs are in C language

×
×
  • 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.