# HG changeset patch # User mkanning@CL-ENS241-10.cedarville.edu # Date 2013-04-04 20:38:29 # Node ID 636f2836d35c979e62322c01f0f235e049f4f1b7 # Parent 5c602564259628d075de7bbf40026c9b3014c7ab small changes diff --git a/Demo.WindowsForms/Forms/MainForm.cs b/Demo.WindowsForms/Forms/MainForm.cs --- a/Demo.WindowsForms/Forms/MainForm.cs +++ b/Demo.WindowsForms/Forms/MainForm.cs @@ -1147,7 +1147,7 @@ namespace Demo.WindowsForms longitude = rawDataReceived.Substring(indexStart + 2, indexEnd - indexStart - 2); //remove APRS overhead from string - string transmissionCommentField= rawDataReceived.Substring(rawDataReceived.IndexOf(" ")); + string transmissionCommentField = rawDataReceived.Substring(rawDataReceived.IndexOf(" ") + 1); //place each datum in its own variable string[] dataTransmission; @@ -1160,9 +1160,9 @@ namespace Demo.WindowsForms string testString = ""; //loop through all datums in the transmission and send them to the chart builder - for (int i = 0; i < dataTransmission.Length; i++) + for (int i = 1; i < dataTransmission.Length; i++) { - if (i == 0) + if (i == 1) { firstTransmissionDatum = true; } @@ -1249,12 +1249,6 @@ namespace Demo.WindowsForms return theFinalAnswer; } - //must change lat/long coords to properly place map marker - public decimal DmsToDD(double d, double m = 0, double s = 0) - { - return Convert.ToDecimal((d + (m / 60) + (s / 3600)) * (d < 0 ? -1 : 1)); - } - // add marker from an APRS transmission - MDKEdit private void addTrackerMarker(string lat, string lng) { @@ -1355,14 +1349,14 @@ namespace Demo.WindowsForms } ///MASTER MODULE DATA TYPES - else if (dataType.Equals("_")) //latitude + else if (dataType.Equals("_")) //latitude extra accuracy { //TODO: check math and decimal placement latitude += data.ToString(); tboxMasterLatitude.Text = latitude; tboxMasterLatitude.BackColor = Color.Chartreuse; } - else if (dataType.Equals("|")) //longitude + else if (dataType.Equals("|")) //longitude extra accuracy { //TODO: check math and decimal placement longitude += data.ToString(); diff --git a/Demo.WindowsForms/Source/Program.cs b/Demo.WindowsForms/Source/Program.cs --- a/Demo.WindowsForms/Source/Program.cs +++ b/Demo.WindowsForms/Source/Program.cs @@ -20,7 +20,7 @@ namespace Demo.WindowsForms /// /// // Instantiate the communications port - private SerialPort port = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One); + private SerialPort port = new SerialPort("COM5", 9600, Parity.None, 8, StopBits.One); static MainForm windowGUI; [STAThread]