//public void OnUpdate() //{ // ; //} //selectedGlideSlope, bearing, dme, elevationAngle, locDeviation, gsDeviation, runwayHeading public object NavInfo(string s) { if (NavUtilLib.GlobalVariables.Settings.enableDebugging) { Debug.Log("NavUtils: ModuleNavUtilsInfo.NavInfo() " + s); } FlightData.updateNavigationData(); s = s.ToUpper(); switch (s) { case "SELECTEDGLIDESLOPE": return(FlightData.selectedGlideSlope); case "BEARING": return(FlightData.bearing); case "DME": return(FlightData.dme); case "ELEVATIONANGLE": return(FlightData.elevationAngle); case "LOCALIZERDEVIATION": return(FlightData.locDeviation); case "GLIDESLOPEDEVIATION": return(FlightData.gsDeviation); case "RUNWAYHEADING": return(FlightData.runwayHeading); case "SELECTEDRUNWAYALT": return(FlightData.selectedRwy.altMSL); case "SELECTEDRUNWAYIDENT": return(FlightData.selectedRwy.ident); case "SELECTEDRUNWAYSHORTID": return(FlightData.selectedRwy.shortID); case "SELECTEDRUNWAYLAT": return(FlightData.selectedRwy.locLatitude); case "SELECTEDRUNWAYLON": return(FlightData.selectedRwy.locLongitude); default: return(null); } }
public Func <Vessel, string[], object> GetAPIHandler(string API) { if (SimpleValues.ContainsKey(API.ToLowerInvariant())) { return((v, a) => { if (FlightData.GetLastNavUpdateUT() + 0.05 < Planetarium.GetUniversalTime()) { FlightData.updateNavigationData(); } return SimpleValues[API.ToLowerInvariant()](); }); } return(null); }