Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Folks, below is code that will successfully trigger a sound file when turbulence is detected, Conversely, once the turbulence no longer exists, the sound file stops. I have tested and retested the script and all is well.

Credits to Pete Dowson and "cellular55" of which some code was ported.

___________________________________________________________________

Instructions for use:

1. Copy the below code (only in blue) and paste into Windows Notepad.

2. Save the file with the name: ipcready.lua

3. Place this file into your FS9/modules folder

4. Choose a sound (wav) file that best represents the sound of turbulence to you. i.e. rattle, bumps, etc.

5. Name this sound file turb.wav and place it into your FS9/sound folder.

Note: I have attached the turb.wav file that I am using and it is specifically edited to use with tactile transducers. It may or may not suit you as well.

Thats it.

Regards,

Michael Lehkamp

__________________________________________________________________________

-- Turbulence looping sound --

-- Initializing flags --

sndflg=0 -- turbulence sound flag

ref=0

-- Function to play sound if and until turbulence is detected --

function turbulence(offset,value)

ground=ipc.readUW(0x0366)

if (value > 0) and (sndflg == 0) and (ground == 0) then

ref=sound.playloop("turb.wav")

sndflg=1

end

if (value == 0) and (sndflg == 1) then

sound.stop(ref)

sndflg=0

end

end

-- FSUIPC LUA events

event.offset(0x0E88,"UW","turbulence")

event.offset(0x0E98,"UW","turbulence")

turb.wav

  • 9 months later...
Posted

Has anyone tried this? So far I am unable to get this to work. I assume FSUIPC is required and I have a registered version, also have updated fs9 to v 9.1.

Posted

Has anyone tried this? So far I am unable to get this to work. I assume FSUIPC is required and I have a registered version, also have updated fs9 to v 9.1.

 

Sounds like your FSUIPC is out of date. Install the current version.

 

Pete

  • 5 months later...
Posted

Hello

I also tried this with no success. :???:  A followed all steps in the list to the letter.....

I have the latest version  of FSUIPC installed.(I think...it's from september 2013)

I fly FS9.

 

Any suggestions!??

 

Regards / Per Alm

 

www.learsim.com

Posted

You need the version number of FSUIPC, not a date! It is easy enough to find -- it is shown in the options, on screen, it is shown in the Log file, and it is found in the DLL properties.

Does the Log file show any errors?

Pete

Posted

A short flight starting att ESSA. Turning west through thick cloudlayer with heavy turbulence. In FSUIPC-log I checked weather, Log Lua plugns...,Debug trace Lua plugins and extras.

I'm a total newbie to this so bare with me :-)

 

Regards

 

Per Alm

http://www.learsim.com

 

 

 

********* FSUIPC, Version 3.999z8 by Pete Dowson *********
Running inside FS2004 (FS9.1 CONTROLS.DLL, FS9.1 WEATHER.DLL)
User Name="David Alm"
User Addr="pdalm@spray.se"
FSUIPC Key is provided
WideFS Key is provided
[Continuation log requested by user]
Module base=61000000
WeatherReadInterval=4
LogOptions=00000013
LogExtras=1
   935943 System time = 06/07/2014 22:26:20, FS2004 time = 22:11:39 (20:11Z)
   935943 *VIS* SM: Min=0.00, MaxRny=8.00, MaxOvc=14.00, MaxCld=18.00, MaxClr=27.00, Upper=40.00, FT: LwrAlt=15000, UppAlt=38000
   935943 LogOptions changed, now 00000013 (LogExtras=1)
   935974 Ready Flags: Ready-To-Fly=Y, In Menu=N, In Dlg=N
   936006 AP READOUTS: Flags1=00060425, Flags2=00000000
   936349 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
   936364 >Change:  Visibility[0]: range=20.0sm (32187m), from=0ft, to=8520ft
   936364 >Change:  Cloud[0]: type=9, from 3000ft to 9000ft (+/- 100ft), cover=5, turb=3, topshape=0
   936364 >Change:                      Precip=1, base=-1470ft, rate=0, icing=0
   936364 >Change:  Cloud[1]: type=1, from 39370ft to 40190ft (+/- 100ft), cover=6, turb=1, topshape=0
   936364 >Change:                      Precip=0, base=-1470ft, rate=0, icing=0
   936364 >Change:  Cloud[2]: type=1, from 47990ft to 48025ft (+/- 100ft), cover=2, turb=0, topshape=0
   936364 >Change:                      Precip=0, base=0ft, rate=0, icing=1
   941357 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
   946411 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
   951434 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
   956473 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
   961496 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
   966519 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
   971543 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
   976566 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
   981542 AP READOUTS: Flags1=00068425, Flags2=00000000
   981605 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
   986378 AP READOUTS: Flags1=00068427, Flags2=00000000
   986659 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
   987268  Results: FS98 CurrTemp at PlaneAlt=518: 14C
   991682 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
   996721 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1001822 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1002758  Results: FS98 CurrTemp at PlaneAlt=1535: 12C
  1006846 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1011869 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1016908 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1018405  Results: FS98 CurrTemp at PlaneAlt=2552: 10C
  1021931 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1026954 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1030137  Results: FS98 AmbientWind at PlaneAlt=3304: dir 1M, vel 0
  1030355  Results: FS98 AmbientWind at PlaneAlt=3317: dir 2T, vel 0
  1030807  Results: FS98 AmbientWind at PlaneAlt=3350: dir 1T, vel 0
  1030995  Results: FS98 AmbientWind at PlaneAlt=3363: dir 0T, vel 0
  1031213  Results: FS98 AmbientWind at PlaneAlt=3376: dir 359T, vel 0
  1031353  Results: FS98 AmbientWind at PlaneAlt=3386: dir 358T, vel 0
  1031525  Results: FS98 AmbientWind at PlaneAlt=3399: dir 358T, vel 1
  1031634  Results: FS98 AmbientWind at PlaneAlt=3409: dir 357T, vel 1
  1031962  Results: FS98 AmbientWind at PlaneAlt=3432: dir 356T, vel 1
  1031962 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1032399  Results: FS98 AmbientWind at PlaneAlt=3465: dir 355T, vel 1
  1032867  Results: FS98 AmbientWind at PlaneAlt=3501: dir 354T, vel 1
  1033413  Results: FS98 AmbientWind at PlaneAlt=3540: dir 353T, vel 1
  1033771  Results: FS98 AmbientWind at PlaneAlt=3566: dir 353T, vel 2
  1033771  Results: FS98 CurrTemp at PlaneAlt=3566: 8C
  1033881  Results: FS98 AmbientWind at PlaneAlt=3576: dir 352T, vel 2
  1034349  Results: FS98 AmbientWind at PlaneAlt=3609: dir 351T, vel 2
  1034801  Results: FS98 AmbientWind at PlaneAlt=3645: dir 350T, vel 2
  1035425  Results: FS98 AmbientWind at PlaneAlt=3691: dir 349T, vel 2
  1035784  Results: FS98 AmbientWind at PlaneAlt=3714: dir 348T, vel 2
  1035956  Results: FS98 AmbientWind at PlaneAlt=3727: dir 348T, vel 3
  1036314  Results: FS98 AmbientWind at PlaneAlt=3753: dir 347T, vel 3
  1036892  Results: FS98 AmbientWind at PlaneAlt=3796: dir 346T, vel 3
  1036970 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1037360  Results: FS98 AmbientWind at PlaneAlt=3825: dir 345T, vel 3
  1037968  Results: FS98 AmbientWind at PlaneAlt=3868: dir 344T, vel 3
  1038233  Results: FS98 AmbientWind at PlaneAlt=3885: dir 344T, vel 4
  1038436  Results: FS98 AmbientWind at PlaneAlt=3898: dir 343T, vel 4
  1039091  Results: FS98 AmbientWind at PlaneAlt=3937: dir 342T, vel 4
  1039653  Results: FS98 AmbientWind at PlaneAlt=3970: dir 341T, vel 4
  1040370  Results: FS98 AmbientWind at PlaneAlt=4012: dir 340T, vel 4
  1040838  Results: FS98 AmbientWind at PlaneAlt=4039: dir 339T, vel 4
  1040979  Results: FS98 AmbientWind at PlaneAlt=4049: dir 339T, vel 5
  1041603  Results: FS98 AmbientWind at PlaneAlt=4088: dir 338T, vel 5
  1042024 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1042024  Results: FS98 AmbientWind at PlaneAlt=4111: dir 337T, vel 5
  1042632  Results: FS98 AmbientWind at PlaneAlt=4147: dir 336T, vel 5
  1043210  Results: FS98 AmbientWind at PlaneAlt=4183: dir 335T, vel 5
  1043615  Results: FS98 AmbientWind at PlaneAlt=4209: dir 335T, vel 6
  1043818  Results: FS98 AmbientWind at PlaneAlt=4222: dir 334T, vel 6
  1044395  Results: FS98 AmbientWind at PlaneAlt=4255: dir 333T, vel 6
  1045082  Results: FS98 AmbientWind at PlaneAlt=4295: dir 332T, vel 6
  1045690  Results: FS98 AmbientWind at PlaneAlt=4334: dir 331T, vel 6
  1046158  Results: FS98 AmbientWind at PlaneAlt=4367: dir 330T, vel 6
  1046267  Results: FS98 AmbientWind at PlaneAlt=4373: dir 330T, vel 7
  1046735  Results: FS98 AmbientWind at PlaneAlt=4406: dir 329T, vel 7
  1047063 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1047375  Results: FS98 AmbientWind at PlaneAlt=4449: dir 328T, vel 7
  1047812  Results: FS98 AmbientWind at PlaneAlt=4475: dir 327T, vel 7
  1048389  Results: FS98 AmbientWind at PlaneAlt=4511: dir 326T, vel 7
  1048857  Results: FS98 AmbientWind at PlaneAlt=4541: dir 326T, vel 8
  1048997  Results: FS98 AmbientWind at PlaneAlt=4551: dir 325T, vel 8
  1049138  Results: FS98 CurrTemp at PlaneAlt=4560: 6C
  1049543  Results: FS98 AmbientWind at PlaneAlt=4587: dir 324T, vel 8
  1050011  Results: FS98 AmbientWind at PlaneAlt=4619: dir 323T, vel 8
  1050620  Results: FS98 AmbientWind at PlaneAlt=4665: dir 322T, vel 8
  1051041  Results: FS98 AmbientWind at PlaneAlt=4695: dir 321T, vel 8
  1051166  Results: FS98 AmbientWind at PlaneAlt=4705: dir 321T, vel 9
  1051618  Results: FS98 AmbientWind at PlaneAlt=4734: dir 320T, vel 9
  1052024  Results: FS98 AmbientWind at PlaneAlt=4767: dir 319T, vel 9
  1052055 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1052492  Results: FS98 AmbientWind at PlaneAlt=4800: dir 318T, vel 9
  1053069  Results: FS98 AmbientWind at PlaneAlt=4839: dir 317T, vel 9
  1053537  Results: FS98 AmbientWind at PlaneAlt=4869: dir 316T, vel 10
  1054098  Results: FS98 AmbientWind at PlaneAlt=4908: dir 315T, vel 10
  1054676  Results: FS98 AmbientWind at PlaneAlt=4948: dir 314T, vel 10
  1055175  Results: FS98 AmbientWind at PlaneAlt=4980: dir 313T, vel 10
  1055690  Results: FS98 AmbientWind at PlaneAlt=5013: dir 312T, vel 10
  1055908  Results: FS98 AmbientWind at PlaneAlt=5026: dir 312T, vel 11
  1056329  Results: FS98 AmbientWind at PlaneAlt=5056: dir 311T, vel 11
  1056797  Results: FS98 AmbientWind at PlaneAlt=5085: dir 310T, vel 11
  1057094 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1057374  Results: FS98 AmbientWind at PlaneAlt=5121: dir 309T, vel 11
  1057952  Results: FS98 AmbientWind at PlaneAlt=5161: dir 308T, vel 11
  1058420  Results: FS98 AmbientWind at PlaneAlt=5194: dir 307T, vel 12
  1059028  Results: FS98 AmbientWind at PlaneAlt=5233: dir 306T, vel 12
  1059543  Results: FS98 AmbientWind at PlaneAlt=5266: dir 305T, vel 12
  1060292  Results: FS98 AmbientWind at PlaneAlt=5312: dir 304T, vel 12
  1060760  Results: FS98 AmbientWind at PlaneAlt=5338: dir 303T, vel 12
  1061009  Results: FS98 AmbientWind at PlaneAlt=5354: dir 303T, vel 13
  1061368  Results: FS98 AmbientWind at PlaneAlt=5374: dir 302T, vel 13
  1061945  Results: FS98 AmbientWind at PlaneAlt=5410: dir 301T, vel 13
  1062086 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1062632  Results: FS98 AmbientWind at PlaneAlt=5449: dir 300T, vel 13
  1063240  Results: FS98 AmbientWind at PlaneAlt=5482: dir 299T, vel 13
  1063802  Results: FS98 AmbientWind at PlaneAlt=5515: dir 298T, vel 14
  1064457  Results: FS98 AmbientWind at PlaneAlt=5554: dir 297T, vel 14
  1064925  Results: FS98 CurrTemp at PlaneAlt=5587: 4C
  1064972  Results: FS98 AmbientWind at PlaneAlt=5591: dir 296T, vel 14
  1065643  Results: FS98 AmbientWind at PlaneAlt=5630: dir 295T, vel 14
  1066142  Results: FS98 AmbientWind at PlaneAlt=5663: dir 294T, vel 14
  1066360  Results: FS98 AmbientWind at PlaneAlt=5676: dir 294T, vel 15
  1066688  Results: FS98 AmbientWind at PlaneAlt=5702: dir 293T, vel 15
  1067109 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1067296  Results: FS98 AmbientWind at PlaneAlt=5738: dir 292T, vel 15
  1067764  Results: FS98 AmbientWind at PlaneAlt=5774: dir 291T, vel 15
  1068419  Results: FS98 AmbientWind at PlaneAlt=5820: dir 290T, vel 15
  1068950  Results: FS98 AmbientWind at PlaneAlt=5853: dir 289T, vel 16
  1069418  Results: FS98 AmbientWind at PlaneAlt=5886: dir 288T, vel 16
  1069917  Results: FS98 AmbientWind at PlaneAlt=5922: dir 287T, vel 16
  1070385  Results: FS98 AmbientWind at PlaneAlt=5951: dir 286T, vel 16
  1070884  Results: FS98 AmbientWind at PlaneAlt=5988: dir 285T, vel 16
  1071134  Results: FS98 AmbientWind at PlaneAlt=6004: dir 285T, vel 17
  1071524  Results: FS98 AmbientWind at PlaneAlt=6030: dir 284T, vel 17
  1071992  Results: FS98 AmbientWind at PlaneAlt=6063: dir 283T, vel 17
  1072132 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1072647  Results: FS98 AmbientWind at PlaneAlt=6102: dir 282T, vel 17
  1073177  Results: FS98 AmbientWind at PlaneAlt=6135: dir 281T, vel 17
  1073864  Results: FS98 AmbientWind at PlaneAlt=6175: dir 280T, vel 18
  1074332  Results: FS98 AmbientWind at PlaneAlt=6207: dir 279T, vel 18
  1074909  Results: FS98 AmbientWind at PlaneAlt=6243: dir 278T, vel 18
  1075517  Results: FS98 AmbientWind at PlaneAlt=6280: dir 277T, vel 18
  1076126  Results: FS98 AmbientWind at PlaneAlt=6312: dir 276T, vel 18
  1076453  Results: FS98 AmbientWind at PlaneAlt=6332: dir 276T, vel 19
  1076843  Results: FS98 AmbientWind at PlaneAlt=6355: dir 275T, vel 19
  1077171 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1077389  Results: FS98 AmbientWind at PlaneAlt=6388: dir 274T, vel 19
  1078029  Results: FS98 AmbientWind at PlaneAlt=6427: dir 273T, vel 19
  1078559  Results: FS98 AmbientWind at PlaneAlt=6460: dir 272T, vel 19
  1078778  Results: FS98 Wind0: ground (0ft) to 3310ft AGL, dir 0M, vel 0, gust 0, turb 0
  1079137  Results: FS98 AmbientWind at PlaneAlt=6496: dir 271T, vel 20
  1079745  Results: FS98 AmbientWind at PlaneAlt=6532: dir 270T, vel 20
  1080884  Results: FS98 CurrTemp at PlaneAlt=6604: 2C
  1082179 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1087202 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1092225 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1096858  Results: FS98 CurrTemp at PlaneAlt=7602: -0C
  1097248 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1102287 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1107310 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1112318 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1113254  Results: FS98 CurrTemp at PlaneAlt=8609: -2C
  1117341 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1122364 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1127388 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1129681  Results: FS98 CurrTemp at PlaneAlt=9626: -4C
  1132411 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1137434 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1142457 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1145936  Results: FS98 CurrTemp at PlaneAlt=10633: -6C
  1147481 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1152504 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1157246  Results: FS98 Wind0: ground (10ft) to 3280ft AGL, dir 0M, vel 0, gust 0, turb 0
  1157527 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1162270  Results: FS98 CurrTemp at PlaneAlt=11647: -8C
  1162550 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1167574 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1172644 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1177636 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1178540  Results: FS98 CurrTemp at PlaneAlt=12654: -10C
  1182659 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1187729 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1192752 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1195077  Results: FS98 CurrTemp at PlaneAlt=13675: -12C
  1197744 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1202752 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1207791 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1211363  Results: FS98 CurrTemp at PlaneAlt=14675: -14C
  1212798 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1217821 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1222845 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1227587  Results: FS98 CurrTemp at PlaneAlt=15682: -16C
  1227868 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1232922 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1237946 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1242969 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1244123  Results: FS98 CurrTemp at PlaneAlt=16706: -18C
  1247742  Results: FS98 AmbientWind at PlaneAlt=16929: dir 270T, vel 21
  1247992 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1253015 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1258039 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1260238  Results: FS98 CurrTemp at PlaneAlt=17707: -20C
  1263077 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1268101 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1273093 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1276540  Results: FS98 CurrTemp at PlaneAlt=18714: -22C
  1278116 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1283123 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1287897 >Change:  Cloud[0]: type=1, from 39370ft to 40190ft (+/- 100ft), cover=6, turb=1, topshape=0
  1287897 >Change:                      Precip=0, base=-1470ft, rate=0, icing=0
  1287897 >Change:  Cloud[1]: type=1, from 47990ft to 48025ft (+/- 100ft), cover=2, turb=0, topshape=0
  1287897 >Change:                      Precip=0, base=0ft, rate=0, icing=1
  1287897 >Change:  Cloud[2]: remainder cleared
  1287897  Results: Visibility[0]: range=18.0sm (28968m), from=0ft, to=8520ft
  1287897  Results: FS98 Vis: range=18sm, (raw value=1800)
  1287897  Results: FS98 Cloud1: type=1, from 39370ft to 40190ft (+/- 100ft), cover 6, turb 72, ice 0
  1287897  Results: FS98 Cloud2: type=1, from 47990ft to 48025ft (+/- 100ft), cover 2, turb 0, ice 1
  1288147 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1288755 >NewSet:  **** New Weather [1] being set: ICAO=GLOB (Dyn=1)
  1288755 >NewSet:  Pressure=1013.0, Drift=3.0 (Target=1013.1)
  1288755 >NewSet:  Visibility: range=8.0sm (12875m) (Target=0.0sm), from=0ft, to=8520ft
  1288755 >NewSet:  Temperature[0]: alt=0ft, Day=15 C, NightVar=3 C, DewPt=5 C
  1288755 >NewSet:  Surface wind: to alt=3200ft AMSL, dir=0T, vel=0.00, gust=0.0, turb=0, shear=0, var=0.0
  1288755 >NewSet:  Wind layer 1: to alt=6560ft AMSL, dir=270T (Tgt=270.0), vel=20.0 (Tgt=20.0), gust=0.0, turb=0, shear=0, var=0.0
  1288755 >NewSet:  Wind layer 2: to alt=100000ft AMSL, dir=270T (Tgt=270.0), vel=25.0 (Tgt=25.0), gust=0.0, turb=0, shear=0, var=0.0
  1288755 >NewSet:  Cloud[0]: type=9, from 3000ft to 9000ft (+/- 100ft), cover=5, turb=3, topshape=0
  1288755 >NewSet:                      Precip=1, base=-1470ft, rate=1, icing=0
  1288755 >NewSet:  Cloud[1]: type=1, from 39370ft to 40190ft (+/- 100ft), cover=6, turb=1, topshape=0
  1288755 >NewSet:                      Precip=0, base=-1470ft, rate=0, icing=0
  1288755 >NewSet:  Cloud[2]: type=1, from 47990ft to 48025ft (+/- 100ft), cover=2, turb=0, topshape=0
  1288755 >NewSet:                      Precip=0, base=0ft, rate=0, icing=1
  1288755 >NewSet:  **** End of New Weather details for ICAO=GLOB
  1292920  Results: FS98 CurrTemp at PlaneAlt=19731: -24C
  1293170 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1298193 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1303216 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1308240 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1309129  Results: FS98 CurrTemp at PlaneAlt=20748: -26C
  1313263 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1318271 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1323294 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1326492  Results: FS98 CurrTemp at PlaneAlt=21749: -28C
  1328395 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1332201  Results: FS98 Wind0: ground (-2ft) to 3280ft AGL, dir 0M, vel 0, gust 0, turb 0
  1332638  Results: FS98 Wind0: ground (59ft) to 3220ft AGL, dir 0M, vel 0, gust 0, turb 0
  1333418 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1338488 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1343496 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1347458 AP READOUTS: Flags1=00068417, Flags2=00000000
  1348535 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1348894  Results: FS98 CurrTemp at PlaneAlt=22759: -30C
  1349081  Results: FS98 Wind0: ground (-2ft) to 3284ft AGL, dir 0M, vel 0, gust 0, turb 0
  1349393  Results: FS98 Wind0: ground (0ft) to 3284ft AGL, dir 0M, vel 0, gust 0, turb 0
  1353542 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1358566 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1363589 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1367302 Ready Flags: Ready-To-Fly=Y, In Menu=Y, In Dlg=N
  1367302 Ready Flags: Ready-To-Fly=Y, In Menu=Y, In Dlg=Y
  1368596 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1373604 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1379719 Ready Flags: Ready-To-Fly=Y, In Menu=N, In Dlg=N
  1383151 Ready Flags: Ready-To-Fly=Y, In Menu=Y, In Dlg=N
  1383151 Ready Flags: Ready-To-Fly=Y, In Menu=Y, In Dlg=Y
  1383604 AppKey="Y9BE8NAXAKOC", Module="SDScene.dll"
  1386209 Flight saved #3 = "Previous flight"
  1386490 System time = 06/07/2014 22:33:51, FS2004 time = 22:18:55 (20:18Z)
  1386490 *** FSUIPC log file being closed
Memory managed: 0 Allocs, 13505 Freed
********* FSUIPC Log file closed ***********
Posted

 

A short flight starting att ESSA. Turning west through thick cloudlayer with heavy turbulence. In FSUIPC-log I checked weather, Log Lua plugns...,Debug trace Lua plugins and extras.

I'm a total newbie to this so bare with me :smile:

 

 

Sorry, the log shows nothing useful. I simply asked you to look to see if there were an errors logged -- errors would be marked as "error" in some way. Not too hard. I did not ask for any options to be selected.

 

You enabled all sorts of options which were not required and in fact would have diverted any Lua problems to a separate log. Please uncheck ALL options on the Logging page, and DO NOT PRESS "New Log" -- doing that starts a new log and renames the old one. The old one contains all the useful startup information, probably including any errors from an auto-loaded Lua plug-in.

 

You'll need to load up FS and uncheck all logging options then close it again, so when you next run it no options will mess things up. Then just run FS as you normally do, get into a turbulent situation, and then close FS down. If you cannot look for the word "error", paste the log here.

 

There are other options we can use to go deeper, but it is not worth doing so until the basics are known.

 

Pete

  • 6 months later...
Posted

Hello Michael, Pete,

 

I have an issue with this script, the sound is always ending with average of 5 to 10 minutes late (yes that much) after the last turbulence or after landing (engines off at parking and still playing the sound). I tried several times with the same result (and sometimes it start with 2-3 minutes delay after the first turbulence, but that's not a big deal).

I am using an alternate sound which is 15 sec long.

Have FSUIPC 3.99.., FS9.1, ActiveSky 6.5.

 

Any idea how to solve the problem ?

 

Kind regards,

Alex

Posted

Hello Michael, Pete,

 

I have an issue with this script, the sound is always ending with average of 5 to 10 minutes late (yes that much) after the last turbulence or after landing (engines off at parking and still playing the sound). I tried several times with the same result (and sometimes it start with 2-3 minutes delay after the first turbulence, but that's not a big deal).

 

Use WeatherSet to see if the turbulence indication is still there. I don't know what you are using to detect it.

 

If you want sounds to stop early on certain other conditions you'd need to program for that. Whilst "ground" is checked before starting the sound, there's no event programmed for the ground flag changing to stop the sound. Just add it if that's what you want.

 

Pete

Posted

Hello Pete,

 

Thanks a lot for this quick reply...

 

Sorry but I Don't understand what you mean about "WeatherSet". Could you explain a little bit more ?

 

As for the ground flag. I tried this :

 

-- Turbulence looping sound --
-- Initializing flags --
sndflg=0 -- turbulence sound flag
ref=0

-- Function to play sound if and until turbulence is detected --

function turbulence(offset,value)
ground=ipc.readUW(0x0366)
if (value > 0) and (sndflg == 0) and (ground == 0) then
ref=sound.playloop("turb.wav")
sndflg=1

end

if (value == 0) and (sndflg == 1) and (ground == 1) then
sound.stop(ref)
sndflg=0

end
end



-- FSUIPC LUA events

event.offset(0x0E88,"UW","turbulence")
event.offset(0x0E98,"UW","turbulence")

 

Just in case (I'm not a programmer so...) but without any change at all. It is quite annoying to hear the turbulence sound not ending...

However this script is a wonderful idea.

 

Thanks,

 

Alex

Posted

Sorry but I Don't understand what you mean about "WeatherSet". Could you explain a little bit more ?

 

WeatherSet is a program to read FSUIPC weather offsets and display them neatly. It is part of the FSUIPC SDK, but also available separately in the Download Links subforum. WeatherSet2 is the better version for FS9 and FSX. Weatherset in for the older FS versions, but both will work.

 

As for the ground flag. I tried this :

 

You need an event programmed so that the change in the ground flag calls the function -- in your script it is only called when the turbulence values change!

 

Add this to the end:

 

event.offset(0x0366,"UW","turbulence")

 

Pete

Posted

I just trid the event you suggested with no result. It took 6 min 1/2 to stop playing the sound after landing.

When flying it is different, it takes "only" 3-4 min to stop after outside of turbulence then 1-2 min to start when encountering turbulence again.

 

I don't know what to do, I will try the "WeatherSet" as soon as possible to see what's going on...

 

I will let you know.

 

Alex

Posted

I just trid the event you suggested with no result. It took 6 min 1/2 to stop playing the sound after landing.

When flying it is different, it takes "only" 3-4 min to stop after outside of turbulence then 1-2 min to start when encountering turbulence again.

 

All that sounds insane.

 

I'm afraid I'm unable to test here because I do not have FS9 any more. I never reinstalled after my last PC died late last year.  I'm really getting to the position where I can no longer support a version of FS which is over 11 years old.

 

However, you can run tests and show me the results quite easily.

 

You can see the state of those three offsets the program uses by logging them in the FSUIPC Monitor. Go to the Logging tab, then, on the right hand side, use three of the 4 entries: enter 0E88 with type U16, 0E98 type U16 and 0366 type U16, then select options below -- Advdisplay to show them on the FS screen (for you to see and correlate with the sounds), but check normal log too so we get a log with times.

 

Edit the Lua plug-in to log when the sound starts and stops: i.e.

 

after the line

 

sndflg=1

 

insert

 

ipc.log("Starting turbulence sound")

 

and after

 

sndflg=0

 

insert 

 

ipc.log("stopping turbulence sound")

 

Run it, get the problem, show me the FSUIPC.LOG.

 

Pete

Posted

Hi Pete,

 

Here is the report :

 

WeatherReadInterval=4
LogOptions=00000001
DebugStatus=127
     8596 System time = 02/02/2015 21:53:24
     8596 D:\Program Files\Microsoft Games\Flight Simulator 9\
     8596 System time = 02/02/2015 21:53:24, FS2004 time = 12:00:00 (00:00Z)
     9595 LUA.0: beginning "D:\Program Files\Microsoft Games\Flight Simulator 9\MODULES\ipcReady.lua"
    90965 FLIGHTS\OTHER\FLTSIM.flt
    91043 AIRCRAFT\c172\Cessna172SP.air
    91729 Aircraft="Cessna Skyhawk 172SP"
    91932 Clear All Weather requested: external weather discarded
   125753 AES Link established
   158919 C:\Users\Alex\Documents\Fichiers Flight Simulator\Vol généré par l'interface utilisateur.flt
   159012 Clear All Weather requested: external weather discarded
   159621 Monitor IPC:0E88 (U16) = 0
   159621 Monitor IPC:0E98 (U16) = 0
   159621 Monitor IPC:0366 (U16) = 1
   161945 Advanced Weather Interface Enabled
   164925 NWI weather clear actioned
   164925 External weather discarded
   172787 Traffic File #15 = "scenery\world\scenery\traffic"
   255202 Monitor IPC:0366 (U16) = 0
   850003 Monitor IPC:0366 (U16) = 1
   850580 Monitor IPC:0366 (U16) = 0
   858084 Monitor IPC:0366 (U16) = 1
   943666 AIRCRAFT\AEROPROYECTO IL18D\il18.air
   944056 Aircraft="Ilyushin Il-18D CU-T900"
   963260 Aircraft="Ilyushin Il-18D CU-T900"
   964227 WeatherOptions set, now 601CB7AF (timer=255)
  2328877 Monitor IPC:0366 (U16) = 0
  2641269 Monitor IPC:0E98 (U16) = 64
  2641316 LUA.0: Starting turbulence sound
  2726352 Monitor IPC:0E98 (U16) = 128
  2925924 Monitor IPC:0E98 (U16) = 64
  2944395 Monitor IPC:0E98 (U16) = 0
  3091191 Monitor IPC:0E98 (U16) = 64
  3110114 Monitor IPC:0E98 (U16) = 0
  3121393 Monitor IPC:0E88 (U16) = 72
  3328734 Monitor IPC:0E88 (U16) = 0
  3335473 Monitor IPC:0E98 (U16) = 64
  3436422 Monitor IPC:0E98 (U16) = 0
  3663419 Monitor IPC:0E98 (U16) = 64
  3687490 Monitor IPC:0E98 (U16) = 0
  3743494 Monitor IPC:0366 (U16) = 1
  3743978 Monitor IPC:0366 (U16) = 0
  3745148 Monitor IPC:0366 (U16) = 1

  4534232 Monitor IPC:0E98 (U16) = 64
  4893783 Monitor IPC:0E98 (U16) = 0
  4893783 LUA.0: stopping turbulence sound
 

The test was done with ActiveSky ON.

I'm writing this post with the turbulence sound stopped after being "20 min" on the ground...

Is it possible that the reason might come from weather settings conflict between ActiveSky and FSUIPC ?

 

Thanks for your help !

 

Alex

Posted

Here is the report :

 

Well, let's see:

 

  2328877 Monitor IPC:0366 (U16) = 0

  2641269 Monitor IPC:0E98 (U16) = 64

  2641316 LUA.0: Starting turbulence sound

 

So, the sound was started within 50 milliseconds (1/20th of a second) of turbulence being indicated. That's pretty good!

 

  3745148 Monitor IPC:0366 (U16) = 1

  4534232 Monitor IPC:0E98 (U16) = 64

  4893783 Monitor IPC:0E98 (U16) = 0

  4893783 LUA.0: stopping turbulence sound

 

However, it only stopped when the turbulence stopped, not when you were on the ground. So, let's look at the code yet again:

 

Aha:

if (value == 0) and (sndflg == 1) and (ground == 1) then

 

The "if" line says do the following if there is no turbulence, and the sound is playing, and you are on the ground!

 

So, it is doing what it is told. Looks like the sound would never stop once it started if you stayed flying, even if turbulence stopped! The way you have it you have to have all three conditions 

 

You obviously need to say "stop if the sound is playing AND the turbulence has stopped OR you are on the ground. So:

 

if (sndflg == 1)  and  ((value == 0)  or  (ground == 1)) then

 

Just basic logic!

Pete

Posted

Hi Pete,

 

You are just so great mate !! All is fine now, the sound now stop as it should...

 

Thank you so much for your very kind, professional and prompt help in this matter. Greatly appreciated !

 

Kind regards,

 

Alex

Posted

Hi Pete,

 

Well, another issue :

 

FSUIPC detect turbulence when there is no turbulence.

Here is an extract of the log :

 

100900573 WeatherOptions set, now E01CB78F (timer=255)
100926734 WeatherOptions set, now E00CB78F (timer=255)
100963613 Monitor IPC:0E88 (U16) = 0
100963613 Monitor IPC:0E98 (U16) = 64
100963613 Monitor IPC:0366 (U16) = 0
100996170 Monitor IPC:0E98 (U16) = 128
101026185 WeatherOptions set, now E01CB7AF (timer=255)
101063220 WeatherOptions set, now E00CB78F (timer=255)
 

As you can see, I switch OFF then switch ON again both turbulence options in FSUIPC without any result.

It detect turbulence (64 and 128) when actually it was total clear weather (no cloud or CB nearby) and very smooth condition...

I was using ActiveSky and I'm wondering if there is maybe a conflict between AS and FSUIPC ??

 

Any hint ??

 

Thanks,

 

Alex

Posted

FSUIPC detect turbulence when there is no turbulence.

Here is an extract of the log :

 

100900573 WeatherOptions set, now E01CB78F (timer=255)

100926734 WeatherOptions set, now E00CB78F (timer=255)

100963613 Monitor IPC:0E88 (U16) = 0

100963613 Monitor IPC:0E98 (U16) = 64

100963613 Monitor IPC:0366 (U16) = 0

100996170 Monitor IPC:0E98 (U16) = 128

101026185 WeatherOptions set, now E01CB7AF (timer=255)

101063220 WeatherOptions set, now E00CB78F (timer=255)

 

As you can see, I switch OFF then switch ON again both turbulence options in FSUIPC without any result.

It detect turbulence (64 and 128) when actually it was total clear weather (no cloud or CB nearby) and very smooth condition...

I was using ActiveSky and I'm wondering if there is maybe a conflict between AS and FSUIPC ??

 

You evidently misunderstand. Clear air turbulence can occur with no cloud.  That shows up in the wind layer you are in, as is clear from the log.  Use Weatherset2 to read the actual weather

 

FSUIPC is not incompatible with any weather program. It reads the weather direct from FS no matter how it is set.

 

Weather options cannot change weather already set, only weather which is set subsequently, and only weather set through FSUIPC. I don't remember. Are you using FS9 or FSX? If FS9 then most programs will be setting weather through FSUIPC. In FSX most set it directly sing SimConnect, so then the options don't apply.

 

If you want to suppress turbulence I suggest you do that before you even start ActiveSky, or perhaps do it IN ActiveSky.

 

Pete

Posted

Hi Pete,

 

Yes, I know quite well about CAT and it wasn't CAT as the flight was perfectly smooth. What I meant is that there was no turbulence at all, the plane was flying perfectly smooth despite the fact that FSUIPC was detecting turbulence. The turbulence was not "active" within the aircraft.

 

I don't want to suppress the turbulence. I am just wondering why FSUIPC was detecting turbulence when in fact there were none...

 

So, FSUIPC was detecting turbulence (64 & 128 in the log) while FS was not "playing" any turbulence at all, a perfectly smooth flight at that time (for about 10 min).

 

When I was saying "a conflict", I was not talking about compatibility but rather some WX settings that might interfere within each other between AS and FSUIPC due to different user settings in both software.

 

I'm using FS9.1 and AS6.5

 

English is not my mother tong so I don't know if my explanation are good enough...

 

Alex

Posted

Well, now it is the opposite.

I am doing the flight back (over the same route) and now I have moderate turbulence in VMC between 2 coulds layer and FSUIPC is detecting nothing (all data show 0).

 

So there is something creating a difference between what FSUIPC detect and what is "playing" within FS. Not all the time but often enough to have it on a regular basis...

 

Ahh here it goes, it took 4 to 5 minutes before having the turbulence detected :

19791202 Monitor IPC:0E98 (U16) = 0
120021990 Monitor IPC:0E88 (U16) = 216

 

So, it look like something is creating delays(several minutes) between what I actually have within my cockpit and what FSUIPC is detecting...

 

Alex

Posted

Sorry, I cannot help any further. FSUIPC simply reads what FS provides. FS9 weather system is not very clever in any case. It may be that the layers from one weather station interact with another, and the indications FS provides get mixed up. Did you even ever bother to see what WeatherSet was reading at all? You simply want me to solve apparently insoluble problems in a program long since unsupportable?

 

I strongly suggest you abandon such an old product and move to FSX if you want more reliable indications.

 

Pete

Posted

FS9 weather system is not very clever in any case. It may be that the layers from one weather station interact with another, and the indications FS provides get mixed up.

hmmm that's a very good possibility as it (more or less) correspond about what I have.

 

 

Did you even ever bother to see what WeatherSet was reading at all?

Sorry no, I don't know what is WeatherSet, didn't find this option within FSUIPC.

 

 

You simply want me to solve apparently insoluble problems in a program long since unsupportable?

 

I strongly suggest you abandon such an old product and move to FSX if you want more reliable indications.

 

Yes, I'm sorry for giving you so much trouble for such small thing...

I have FSX installed but it is way too heavy on ressources for my PC (despite the fact that I have an Acer Predator).

 

Thanks a lot for your kind help.

 

Alex

Posted

Sorry no, I don't know what is WeatherSet, didn't find this option within FSUIPC.

 

You've forgotten already? Didn't you even try it back then? See my answer to the same question back in post #13 on the 2nd of this month!

 

Pete

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.