Jump to content
Sign in to follow this  
n4gix

Flawed Logic for RadAlt ??

Recommended Posts

Guest Skymed

Hi FolksI always want my radAlt to show zero when a helicopter is actually on the ground. As it is, it appears that the radalt is positioned according to static_CG_height setting in the aircraft.cfg, so when on the ground it shows THAT number as opposed to zero. Now that is Ok I suppose, but when in a helicopter coming in for a "gentle" landing, I want the radalt to show the height of the chopper skids above ground, NOT the staic Cg Height.So, putting on my thinking cap, I came up with this:(A:SIM ON GROUND,bool) (A:Ground velocity, feet per second) 0 == && if{ (A:Indicated Altitude, feet) (A:GROUND ALTITUDE, feet) - (>L:aircraftheight,feet) } (A:Radio height, feet) (L:aircraftheight,feet) - (>G:Var9) Basically, if the aircraft is on the ground and stationary, subtract the ground elevation from indicated altitude, put it into an L variable, then subtract that L var from the RadALt, put it into Gvar9 and use Gvar 9 as the radalt readout from thereon. Therby having predone the calculations to make sure the RadALt is showing distance from the bottom of the skids to ground, as opposed to staic cg height to ground. Ok as long as the sim starts with the chopper on the ground and stationary.Unfortunately, the radalt occassionaly goes nuts following this procedure. Did I miss anything or is there a better way to maintain a RadAlt that shows the correct value all times?Steve

Share this post


Link to post
Share on other sites
Guest bartels

I would just use a fixed calibration value, subtracted or added to the radalt readout, nothing more. Even in real life the radalts are calibrated to show zero at a normal touchdown. E.g. unusal attitudes or gear compression will result in non-zero readouts.Arne Bartels

Share this post


Link to post
Share on other sites
Guest Skymed

Arne,thanks for the reply, but I'm not sure how I would do that. Any hints?Steve

Share this post


Link to post
Share on other sites
Guest Tom Goodrick

This is a good point. I think I will do it on my radalts both for helicopters and for fixed-wing. What I have done is to remember the value, usually after the first landing which is a 'wonder landing.' (I wonder where the ground is!) The thing to do is simply to subtract a constant value from the reading. The value would be something like 3.0 or 4.0. It means some aircraft need different gauges. But I don't think you'd have too many different values. The constant could appear in the name of the gauge so you know which gauge to use. For example Radalt3.xml uses a constant of 3.0 feet.

Share this post


Link to post
Share on other sites
Guest Skymed

>I would just use a fixed calibration value, subtracted or>added to the radalt readout, nothing more. Even in real life>the radalts are calibrated to show zero at a normal touchdown.>E.g. unusal attitudes or gear compression will result in>non-zero readouts.>Arne BartelsOh I see what you mean. Make a radalt specific for each aircraft. yeah I have walked that path and its ok till someone installs the gauge on an aircraft it was not inted for and then the gauge will not read zero when on the ground.Perhaps this the only solution to prevent my radAlt from going nuts......but I will keep on experimenting.Thanks again to you all for the feedback.Steve

Share this post


Link to post
Share on other sites

>Perhaps this the only solution to prevent my radAlt from going>nuts......but I will keep on experimenting.Why not simply calculate the delta value by subtracting the local elevation from the value returned by the radar altimenter?delta_altitude = RADIO_HEIGHT - GROUND_ALTITUDEradio_height_corrected = RADIO_HEIGHT - delta_altitudeYou had the right idea, but the wrong execution. You shouldn't care whether the a/c is on the ground or not. The return will always be reliable, because the sim value for GROUND_ALTITUDE is always the elevation DIRECTLY UNDER the a/c at any given moment.Suppose the simpilot decided to load a saved flight where the a/c is already at some altitude? Your attempt wouldn't work in such a case, where this simplified schema would...


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest Skymed

BillThanks a lot for that. Only thing is, I am not sure what delta height is, specifically, nor can I find a A variable for it.Do I just use an L var called delta height or is there an A variable that I have missed?Steve

Share this post


Link to post
Share on other sites
Guest JeanLuc_

quick math:delta_altitude = RADIO_HEIGHT - GROUND_ALTITUDEradio_height_corrected = RADIO_HEIGHT - delta_altitudemeansradio_height_corrected = RADIO_HEIGHT - (RADIO_HEIGHT - GROUND_ALTITUDE)meansradio_height_corrected = (RADIO_HEIGHT - RADIO_HEIGHT) - (-GROUND_ALTITUDE)meansradio_height_corrected = GROUND_ALTITUDE....Hope this helps!

Share this post


Link to post
Share on other sites

>Bill>>Thanks a lot for that. Only thing is, I am not sure what delta>height is, specifically, nor can I find a A variable for it.>>Do I just use an L var called delta height or is there an A>variable that I have missed?All of the "variable" in lower case are "custom variables," or "L: type variables" in XML-Speak. Basically, it's pretty much what you had initially used, but simply omits the "Aircraft on Ground" check.Having "slept on my suggestion" though, I see that this scheme will fall over dead as soon as the a/c leaves the ground.Without testing the use of PLANE_ALTITUDE instead of GROUND_ALTITUDE, it may be better to use PLANE_ALTITUDE...Frankly, I've never seen a problem with simply using RADIO_HEIGHT alone, simply because unless you have a "digital display," most needle based indicators don't have the scale resolution to resolve to a mere 3' or so anyway... :)Of course, if you are reporting the rad/alt height on a HUD, then absolute calibration is a must, so calculating the delta_height for any a/c the gauge is installed in is a good thing.I believe the preferred alternative to calculating the delta_height would be to provide an adjustment "screw" (mouse area in some corner of the gauge) where the user could "calibrate" the rad/alt themselves! :)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest Skymed

The replies are great. Yes, this is a digital gauge on a HUD, so it needs callibration to read zero when on the ground. I must be having a brain dead day, because this is the way it comes out:delta_altitude = RADIO_HEIGHT - GROUND_ALTITUDEradio_height_corrected = RADIO_HEIGHT - delta_altitudeSO lets asssign numbers to this:On the ground the radalt shows 4, which is from static_cg_height in the aircraft.cfg. The ground elevation is 1000.SO: Delta Altitude = 4 -1000 = (-996)radio_height_corrected = RADIO_HEIGHT - delta_altitudetherefore: Radio height corrected= 4 - (-996) which, if my high school math is correct, = 1000, which brings me full circle back to the Ground Altitude.Now, as far as I can tell, RADIO ALTITUDE = PLANE ALTIUDE - GROUND ALTITUDE, and the part that I need to capture as a variable to use as a constant to set the rad alt correctly is the difference between the 2 when the sim is on the ground, OR the static_cg_height from the aircaft.cfgThere has to be a way :-))

Share this post


Link to post
Share on other sites

Hallo,Didn't follow the discussion thoroughly, but i use for Radioalt:(A:Radio height, feet) (G:Var1) -)and the Adjustment Knob:(G:Var1) -- (>G:Var1)(G:Var1) ++ (>G:Var1)to set Radioalt on the ground as 0.Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites
Guest Skymed

Thanks Jan, I appreciate that. However, what I am trying to do is develop a rad alt that will self adjust. I have found that having to reset the rad alt all the time can be a little bit annoying, although it may be the only way to go unless I can figure this out.Steve

Share this post


Link to post
Share on other sites

>Thanks Jan, I appreciate that. >>However, what I am trying to do is develop a rad alt that will>self adjust. I have found that having to reset the rad alt all>the time can be a little bit annoying, although it may be the>only way to go unless I can figure this out.I wonder what I was smoking when I made my earlier replies... How about:if (aircraft on ground)delta_height = RADIO_HEIGHTcalibrated_height = RADIO_HEIGHT - delta_heightex:calibrated_height = 2.78 - 2.78therefore calibrated_height = 0When the a/c is loaded on the ground, you will calculate a delta value, which is then subtracted from the reported RADIO_HEIGHT. For the rest of the flight, no matter how many times you take off and land, the radar altimeter will remain calibrated properly. When you land, the delta will change to a value of 0 of course, but that's OK, since the calibrated height won't change.The only time this will "fall down and die" is if the a/c is loaded while in flight. Then the radar altimeter will be "uncalibrated" until AFTER the first landing...Why is it "we" always seem to make things more difficult than they are? :)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest Skymed

Bill,"we" do tend to make life complicated :-))So now we have come full circle to my original post which showed:(A:SIM ON GROUND,bool) (A:Ground velocity, feetper second) 0 == && if{ (A:IndicatedAltitude, feet) (A:GROUND ALTITUDE, feet) -(>L:aircraftheight,feet) } (A:Radio height, feet) (L:aircraftheight,feet) -(>G:Var9) Where Gvar9 is the callibrated radio Altimeter :-))Except that I have changed (A:Indicated Altitude, feet) to (A:PlaneAltitude, feet) A very circuitous path indeed.Steve

Share this post


Link to post
Share on other sites

>Bill,>>"we" do tend to make life complicated :-))>>So now we have come full circle to my original post which>showed:>>>>(A:SIM ON GROUND,bool) (A:Ground velocity, feet>per second) 0 == && if{ (A:Indicated>Altitude, feet) (A:GROUND ALTITUDE, feet) ->(>L:aircraftheight,feet) } >>>>>>(A:Radio height, feet) (L:aircraftheight,feet) ->(>G:Var9) >>>>Where Gvar9 is the callibrated radio Altimeter :-))>>Except that I have changed (A:Indicated Altitude, feet) to>(A:Plane>Altitude, feet)>> A very circuitous path indeed.No, we have NOT!I'm sorry I cannot express the idea in XML-Speak, but it is only necessary to know that WHILE THE A/C is on the ground & stationary, the "delta value" (your G:Var9 which you could more easily call L:delta) need only be set to whatever is being reported by the (A:Radio height, feet) variable at THAT MOMENT!If you write a string value to display the A:Radio height, feet variable, you'll immediately see the obvious: the CG offset, which on my Citation II, happens to be 3.28'All I'd need to do is lock G:Var9 (or L:delta) to that number... That number IS your correction factor or delta value... :)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...