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.

Offsetting numbers in a radar altimeter

Featured Replies

I'm making a digital radar altimeter for FSX. I've got vertical strips containing the digits; the code for the "ones" and "tens" column looks like this (there are also columns for 100s, 1000s, and 10000s): 00.000,00.000True-64.000,197.000True0.000,22.0000.00010.00000.000,00.000True-50.000,197.000True0.000,22.0000.00010.000It's working fine, except that when I'm at ground level, it displays the height as 3 ft. Is there a way to offset it by 3 feet so that it reads "0" when it's sitting on the ground? A 747 pilot might not care, but this is for a chopper, so the difference isn't trivial!

  • Moderator

Well, you could subtract 3 from the value, but realize that is the way that they are supposed to work!The 3' is the height of the antenna above ground! :)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Commercial Member

The 3' is the height above ground your 'sensor' is in the chopper. I believe there's a way to zero it with the aircraft.cfg, but I don't remember off the top of my head.

Ed Wilson

Mindstar Aviation
My Playland - I69

Hello Try (A:SIM ON GROUND,bool) if{ (A:Radio height, feet) (>L:radalt,feet) } %((A:Radio height, feet) (L:radalt,feet) - )%!d! Works for any aircraft.

Paul EGLD

>>that is the way that they are supposed to work!That's what I suspected. If I were a rw chopper pilot, this would keep me awake all night long!>>The 3' is the height above ground your 'sensor' is in the>>chopper. I believe there's a way to zero it with the>>aircraft.cfg, but I don't remember off the top of my head.I think the number offset comes from the static_cg_height, but I would think that changing this will screw up my contact points. I'll try it and see what happens. I'll also try your code, pve.I guess what I need to do first is decide whether to keep the offset (wacky but rw), or get rid of it (much more useful but not rw).

  • Moderator

>I guess what I need to do first is decide whether to keep the>offset (wacky but rw), or get rid of it (much more useful but>not rw). Realize that forcing the value to be zero when on ground might "look pretty," but until actual touchdown, the radar altimeter will STILL BE REPORTING 3' AGLThe digital readout will simply drop from 3' AGL to 0' instantly... :-roll If it really, really bothers you all that much, it would be more consistent to simply subtract 3.0 from your displayed value... all the time!You could then state that your radar altimeter has been "calibrated" to compensate for the reflector's height above ground... :-beerchug

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

>>If it really, really bothers you all that much, it would be more consistent to simply subtract 3.0 from your displayed value... all the time!How would I go about doing that, Bill? I tried putting a subtraction operand on the RADIO HEIGHT value, but couldn't get it working.

  • Moderator

(P:Units of measure,enum) 2 == if{ (A:RADIO HEIGHT, meters) 0.91439 - } els{ (A:RADIO HEIGHT, feet) 3 - }

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Works great Bill...thanks yet again!And thanks to WarpD and pve as well.:-cool

  • 2 years later...
  • Moderator
I'm making a digital radar altimeter for FSX. I've got vertical strips containing the digits; the code for the "ones" and "tens" column looks like this (there are also columns for 100s, 1000s, and 10000s):
			<Element id="Altitude Display - 1s">				<FloatPosition>00.000,00.000</FloatPosition>				<Image id="radalt_numbers.bmp" Name="radalt_numbers.bmp">					<Transparent>True</Transparent>					<Axis>-64.000,197.000</Axis>					<Bright>True</Bright>				</Image>				<MaskImage id="radalt_mask.bmp" Name="radalt_mask.bmp">				</MaskImage>				<Shift id="Shift">					<Scale>0.000,22.000</Scale>					<Expression id="Expression">						<Minimum>0.000</Minimum>						<Maximum>10.000</Maximum>						<script>(P:Units of measure, enum) 2 == if{ (A:RADIO HEIGHT, meters) } els{ (A:RADIO HEIGHT, feet) } abs 99999 min 0 max 10 % 1 / flr</Script>					</Expression>				</Shift>			</Element>			<Element id="Altitude Display - 10s">				<FloatPosition>00.000,00.000</FloatPosition>				<Image id="radalt_numbers.bmp" Name="radalt_numbers.bmp">					<Transparent>True</Transparent>					<Axis>-50.000,197.000</Axis>					<Bright>True</Bright>				</Image>				<MaskImage id="radalt_mask.bmp" Name="radalt_mask.bmp">				</MaskImage>				<Shift id="Shift">					<Scale>0.000,22.000</Scale>					<Expression id="Expression">						<Minimum>0.000</Minimum>						<Maximum>10.000</Maximum>						<script>(P:Units of measure, enum) 2 == if{ (A:RADIO HEIGHT, meters) } els{ (A:RADIO HEIGHT, feet) } abs 99999 min 0 max 100 % 10 / flr</Script>					</Expression>				</Shift>			</Element>

It's working fine, except that when I'm at ground level, it displays the height as 3 ft. Is there a way to offset it by 3 feet so that it reads "0" when it's sitting on the ground? A 747 pilot might not care, but this is for a chopper, so the difference isn't trivial!

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Bill, I used something like this, it recalibrates once the aircraft is on the ground. The problem is that it does not calibrate for suspension squish quite as I like it..

<Macro Name="RAD">(P:Units of measure, enum) 2 == if{ (A:RADIO HEIGHT, meters) } els{ (A:RADIO HEIGHT, feet) }</Macro><Update>(A:SIM ON GROUND, bool) (G:Var1) 1 == @RAD (L:RADCALIBRATE, enum) - 0 == ! and and if{ 0 (>G:Var1) }(A:SIM ON GROUND, bool) (G:Var1) 0 == and if{ @RAD (>L:RADCALIBRATE, enum) 1 (>G:Var1) }(A:SIM ON GROUND, bool) ! (G:Var1) 1 == and if{ 0 (>G:Var1) }</Update>!-- Use this value --><Value>@RAD (L:RADCALIBRATE, enum) - </Value>

PS - I see this is an old thread --- Oh well.Roman

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

  • Moderator
PS - I see this is an old thread --- Oh well.Roman
No problem, Roman!Actually, I meant to add a bold comment at the top to indicate that this was a "necroed thread."You see, since the forum software change, XML script examples shared in the past are now "invisible!"So, whenever I have to search the forums for any reason and notice some "working example" posted, I "resurrect the dead" and encapsulate the XML script in

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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.