public static string ToString(SIMCONNECT_RECV_VOR_LIST list) { string res = ""; string sep = ""; foreach (SIMCONNECT_DATA_FACILITY_VOR vor in list.rgData) { res += sep + "{"; res += $"\"Latitude\": {(float)vor.Latitude},"; res += $"\"Longitude\": {(float)vor.Longitude},"; res += $"\"Altitude\": {(float)vor.Altitude},"; res += $"\"fFrequency\": {(int)vor.fFrequency},"; res += $"\"fGlideSlopeAngle\": {(float)vor.fGlideSlopeAngle},"; res += $"\"Flags\": {(float)vor.Flags},"; res += $"\"fLocalizer\": {(float)vor.fLocalizer},"; res += $"\"fMagVar\": {(float)vor.fMagVar},"; res += $"\"GlideAlt\": {(float)vor.GlideAlt},"; res += $"\"GlideLat\": {(float)vor.GlideLat},"; res += $"\"GlideLon\": {(float)vor.GlideLon},"; res += $"\"Icao\": \"{vor.Icao}\""; res += "}"; sep = ", "; } return($"\"vors\": [ {res} ]"); }
void simconnect_OnRecvVorList(SimConnect sender, SIMCONNECT_RECV_VOR_LIST data) { switch ((DATA_REQUESTS)data.dwRequestID) { case DATA_REQUESTS.SUBSCRIBE_REQ: case DATA_REQUESTS.NONSUBSCRIBE_REQ: displayText("VOR List:"); Dump(data); DumpArray(data.rgData); break; default: displayText("Unknown request ID: " + data.dwRequestID); break; } }
private void SimConnect_OnRecvVorList(SimConnect sender, SIMCONNECT_RECV_VOR_LIST data) { //throw new NotImplementedException(); Console.WriteLine("VORLIST"); }