Story behind the story. Got a GPS unit last year that communicates
through RS232. The input string is the above. I would like to use
the GPS input to set my PC's time - for accurate observations. To do
that I need to extract the time from the input - therefore first need to
deceiver the input.
Basic code snippet to test the GPS unit.
AnsiString comstring;
comstring = MSComm1->Input.VOleStr;
if ( comstring > 1 )
{
Memo1->Lines->Add(comstring);
}
I downloaded the user manual for the specific model. The communications code and protocols is very complicated, but I will try to use their specs to deceiver the input.
If I don't figure it out then I'll throw something on the forum again.
One of my friends mentioned that it might be the settings of the Comm control.
The problem is that in C++ I still struggle with the data input - at the new settings. I have a problem converting the ASCII input correctly.
Q! What is the best and easiest way to convert an incoming string of ASCII characters to a string value. I have another app that controls a filter-wheel, and the positions are set by passing 251-259 to the controller, but I had to use the physical AnsiString value through the MSComm->Output for the system to work.
I know that by type casting the input value as int(input) it gives the correct integer value, but what is the reverse??