[PROGRAM] OpenYS - Open Source YSFlight Server!

Note that alterations to the YSFlight .EXE is forbidden
User avatar
Flake
Staff
Staff
Posts: 4223
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 795 times
Been thanked: 1116 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Tue Nov 24, 2015 11:24 am

Not true, I fly my F/A-18A all the time with 666 flares.

Copy and paste the .Dat of the relevent aircraft and I will investigate further (put it in a [ code ] holder!) - IIRC correctly there are multiple ways to do the loading in the .Dat file and I think I only covered MAXNMFLR method.

---

Image

As of the next version ALL log files will be in HTML, with clear color coding so it looks almost exactly like the console does.

User avatar
Dragon_Mech
Veteran
Veteran
Posts: 570
Joined: Wed Jul 15, 2015 12:18 pm
Favorite Aircraft: F-14, F-15D&E, SR-71, King Air 200, B737
Location: Mansfield, Mo. USA
OS: Windows 7 Ultimate
Has thanked: 93 times
Been thanked: 126 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Dragon_Mech » Wed Nov 25, 2015 1:09 am

Code: Select all

REM F-15 EAGLE
IDENTIFY "F-15E_Hylian_Defence_Force"
CATEGORY FIGHTER
AFTBURNR TRUE                 #HAVE AFTERBURNER?
THRAFTBN 40.0t                #THRUST WITH AFTERBURNER
THRMILIT 25.0t                #THRUST AT MILITARY POWER
WEIGHCLN 14.1t                #WEIGHT CLEAN
WEIGFUEL 12.1t                #WEIGHT OF FUEL
WEIGLOAD 10.1t                #WEIGHT OF PAYLOAD
FUELABRN 12.0kg                #FUEL CONSUMPTION WHEN USING AFTERBURNER
FUELMILI 0.86kg               #FUEL CONSUMPTION AT MILITARY POWER

COCKPITP  0.00m  1.46m  5.17m  #COCKPIT POSITION
LEFTGEAR -1.65m -1.97m -2.25m  #LEFT LANDING GEAR POSITION
RIGHGEAR  1.65m -1.97m -2.25m  #RIGHT LANDING GEAR POSITION
WHELGEAR  0.00m -1.87m  3.80m  #WHEEL POSITION
MACHNGUN  1.72m  0.70m  2.40m  #MACHINE GUN POSITION
ARRESTER  0.00m -1.63m -8.80m  #ARRESTING HOOK
SMOKEGEN -0.30m -0.63m -8.80m  #SMOKE GENERATOR POSITION
VAPORPO0  6.50m  0.49m -4.37m  #VAPOR POSITION (Wings Swept Back or no-VGW)
VAPORPO1  6.50m  0.49m -4.37m  #VAPOR POSITION (Wings Spread)
HTRADIUS  11.00m                #OUTSIDE SPHERE RADIUS
GUNINTVL 0.01
GUNPOWER 3

EXCAMERA "SPY" 0.0m -1.25m 3.20m 0deg -90deg 0deg OUTSIDE

TRIGGER1 GUN
TRIGGER2 AAM
TRIGGER3 AGM
TRIGGER4 SMK

STRENGTH 15

CRITAOAP  23.65deg               #CRITICAL AOA POSITIVE
CRITAOAM -15deg               #CRITICAL AOA NEGATIVE

CRITSPED 0.9MACH              #CRITICAL SPEED
MAXSPEED 2.5MACH              #MAXIMUM SPEED

HASSPOIL TRUE                 #HAS SPOILER?
RETRGEAR TRUE                 #HAS RETRACTABLE LANDING GEAR?
VARGEOMW FALSE                #HAS VARIABLE GEOMETRY WING?

CLVARGEO 0.0                  #EFFECT OF VARIABLE GEOMETRY WING FOR Cl
CDVARGEO 0.0                  #EFFECT OF VARIABLE GEOMETRY WING FOR Cd
CLBYFLAP 0.1                  #EFFECT OF FLAP FOR Cl
CDBYFLAP 0.2                  #EFFECT OF FLAP FOR Cd
CDBYGEAR 0.5                  #EFFECT OF GEAR FOR Cd
CDSPOILR 4.0                  #EFFECT OF SPOILER FOR Cd
VGWSPED1 100kt
VGWSPED2 500kt

WINGAREA 56.5m^2                #WING AREA

MXIPTAOA 26.29deg              #MAX INPUT AOA
MXIPTSSA 7.0deg               #MAX INPUT SSA
MXIPTROL 360.0deg             #MAX INPUT ROLL

REM CPITMANE corresponds to Spring Constant K
REM CPITSTAB corresponds to Damper Constant B
REM To be critically damped, B=2*sqrt(K)
REM 2% Settling Time=??

MANESPD1 60kt                 #MINIMUM MANEUVABLE SPEED
MANESPD2 100kt                #FULLY MANEUVABLE SPEED
CPITMANE 9.0                  #PITCH MANEUVERBILITY CONSTANT
CPITSTAB 4.0                  #PITCH STABILITY CONSTANT
CYAWMANE 9.0                  #YAW MANEUVABILITY CONSTANT
CYAWSTAB 5.52                  #YAW STABILITY CONSTANT
CROLLMAN 3.3                  #ROLL MANEUVABILITY CONSTANT

CTLLDGEA TRUE                 #CONTROL LANDINGGEAR
CTLBRAKE FALSE                #CONTROL BRAKE
CTLSPOIL 0.0                  #CONTROL SPOILER
CTLABRNR FALSE                #CONTROL AFTERBURNER
CTLTHROT 0.0                  #CONTROL THRUST
CTLIFLAP 0.0                  #CONTROL FLAP
CTLINVGW 0.0                  #CONTROL VARIABLE GEOMETRY WING
CTLATVGW FALSE                #CONTROL AUTO VARIABLE GEOMETRY WING

POSITION 0m 3ft 0m           #POSITION
ATTITUDE 45deg 0deg 0deg      #ATTITUDE
INITFUEL 85%                  #INITIAL FUEL
INITLOAD 0.0t                 #INITIAL PAYLOAD
INITSPED 0.0MACH              #INITIAL SPEED


HRDPOINT 0m -0.50m -1m FUEL

HRDPOINT 2.855M 4.1M -7.50M AIM120
HRDPOINT -2.855M 4.1M -7.50M AIM120
HRDPOINT 0.55M 4.1M -7.50M AIM120
HRDPOINT -0.55M 4.1M -7.50M AIM120

HRDPOINT 1.8m -0.85m 0.7m B500HD AGM65 B500 B250
HRDPOINT -1.8m -0.85m 0.7m B500HD AGM65 B500 B250
HRDPOINT 1.8m -0.85m -1.7m B500 AGM65 B500HD B250
HRDPOINT -1.8m -0.85m -1.7m B500 AGM65 B500HD B250
HRDPOINT 1.8m -0.85m -4m B500HD AGM65 B500 B250
HRDPOINT -1.8m -0.85m -4m B500HD AGM65 B500 B250


HRDPOINT 2.25m -0.5m 0.7m B500HD AGM65 B500 B250
HRDPOINT -2.25m -0.5m 0.7m B500HD AGM65 B500 B250
HRDPOINT 2.25m -0.5m -1.7m B500 AGM65 B500HD B250
HRDPOINT -2.25m -0.5m -1.7m B500 AGM65 B500HD B250
HRDPOINT 2.25m -0.5m -4m B500HD AGM65 B500 B250
HRDPOINT -2.25m -0.5m -4m B500HD AGM65 B500 B250

HRDPOINT -2.90m -0.26m -1.5m FUEL B500HD B500 
HRDPOINT 2.90m -0.26m -1.5m FUEL B500HD B500 

HRDPOINT 3.36m 0.13m -0.50m AIM9X 
HRDPOINT -3.36m 0.13m -0.50m AIM9X 
HRDPOINT 2.44m 0.13m -0.50m AIM9X 
HRDPOINT -2.44m 0.13m -0.50m AIM9X 

HRDPOINT  2.46M 3.36M -6.00M RKT 
HRDPOINT  -2.46M 3.36M -6.00M RKT 
HRDPOINT  0.90M 3.36M -6.00M RKT 
HRDPOINT  -0.90M 3.36M -6.00M RKT 


LMTBYHDP TRUE                 #Limit Max Num Weapon by Hardpoint

FLAREPOS 1.0m -0.50m -3.5m 0m 0m -70m
FLAREPOS -1.0m -0.50m -3.5m 0m 0m -70m
FLAREPOS 1.0m -0.50m -3.5m 3m 0m -70m
FLAREPOS -1.0m -0.50m -3.5m -3m 0m -70m
FLAREPOS 1.0m -0.50m -3.5m 6m 0m -70m
FLAREPOS -1.0m -0.50m -3.5m -6m 0m -70m

INITIGUN 3000                 #INITIAL GUN
LOADWEPN AIM9X 4
LOADWEPN AIM120 4
LOADWEPN FLR 100
LOADWEPN FUEL 800
LOADWEPN B500HD 4
INITBOMB 4
LOADWEPN RKT 76
MAXNMFLR 100;

REM ClZero,CdZero is fixed by Cruising condition
REFVCRUS 0.99MACH              #CRUISING SPEED
REFACRUS 20000ft              #CRUISING ALTITUDE
REFTCRUS 0.8                  #CRUISING THROTTLE SETTING

REM ClSlope,CdConst is fixed by Landing condition
REFVLAND 135kt                #LANDING SPEED
REFAOALD 12deg                #LANDING AOA
REFLNRWY 900m                #RUNWAY REQUIRED TO STOP
REFTHRLD 0.3                  #LANDING THROTTLE SETTING


WPNSHAPE AIM120 STATIC user/dragon_mech/f15e_HDF/AIM120DMs.srf
WPNSHAPE AIM120 FLYING user/dragon_mech/f15e_HDF/AIM120DM.srf
WPNSHAPE RKT STATIC user/dragon_mech/f15e_HDF/rocketDMFGs.srf
WPNSHAPE RKT FLYING user/dragon_mech/f15e_HDF/rocketDMFG.srf
WPNSHAPE FUEL STATIC user/dragon_mech/f15e_HDF/hdf_tank.srf
WPNSHAPE FUEL FLYING user/dragon_mech/f15e_HDF/hdf_tank.srf
WPNSHAPE AIM9X STATIC user/dragon_mech/f15e_HDF/AIM9XDMs.srf
WPNSHAPE AIM9X FLYING user/dragon_mech/f15e_HDF/AIM9XDM.srf


AUTOCALC
and.....

Code: Select all

REM Takaty-'s Bombardier DHC8-400 Repaint and modification.
REM Modified by Dragon_Mech

IDENTIFY "DHC-8-400_KILLER_INSTINCT"
CATEGORY NORMAL
AFTBURNR FALSE                #HAVE AFTERBURNER?
PROPELLR 10142HP               #PROPELLER ENGINE
WEIGHCLN 17.185t              #WEIGHT CLEAN
WEIGFUEL 3.402t                #WEIGHT OF FUEL
WEIGLOAD 2.30t                #WEIGHT OF PAYLOAD
FUELABRN 0.20kg               #FUEL CONSUMPTION WHEN USING AFTERBURNER
FUELMILI 0.20kg               #FUEL CONSUMPTION AT MILITARY POWER
THRSTREV 0.2                  #REVERS THRUST POWER

COCKPITP -0.62m 0.65m 12.40m   #COCKPIT POSITION
EXCAMERA "CO-PILOT" 0.62m  0.65m 12.40m  0deg 0deg 0deg INSIDE
EXCAMERA "TAILCAM" 0.0m 6.8m -14.00m 0deg 0deg 0deg OUTSIDE
EXCAMERA "BELLYCAM1" 0.0m -1.5m 1.0m 00deg -28deg 00deg INSIDE


LEFTGEAR -4.40m -2.24m 0.51m   #LEFT LANDING GEAR POSITION
RIGHGEAR  4.40m -2.24m 0.51m   #RIGHT LANDING GEAR POSITION
WHELGEAR  0.00m -2.01m 13.73m  #WHEEL POSITION
MACHNGUN  0.21m  -0.47m 15.00m   #MACHINE GUN POSITION
MACHNGN2  -0.21m  -0.47m 15.00m
SMOKEGEN  0.00m  0.00m -30.00m #SMOKE GENERATOR POSITION
VAPORPO0 -14.17m 1.85m 0.00m   #VAPOR POSITION (Wings Swept back)
VAPORPO1 -14.17m 1.85m 0.00m   #VAPOR POSITION (Wings Spread)
HTRADIUS  15.5m                #OUTSIDE SPHERE RADIUS
GUNPOWER 3

TRIGGER1 GUN
TRIGGER2 AGM
TRIGGER3 RKT
TRIGGER4 BMB

MAXNMFLR 120
FLAREPOS 0.00m 0.75m -14.01m -20.0m 0.0m 0.0m
FLAREPOS 0.00m 0.75m -14.01m 20.0m 0.0m 0.0m
FLAREPOS 0.00m 0.75m -14.01m 0.0m 0.0m 0.0m

STRENGTH 25

CRITAOAP  10deg               #CRITICAL AOA POSITIVE
CRITAOAM -5deg               #CRITICAL AOA NEGATIVE

CRITSPED 400kt              #CRITICAL SPEED
MAXSPEED 380kt             #MAXIMUM SPEED

HASSPOIL TRUE                 #HAS SPOILER?
RETRGEAR TRUE                 #HAS RETRACTABLE LANDING GEAR?
VARGEOMW FALSE                #HAS VARIABLE GEOMETRY WING?

CLVARGEO 0.0                  #EFFECT OF VARIABLE GEOMETRY WING FOR Cl
CDVARGEO 0.0                  #EFFECT OF VARIABLE GEOMETRY WING FOR Cd
CLBYFLAP 0.5                  #EFFECT OF FLAP FOR Cl
CDBYFLAP 0.4                  #EFFECT OF FLAP FOR Cd
CDBYGEAR 0.8                  #EFFECT OF GEAR FOR Cd
CDSPOILR 2.0                  #EFFECT OF SPOILER FOR Cd

WINGAREA 63.1m^2             #WING AREA

MXIPTAOA 22.5deg              #MAX INPUT AOA
MXIPTSSA 5.0deg               #MAX INPUT SSA
MXIPTROL 75deg                #MAX INPUT ROLL

REM CPITMANE corresponds to Spring Constant K
REM CPITSTAB corresponds to Damper Constant B
REM To be critically damped, B=2*sqrt(K)
REM 2% Settling Time=??

MANESPD1 60kt                 #MINIMUM MANEUVABLE SPEED
MANESPD2 150kt                 #FULLY MANEUVABLE SPEED
CPITMANE 4.0                  #PITCH MANEUVERBILITY CONSTANT
CPITSTAB 8.0                 #PITCH STABILITY CONSTANT
CYAWMANE 5.0                  #YAW MANEUVABILITY CONSTANT
CYAWSTAB 3.0                  #YAW STABILITY CONSTANT
CROLLMAN 2.0                  #ROLL MANEUVABILITY CONSTANT

CTLLDGEA TRUE                 #CONTROL LANDINGGEAR
CTLBRAKE FALSE                #CONTROL BRAKE
CTLSPOIL 0.0                  #CONTROL SPOILER
CTLABRNR FALSE                #CONTROL AFTERBURNER
CTLTHROT 0.0                  #CONTROL THRUST
CTLIFLAP 0.0                  #CONTROL FLAP
CTLINVGW 1.0                  #CONTROL VARIABLE GEOMETRY WING
CTLATVGW TRUE                 #CONTROL AUTO PITCH CONTROL WING
VGWSPED1 2kt                  #CRUISE PITCH SPEED
VGWSPED2 0kt                  #FETHER PITCH SPEED

POSITION 0m 3ft 0m            #POSITION
ATTITUDE 45deg 0deg 0deg      #ATTITUDE
INITFUEL 75%                  #INITIAL FUEL
INITLOAD 0.0t                 #INITIAL PAYLOAD
INITSPED 0.0MACH              #INITIAL SPEED

HRDPOINT 1.10M -1.05M 7.4m AGM65
HRDPOINT -1.10M -1.05M 7.4m AGM65
HRDPOINT 1.10M -1.05M 1.7m AGM65
HRDPOINT -1.10M -1.05M 1.7m AGM65
HRDPOINT 1.10M -1.05M -4.0m AGM65
HRDPOINT -1.10M -1.05M -4.0m AGM65

HRDPOINT 1.856M 0.881M 0.88M RKT
HRDPOINT -1.853M 0.881M 0.88M RKT
HRDPOINT 1.420M 0.881M 0.88M RKT
HRDPOINT -1.420M 0.881M 0.88M RKT

HRDPOINT 2.38M 0.762M 1.30M B500 B500HD
HRDPOINT -2.38M 0.762M 1.30M B500 B500HD
HRDPOINT 3.4M 0.762M 1.30M B500 B500HD
HRDPOINT -3.4M 0.762M 1.30M B500 B500HD
HRDPOINT 2.89M 0.21M 0.5M FUEL B500 B500HD
HRDPOINT -2.89M 0.21M 0.5M FUEL B500 B500HD

HRDPOINT 0.71M 1.285M 1.3M AIM120
HRDPOINT -0.71M 1.285M 1.3M AIM120

INITIGUN 1250                    #INITIAL GUN
INITIAAM 0                    #INITIAL AAM
INITIAGM 0                    #INITIAL AGM
INITBOMB 0
LOADWEPN AIM120 2

REM ClZero,CdZero is fixed by Cruising condition
REFVCRUS 360.151kt              #CRUISING SPEED
REFACRUS 27000ft              #CRUISING ALTITUDE
REFTCRUS 0.70                 #CRUISING THROTTLE SETTING

REM ClSlope,CdConst is fixed by Landing condition
REFVLAND 108kt                #LANDING SPEED
REFAOALD 5deg                 #LANDING AOA
REFLNRWY 1500m                #RUNWAY REQUIRED TO STOP
REFTHRLD 0.30                  #LANDING THROTTLE SETTING


WPNSHAPE RKT STATIC user/dragon_mech/q400KI/ROCKET_KIs.SRF
WPNSHAPE RKT FLYING user/dragon_mech/q400KI/ROCKET_KI.SRF
WPNSHAPE AGM65 STATIC user/dragon_mech/q400KI/AGM_KIs.srf
WPNSHAPE AGM65 FLYING user/dragon_mech/q400KI/AGM_KI.srf
WPNSHAPE B500 STATIC user/dragon_mech/q400KI/BMB_KI.srf
WPNSHAPE B500 FLYING user/dragon_mech/q400KI/BMB_KI.srf
WPNSHAPE B500HD STATIC user/dragon_mech/q400KI/BMB_HD_KIs.srf
WPNSHAPE B500HD FLYING user/dragon_mech/q400KI/BMB_HD_KI.srf
WPNSHAPE FUEL FLYING user/dragon_mech/q400KI/tank_KI.srf
WPNSHAPE FUEL STATIC user/dragon_mech/q400KI/tank_KI.srf
WPNSHAPE AIM120 STATIC user/dragon_mech/q400KI/X-MissileS.srf
WPNSHAPE AIM120 FLYING user/dragon_mech/q400KI/X-MissileL.srf

AUTOCALC
i only have the problem with the flares when flying in an OYS server. in the stock servers and offline, the flares work properly regardless of the amount. also, the Enterprise E that i worked on has the same issue and it has 600 flares.
Owner, Dragonic Machine Industries
Image

User avatar
Flake
Staff
Staff
Posts: 4223
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 795 times
Been thanked: 1116 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Wed Nov 25, 2015 3:17 am

The dats you supplied clearly show MAXNMFLR 100 in the first and MAXNMFLR 120 in the second.

Are you sure you are using the same .dat's as the server?

OYS, unlike the stock console, does not force variables, I'm not sure exactly how this works but from what I understand "ask and you will receive" and your client isn't asking for more - even if the OYS server says it can give you 600, if your client dat asks for 100 that is what you will get.

User avatar
Flake
Staff
Staff
Posts: 4223
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 795 times
Been thanked: 1116 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Fri Nov 27, 2015 2:52 am

Hey guys - pretty sure (90%) I found the issue with the false timeout dc's

Here's what's going on:

When I receive data on the socket it isn't perfect yet - I can see I made an error in regards to getting the packet size. I need to receive 4 bytes but there's no garuntee of getting all 4 at once, so I need to loop back until I get all 4 bytes. There's an error with my code though and if the data received was NOT 4 (anything less, which can happen and I have to loop back and do it again) the original data I received in the first pass was lost. This means that the packet size is then corrupted to some completely random number, and then the receiver tries to read millions of bytes from the socket. This would take a lot of time and during this time no "data" is received into the flow of the program itself - timing you out... So you sit in limbo until OYS kicks you from the main thread.

In laymans terms: Imagine the packet to receive is: "ABCDEFGH" and the size part of that is "ABCD", 4 bytes. Normally I try and get the size from the socket and it gives me "ABCD" which is right but sometimes I get "AB" and need to go back and get "CD". Problem is my code instead gets: "CDEF" as the size and that screws everything up.

TLDR: Size of packet calculations are corrupted in some circumstances, needs to be re-written.

Expect a fix tonight me thinks - not a major change as my method is correct just numbers are wrong.

---

In other news:

Experimented with ejection from aircraft - doesn't work very well as I have to wait for the user to return to the console screen before assigning them a new aircraft... it's not smooth and it just doesn't work well - might can the idea - sorry, I tried!

Fixed a bug where changing field renames the console as well... not sure how that line of code got in there to be honest. :lol:

Fixed a bug where aircraft spawning on the ground at certain airfields would immediately self destruct - GEAR needs to be DOWN by DEFAULT in YSF - in the STP definitions CTRLLDGR(?) can be true or false or NON EXISTANT, which i wasn't catching which is true. A boolean in C# defaults to FALSE so on a map like small_map, if you look at the STP lines there is no CTRLLDGR entry, and the bool was default false - gear must be up, which was wrong. fixed now.

Fixed a bug with packetlogging - was logging 4 instead of 5 packets - minor fix.

Added an emergency fix to the socket receiver - if the size is > 8192 or < 0, there is a corruption. I then receive ALL the data available on the socket as garbage so to flush it and try again. This DOES mean lost data but with YSF's redundancy methods it should be able to recover - at this point though it's much like CPR - the socket is so corrupted the connection may as well be dead, this it to try and get the data back on track. Success margin slim... I'll add a counter method for the corruptions as well and if 3 passes, kick the client due to fatal data corruption.

Another note: I added a "loading screen" a while back to OYS so those running a corrupt version of OYS (lost dll's etc) you should get some resembalance of an error message now. Vic Viper this should help you especially.

--- whew. Lots of tech talk! Anyways, hopefully I can have a reliable solution for you all tonight.

After the update tonight I think we'll be in good standing in regards to stability again!

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3700
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1502 times
Been thanked: 1624 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Fri Nov 27, 2015 3:10 am

You can speak techno babble with the greats of science fiction!

User avatar
Flake
Staff
Staff
Posts: 4223
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 795 times
Been thanked: 1116 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Fri Nov 27, 2015 3:30 am


User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3700
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1502 times
Been thanked: 1624 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Fri Nov 27, 2015 3:32 am

Yep.

User avatar
Flake
Staff
Staff
Posts: 4223
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 795 times
Been thanked: 1116 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Fri Nov 27, 2015 5:40 am

Okay looked at the code and then sat down with pen and paper to work it out.

The error exists in both the first part - receiving the size header of the packet, and then the second part also - receiving the data.

All it would take is one split packet to completely destroy all data, and crash the connection. split packets are a lot more frequent with remote connections as opposed to local connections, which is why i never was able to catch it.

Also explains why connection was stable right up until joining flight, and then after you've been flying for a bit you'd crash - large packets like flight data are likely to break up as part of the TCP/IP protocal.

The fix was a simple one - as soon as I get home tonight I will implement, and then recompile and update - ETA 5 hours from now.

IF this does work, then it should be the FINAL update to socket structure - I've learned TCPClient is just a wrapper for Sockets anyway, and sockets are faster, so I'm sticking with what I've got!

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3700
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1502 times
Been thanked: 1624 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Fri Nov 27, 2015 5:59 am

Now if I can just figure out for sure what the problem is with my PC. I ran a diagnostic from the boot window and everything passed the tests (CPU, memory, etc.) I'm pretty sure it is the cheap graphics card I got last year that is causing it to freeze up. As for having to do a system restore after restarting the computer to get OYS to work, I think that is not really needed. OYS just takes a while to load for some reason. Maybe. I hope. I did just now, anyway. The next step is to remove the new graphics card and return to the onboard graphics. They're not great, but at least they work. What ever it takes to keep OYS working on my computer!

User avatar
u2fly
Veteran
Veteran
Posts: 1168
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 648 times
Been thanked: 263 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by u2fly » Fri Nov 27, 2015 8:20 am

PLEASE, build latest OYS for Linux!

P.S.: I use PuppyLinux Tahr, that based on Ubuntu Trusty (for boot from USB stick), that is light and faster than my main OS Mint, and YSFlight give me near 60fps (on Mint have only max 30fps).
/!\ READ YSFLIGHT HANDBOOK (.PDF) | updated 2017/05/03

U.S. Senator John McCain wrote:
“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost - we stand w/ them in their fight against #Putin's aggression”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3700
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1502 times
Been thanked: 1624 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Fri Nov 27, 2015 9:13 am

I thought more about my problems and and it seems that all of my troubles involve network usage. It freezes while loading relatively simple Web pages but not running games with heavy graphics. Then OYS will not work, which I think may be hanging up while trying to open up to the internet.

I have no idea what I'm talking about.

User avatar
Flake
Staff
Staff
Posts: 4223
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 795 times
Been thanked: 1116 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Fri Nov 27, 2015 11:23 am

Now Updated to Version 20151127(2213)

Changes:
+Fix to raw socket data receiver - hopefully no more disconnection errors!
+Failsafe for raw socket data receiver - may not work but damn it we will try!
+A few other non-critical bug fixes.
-Removed Nukes

Notes:
This build should solve the random DC issues (in theory, yet to be tested in practice! Hoping one of you can verify!)
... Actually I did test myself before release but since I never got the DC issues anyway, not much I can do about it...

Download: https://www.mediafire.com/?51x2sewak2vsl4h



User avatar
Dragon_Mech
Veteran
Veteran
Posts: 570
Joined: Wed Jul 15, 2015 12:18 pm
Favorite Aircraft: F-14, F-15D&E, SR-71, King Air 200, B737
Location: Mansfield, Mo. USA
OS: Windows 7 Ultimate
Has thanked: 93 times
Been thanked: 126 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Dragon_Mech » Fri Nov 27, 2015 6:03 pm

OfficerFlake wrote:Are you sure you are using the same .dat's as the server?
yes. i use the same .dat files that i publish online.
Owner, Dragonic Machine Industries
Image

User avatar
David
Modding Team
Modding Team
Posts: 427
Joined: Mon May 30, 2011 12:03 pm
Favorite Aircraft: Grob G109B Vigilant
Location: United Kingdom
Has thanked: 184 times
Been thanked: 130 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by David » Fri Nov 27, 2015 7:26 pm

Brilliant Flake, I'll let you know how the disconnect issue is when i next fly on Patrick YSCAS server!

User avatar
Barr
Veteran
Veteran
Posts: 1002
Joined: Wed Mar 28, 2012 8:49 pm
Favorite Aircraft: The Boeing 757
Location: Providence, Rhode Island
OS: Windows 10/Gentoo
Has thanked: 268 times
Been thanked: 199 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Barr » Fri Nov 27, 2015 8:15 pm

Didnt kick me out. But ill have to try it two instances of ys running
Image
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.

User avatar
u2fly
Veteran
Veteran
Posts: 1168
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 648 times
Been thanked: 263 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by u2fly » Sat Nov 28, 2015 3:56 pm

@OfficerFlake,
What you think about idea for implementing OLAN sequence coding for controll aircrafts?
IDEA TARGET: "create converter for OLAN string --> YFS flight record"

I already create topic about OpenAero aerobatic sequence designer, that have cool user interface and can generate and use OLAN strings.

Hope, that OLAN string controling can and will be implemented in YSFlight directly, as I think, using internal network messaging interface (that now on key F12).
/!\ READ YSFLIGHT HANDBOOK (.PDF) | updated 2017/05/03

U.S. Senator John McCain wrote:
“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost - we stand w/ them in their fight against #Putin's aggression”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
Flake
Staff
Staff
Posts: 4223
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 795 times
Been thanked: 1116 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Sat Nov 28, 2015 8:52 pm

Nah, not interested. OYS doesn't implement aircraft AI and it would be almost as much work as the entire OYS project just to try. :lol:

User avatar
C P
Rookie
Rookie
Posts: 99
Joined: Fri May 24, 2013 12:17 pm
Favorite Aircraft: F-18E SuperHornet
Location: Syracuse, NY
OS: WIN10 8CORE/4GHZ/16G
Has thanked: 17 times
Been thanked: 18 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by C P » Sun Nov 29, 2015 10:51 am

OfficerFlake wrote:Nah, not interested. OYS doesn't implement aircraft AI and it would be almost as much work as the entire OYS project just to try.
Re: U2fly
Thanks for asking. I was wondering myself.
Re: Flake
No disrespect to you and your much appreciated and enjoyed work, but:
Sometimes I like to run Endurance Mode (AI planes) on my server or land on carriers that don't shake or don't appear in OYS. Then I just have to byte the bullet and use old, inferior YS.
BTW latest ver working fine here (as I never had any DC issues).
Best Regards,
C P

User avatar
Flake
Staff
Staff
Posts: 4223
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 795 times
Been thanked: 1116 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Sun Nov 29, 2015 12:27 pm

Sweet!

Yeah completely understand the desire for stock - it's not a viable replacement yet! ;)

User avatar
Flake
Staff
Staff
Posts: 4223
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 795 times
Been thanked: 1116 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Mon Nov 30, 2015 3:28 am

Next version will have IRC Support - you can have OYS Server join your favourite IRC Channel and you can talk with the players on your server from there without having to use YSChat or a YSFlight Client.

Image

---

Owner Name, Owner Email, and Server Name fields are now all supported and used in Bug/Crash Reports.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest