Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Runway type

Featured Replies

Hi,Does this helps?(A:SURFACE TYPE,enum)0 Concrete 1 Grass 2 Water 3 Grass_bumpy 4 Asphalt 5 Short_grass 6 Long_grass 7 Hard_turf 8 Snow 9 Ice 10 Urban 11 Forest 12 Dirt 13 Coral 14 Gravel 15 Oil_treated 16 Steel_mats 17 Bituminus 18 Brick 19 Macadam 20 Planks 21 Sand 22 Shale 23 Tarmac 24 Wright_flyer_track )and(A:SURFACE CONDITION,enum)0 DRY 1 WET 2 ICY 3 SNOW4 ?Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Hi,From the fsgps:%((@c:WaypointAirportRunwaySurface))%{case}%{:1}Concrete%{:2}Asphalt%{:101}Grass%{:102}Turf%{:103}Dirt%{:104}Coral%{:105}Gravel%{:106}Oil%{:107}Steel%{:108}Bituminus%{:109}Brick%{:110}Macadam%{:111}Planks%{:112}Sand%{:113}Shale%{:114}Tarmac%{:115}Snow%{:116}Ice%{:201}Water%{end}As you can see, no enum 0-24!That is the only one i use.No idea about C++.Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Moderator

>Failed. :(. I tried>>execute_calculator_code("(A:SURFACE_TYPE,Enum)",&val,NULL,NULL);>>and>>execute_calculator_code("(E:SURFACE_TYPE,Enum)",&val,NULL,NULL);>>but got only zero from both of them. Where did I go wrong?Syntax, Dai...This works fine:execute_calculator_code("(E:TIME OF DAY,Enum)",NULL,&time_of_dayi,NULL);Hence, you would need to use this:execute_calculator_code("(E:SURFACE_TYPE,Enum)",NULL,&val,NULL);Remember the prototype is:*execute_calculator_code) (PCSTRINGZ code, FLOAT64* fvalue, SINT32* ivalue, PCSTRINGZ* svalue);-or in English-*execute_calculator_code) ("XMLvar,units", float, integer, string);In your failed experiment, you asked for an integer in the "units" of the XMLvar, but put a pointer (&val) in the "float" field for the return! ;)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
  • Commercial Member

Wow! That was quick Bill! You posted while I was still searching the forum and yes, I'd just discovered the TimeOfDay post. Even worse, I've been using the ToD info to control my cockpit lighting... (is there a smiley for Horribly Embarrassed?). I think I'd skirted all round the answer as I'd also tried this:execute_calculator_code("(A:SURFACE_TYPE,Enum)",NULL,&val,NULL);Ok well... next time I'll remember to look further before I post. Many, many thanks for the confirmation.-Dai

  • Author
  • Commercial Member

No.... I still can't get it to work. iToD works, iRwyType doesn't.//**************************************************************************//Get the time of day (1=day, 3=anything else!)//**************************************************************************SINT32 iToD=0;GetTimeOfDay (SINT32 TimeOfDay){ SINT32 time_of_day; execute_calculator_code("(E:TIME OF DAY,Enum)",NULL,&time_of_day,NULL); iToD=time_of_day; return iToD;}//**************************************************************************//Get the runway surface type//**************************************************************************SINT32 iRwyType=0;GetRunwayState(SINT32 rwystate){ SINT32 state; execute_calculator_code("(E:SURFACE_TYPE, Enum)",NULL,&state,NULL); iRwyType=state; return iRwyType;}iToD=GetTimeOfDay(iToD) works okay (as far as it goes! :)) but iRwyType=GetRunwayState(iRwyType) always returns zero, wherever I place my aircraft. Am I missing something else here?-Dai

  • Moderator

Beats me, Dai! I've never actually tried the variable myself, but did notice the syntax error immediately, having been "victim" of that myself a time or two.EDITED (10 minutes later):Solved! There are two issues preventing this from working, and both are horribly embarrasing to me as well: :-grr 1) The name of the variable is SURFACE TYPE, not SURFACE_TYPE...2) The variable is an "A" type, not "E" type... I spent about 30 seconds testing this in a simple XML gauge:%((A:SURFACE TYPE, Enum))%!d!%It works perfectly... :-jumpy Therefore, this should work as well now:execute_calculator_code("(A:SURFACE TYPE, Enum)",NULL,&state,NULL);

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Dai - YOU are excused for your oversight. For Fr. Bill, it's back to the woodshed time.. :)

  • Moderator

>:) - I'm at work ATM but I'll try it when I get home. You>know what makes it even worse for both of us? Look at Jan's>first reply: he says>>(A:SURFACE TYPE,Enum>>........ oooops *:-*.Yeah, I noticed that too...FS does seem to have bit of sport with us, if you move off the taxiway or runway onto the grass, it reports you are in the "Forest..." *:-*

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

That is why i also add:(A:SIM ON GROUND,bool) if{ ("ground surface and condition") } els{ ("Airborne") }Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.