Example #1
0
 public void Sync(NavPackage navData)
 {
     lat   = navData.Lat;
     lon   = navData.Lon;
     alt   = navData.Alt;
     v     = navData.V;
     b     = navData.B;
     pitch = navData.Pitch;
 }
Example #2
0
 public void Sync(NavPackage navData)
 {
     lat = navData.Lat;
     lon = navData.Lon;
     alt = navData.Alt;
     v = navData.V;
     b = navData.B;
     pitch = navData.Pitch;
 }
Example #3
0
 // constructor
 public NavSystem(NavPackage startNav)
 {
     lat   = startNav.Lat;
     lon   = startNav.Lon;
     alt   = startNav.Alt;
     v     = startNav.V;
     b     = startNav.B;
     pitch = startNav.Pitch;
     IsOn  = true;
 }
Example #4
0
        private double v; // velocity (meters / second)

        #endregion Fields

        #region Constructors

        // constructor
        public NavSystem(NavPackage startNav)
        {
            lat = startNav.Lat;
            lon = startNav.Lon;
            alt = startNav.Alt;
            v = startNav.V;
            b = startNav.B;
            pitch = startNav.Pitch;
            IsOn = true;
        }
Example #5
0
        /// <summary>
        /// Constructor
        /// </summary>
        public F16()
        {
            // hard coded f16 spec settings
            Init();

            spec.MaxRange = 3222.48; // km
            spec.MaxSpeed = 2414.016; // kmh
            spec.CruiseSpeed = 1320.48; // kmh

            startNav = new NavPackage(0.0, 0.0, 10000, 6672, Math.PI/4, 0.0);

            SystemPowerUp(startNav);
        }
Example #6
0
        public static void PrintNavData(NavPackage navData)
        {
            string alt = navData.Alt.ToString().PadRight(21);
            string b = navData.B.ToString().PadRight(21);
            string v = navData.V.ToString().PadRight(21);
            string pitch = navData.Pitch.ToString().PadRight(21);
            string lat = navData.Lat.ToString().PadRight(21);
            string lon = navData.Lon.ToString().PadRight(21);

            Console.SetCursorPosition(7, 29);
            Console.Write(alt);
            Console.SetCursorPosition(7, 30);
            Console.Write(b);
            Console.SetCursorPosition(7, 31);
            Console.Write(v);
            Console.SetCursorPosition(7, 32);
            Console.Write(pitch);
            Console.SetCursorPosition(7, 33);
            Console.Write(lat);
            Console.SetCursorPosition(7, 34);
            Console.Write(lon);
        }
Example #7
0
 // initialize the nav computer
 public void TurnOnNavComputer(NavPackage startNavData)
 {
     navSystem = new NavSystem(startNavData);
 }
Example #8
0
 // initialize the nav computer
 public void TurnOnNavComputer(NavPackage startNavData)
 {
     navSystem = new NavSystem(startNavData);
 }
Example #9
0
 /// <summary>
 /// Powers all systems up
 /// </summary>
 /// <param name="startNav"></param>
 private void SystemPowerUp(NavPackage startNav)
 {
     flightComputer.TurnOnNavComputer(startNav);
 }