Foster 511 RNAV Project in XML, need help!

FSX including FSX Steam version.

Foster 511 RNAV Project in XML, need help!

Postby demyhr » Fri Dec 16, 2011 6:39 pm

I'm trying to reproduce the panel and function of a 1966 C172 G model I used to own in the 80's. The Foster 511 RNAV is the last instrument I need to finish the project. I have modified and coded the Narco Radios and found exact gauges for everything else. It's more a sentimental journey than something serious. I had a lot of good times flying the plane. It had an Avcon Lycoming O-260 180hp engine, Hartzell constant speed prop, flap and aileron seals, remote mag compass, King HSI slaved to compass, Narco MK12 and COM/NAV 11 radios, King DME, King ADF, and the Foster RNAV.

While the 180hp didn't make it go faster, I lived in Colorado Springs and the airport I flew out of was 6888 ft elevation and the plane could get off the ground in less than 1200 ft on a 90 degree day at full gross weight. Due to the seals on the flaps and ailerons I could actually slow the plane down with full flaps and power such that the airspeed indicated "0" and still have control, albeit right on the ragged edge of a stall. Flying in the mountains of Colorado was no problem as the plane would reach 18,000 msl which is a fair amount above a normal 172's ceiling. Of course you need oxygen and ifr rating to do that. I regularly would get up to 13,000-14,000 ft going through the passes. I once flew to CA by going straight west and there are areas over northern Nevada where at 10,000 ft you can see no evidence of mankind whatever. needless to say, I tried to stay in radio contact with flight service on that flight. But I digress.

I have now got the input to the RNAV working and have a basic idea of the math required to find the offset to the VOR based on the RNAV bearing and distance input. I have tried to couple this to the Bendix/King HSI XML of the FSX Beach Baron. I'm not having much luck getting it working because of my lack of knowledge of the internals of FSX. My relevant code is shown below:

Any help with getting this to work would be appreciated. Keep in mind RNAV was used in the 80's (no GPS) with only the input to the RNAV (radial and distance) combined with the tuned VOR radial and the DME distance. I'm hoping to duplicate this operation without resorting to FSX GPS info if possible.

Thanks for the help.




     (A:NAV1 RADIAL,degrees) dnor (L:WP1_BEARING,degrees)  - s0
     abs dgrd (>L:VOR_WP_ANGLE,radians)




     (L:WP1_DISTANCE,nmiles) sqr
     (A:NAV1 DME,nmiles) sqr
     2 (L:WP1_DISTANCE,nmiles)
     (A:NAV1 DME,nmiles)
     (L:VOR_WP_ANGLE,radians) cos * * * - + sqrt
     (>L:DIST_PLANE_TO_WP,nmiles)




     (A:NAV1 DME,nmiles) sqr
     (L:DIST_PLANE_TO_WP,nmiles) sqr
     (L:WP1_DISTANCE,nmiles) sqr - + 2
     (A:NAV1 DME,nmiles)
     (L:DIST_PLANE_TO_WP,nmiles) * * / acos
     (>L:TEMP,radians)
     
     

     l0 0 <      if{ (L:TEMP,radians) /-/ } els{ (L:TEMP,radians) } (>L:VOR_OFFSET,radians)


HSI code

(>L:VOR_OFFSET,radians)


     

     (A:NAV1 OBS,radians) (>L:NAV1_OBS,radians)




     
           
           
                 
           

           
                 
           
           
                 (A:Plane heading degrees gyro,radians) /-/
                 
                       
                       
                 

           

     

     
           
           
                 
           
           
           
                 (L:NAV1_OBS,radians) (A:Plane heading degrees gyro,radians) -
           

     

     
           
           
           
                 (L:NAV1_OBS,radians) (A:Plane heading degrees gyro,radians) -
           

     

     
           
           
                 
           
           
                 (A:HSI CDI needle valid, bool) if{ (A:HSI CDI needle, number)  } els{ 0 }
                 
                 

           

           
                 (L:NAV1_OBS,radians) (A:Plane heading degrees gyro,radians) -
           

     

     
           
           
     

     
           
           
     

     
           
           
                 
           
           
                 (A:Autopilot heading lock dir,radians) (L:Plane heading degrees gyro,radians) -
           

     

     
           
                 
           
           
                 (A:HSI GSI needle valid, bool) if{ (A:HSI GSI needle, number) } els{ -220 }
                 
                       
                       
                 

                 
           

     

     
           
                 
           
           
                 (A:HSI GSI needle valid, bool) if{ (A:HSI GSI needle, number) } els{ -220 }
                 
                       
                       
                 

                 
           

     

     
           
     

     
           
           
                 
           
           
                 (A:Autopilot heading lock dir,radians) 3 *
           

     

     
           
           
                 
           
           
                 (A:NAV1 OBS,radians) 3 *
           

     

     
           
           
           
                 
                 
                       
                       
                 
                 
                       
                       
                 
           
           
                 
                 
                       
                       
                 
                 
                       
                       
                 
           
     

demyhr
Ground hog
Ground hog
 
Posts: 5
Joined: Sat Apr 02, 2011 10:39 pm

Return to Flight Simulator X (FSX) and Steam

Who is online

Users browsing this forum: No registered users and 624 guests