Tuesday, July 28, 2009

How do i add Degrees(o) into a string? GPS co ordinates??C#?

if (GPSSerial.gpsData.Count %26gt; 0)


{


textBox1.Text = GPSSerial.gpsData.Dequeue();











string r = textBox1.Text;





string[] values = r.Split(',');





// string newstring = r.Remove(2,6); REMOVE FUNCTION








if (values[0] == "$GPRMC")


{





textBox2.Text = values[3];





textBox3.Text = values[5];


}


}


Textbox 2 and 3 both output the latitude and longitude of the gps position. They are currently displayed in a long string.


How do i insert a degrees character so it displays readable lat and long values?

How do i add Degrees(o) into a string? GPS co ordinates??C#?
The degree character is long ascii 248. (on PC's)


It appears you have split the data, so you need to insert the degree character at the right point in the character array that is the string or use MID


No comments:

Post a Comment