February 6, 200818 yr 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!
February 6, 200818 yr 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
February 6, 200818 yr 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 AviationMy Playland - I69
February 6, 200818 yr 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
February 6, 200818 yr >>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).
February 6, 200818 yr 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
February 7, 200818 yr >>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.
February 7, 200818 yr 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
April 19, 201016 yr 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
April 20, 201016 yr 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 FS RTWR SHRS F-111 JoinFS Little Navmap
April 20, 201016 yr Moderator PS - I see this is an old thread --- Oh well.RomanNo 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