hello, managing list from a gps device

Aug 25, 2007 at 5:42pm

hello, managing list from a gps device

hello list!
this is my first call to you.
I am having problems getting clean data from a gps device.
when i print them out of the [ mxj.net.receive objects] to the max
window,
the list is somehow managable. But when i try to [prepend set ] the
message
into a new message it appears like this:
“$GPGSA,A,3,05,06,21,24,30,,,,,,,,08.7,05.1,07.1*0A”
so my problem is: how to get rid of this slash?
(i have tried with [jsregexp] but i think the manipulation about this
character “” is far outof my knowledge.
could you help me please?
thx

#33407
Aug 25, 2007 at 7:29pm

Hello there,

the backslash is a bit tricky in max as it is an escape character which tells Max to ignore any special meaning attached to the following character. Try sending “special, test” and “special, test” to print and you’ll see what i’m talking about.

Though i don’t have time to explain all the ins and outs of it here is an annotated patch showing how to filter the “,” part of the message.

You’ll need to do more filtering to get something usable i imagine.

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 501 148 72 196617 comma\, test;
#P message 415 148 84 196617 one comma , test;
#P newex 415 182 32 196617 print;
#P message 69 208 20 196617 32;
#P newex 69 104 51 196617 tosymbol;
#P comment 139 257 207 196617 convert back to ASCII;
#P newex 97 256 40 196617 itoa;
#P message 97 305 765 196617 “$GPGSA A 3 05 06 21 24 30 08.7 05.1 07.1*0A”;
#P newex 97 283 62 196617 prepend set;
#P comment 139 234 207 196617 collect back into a list;
#P newex 97 230 39 196617 thresh;
#P comment 110 185 244 196617 use sel to replace out the ‘ , ‘ char (44) with a space;
#P newex 69 182 38 196617 sel 44;
#P comment 110 155 125 196617 spit out ints one at a time;
#P newex 69 128 40 196617 atoi;
#P message 69 83 376 196617 $GPGSA\,A\,3\,05\,06\,21\,24\,30\,\,\,\,\,\,\,\,08.7\,05.1\,07.1*0A;
#P newex 69 155 25 196617 iter;
#P comment 110 131 181 196617 ASCII character to integer conversion;
#P connect 5 0 14 0;
#P connect 17 0 15 0;
#P connect 16 0 15 0;
#P connect 3 0 1 0;
#P connect 13 0 3 0;
#P fasten 14 0 7 0 74 226 102 226;
#P connect 5 1 7 0;
#P connect 1 0 5 0;
#P connect 2 0 13 0;
#P connect 11 0 9 0;
#P connect 7 0 11 0;
#P connect 9 0 10 0;
#P window clipboard copycount 18;

#111279
Aug 25, 2007 at 7:48pm

#111280

You must be logged in to reply to this topic.