• Support
  • Articles
  • Resources
  • Products
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead

Sending NMEA data sentences

Moderator: boris

18 postsPage 1 of 1

Camerart
Beginner

Posts:
29
Joined: Mon Mar 09, 2015 9:07 am
by Camerart » Fri Apr 03, 2015 2:59 pm
Hi,

I'm trying to emulate the data form a GPS module NEO-6.
e,g,
$GPRMC,090824.00,A,5120.77814,N,00200.93002,W,0.263,,100315,,,A*6F
$GPVTG,,T,,M,0.263,N,0.486,K,A*2E
$GPGGA,090824.00,5120.77814,N,00200.93002,W,1,05,2.83,11.8,M,47.7,M,,*72
$GPGSA,A,3,02,23,09,10,06,,,,,,,,6.04,2.83,5.34*06
$GPGSV,3,1,10,02,40,300,25,03,17,104,,05,05,286,,06,63,225,26*76
$GPGSV,3,2,10,07,33,155,23,08,12,030,34,09,82,087,32,10,64,289,26*78
$GPGSV,3,3,10,23,49,063,14,29,04,343,15*7B
$GPGLL,5042.77814,N,00200.93002,W,090824.00,A,A*77

With the GPS Module I receive only one location because it is stationary.

I want to copy similar data examples, and change the information for a test, then send it to the test circuit, with Teraterm.

I am able to send it ok, but it doesn't work, as I'm sure it needs Carriage return or line feed or similar syntax.

Can someone change the above data, so that it is correct to send, please?

Camerart.
Trevor
Guru

Posts:
485
Joined: Wed Jul 26, 2006 8:47 am
by Trevor » Mon Apr 06, 2015 9:27 am
Hi,
Are you sending from a macro? If so include the code here so we can help. If not please specify exactly how you are sending the data. And maybe define what "but it doesn't work" means.

Trevor
Camerart
Beginner

Posts:
29
Joined: Mon Mar 09, 2015 9:07 am
by Camerart » Mon Apr 06, 2015 9:41 am
Trevor
Guru

Posts:
485
Joined: Wed Jul 26, 2006 8:47 am
by Trevor » Mon Apr 06, 2015 9:50 am
Camerart
Beginner

Posts:
29
Joined: Mon Mar 09, 2015 9:07 am
by Camerart » Mon Apr 06, 2015 10:27 am
Here's an attachment.

This is the code I've been working with.

I've tried to add a for next loop, and it looked almost ok:)

Camerart.

Attachments

NMEAsentences.ttl
(605 Bytes) Downloaded 131 times
Trevor
Guru

Posts:
485
Joined: Wed Jul 26, 2006 8:47 am
by Trevor » Mon Apr 06, 2015 10:41 am
I meant the NMEA text file (as you asked about its line endings).

Also you need to consider flow control. Your GPS will send a few strings with a one second gap. With your macro there is no gap so you will run into flow control issues if you are not careful.

Trevor
Camerart
Beginner

Posts:
29
Joined: Mon Mar 09, 2015 9:07 am
by Camerart » Mon Apr 06, 2015 2:53 pm

Attachments

NMEAsentencesfornext.ttl
(670 Bytes) Downloaded 106 times
Trevor
Guru

Posts:
485
Joined: Wed Jul 26, 2006 8:47 am
by Trevor » Mon Apr 06, 2015 3:03 pm
no, I need the file you are reading into your macro i.e. 'C:\Users\Brunel\Desktop\Teraterm and Putty\MACROS\NMEAsentences.txt' as refereed to in your macro (not the macro file)

It's not a matter of the question being too "tall", it's a matter of you supplying enough information for us to know what you are doing. Currently I'm having to guess at too many unknowns.

Flow control will be an issue on your PIC if it is designed to process a few strings a second but now has to process them with no gap. A simple gap between sending strings is probably all you need to address this.

Trevor
Camerart
Beginner

Posts:
29
Joined: Mon Mar 09, 2015 9:07 am
by Camerart » Mon Apr 06, 2015 3:51 pm
Last edited by Camerart on Mon Apr 06, 2015 5:19 pm, edited 1 time in total.
Trevor
Guru

Posts:
485
Joined: Wed Jul 26, 2006 8:47 am
by Trevor » Mon Apr 06, 2015 4:04 pm
Hi Camerart,
Did you forget to attach the file to your last post?

Trevor
Camerart
Beginner

Posts:
29
Joined: Mon Mar 09, 2015 9:07 am
by Camerart » Mon Apr 06, 2015 5:11 pm
Trevor
Guru

Posts:
485
Joined: Wed Jul 26, 2006 8:47 am
by Trevor » Mon Apr 06, 2015 5:19 pm
As I said previously I can't see the line endings if you just paste it into the post! Line endings are invisible -- I need the actual file you are using. I also asked what you mean when you said the data looked different when you looked at it with another FTDI serial port i.e. what exactly did it look like?

I don't have crystal ball so unless I have all the facts I can't tell you what's wrong. If I had al the facts I could probably sove this in 10 seconds but I'm going to give up now.
Camerart
Beginner

Posts:
29
Joined: Mon Mar 09, 2015 9:07 am
by Camerart » Mon Apr 06, 2015 6:41 pm
Hi Trevor,

I changed the .TXT to .TTL and this time it has allowed me to send the file, if you change it back to .TXT, does it show you what you want

If not thanks for your patience.

Camerart.

Attachments

NMEAsentences.ttl
(5.43 KiB) Downloaded 106 times
Trevor
Guru

Posts:
485
Joined: Wed Jul 26, 2006 8:47 am
by Trevor » Mon Apr 06, 2015 7:53 pm
Camerart
Beginner

Posts:
29
Joined: Mon Mar 09, 2015 9:07 am
by Camerart » Tue Apr 07, 2015 8:48 am
Hi Trevor,

Thanks for your program.

Your program sends sentences one at a time. You will notice there are 8x different $GPXXX sentences. Is it possible to send the batch of the 8x different sentences, then a 1 second gap then 8x sentences etc please?

All aligned to the left of the page.

Camerart.
Trevor
Guru

Posts:
485
Joined: Wed Jul 26, 2006 8:47 am
by Trevor » Tue Apr 07, 2015 10:25 am
Camerart
Beginner

Posts:
29
Joined: Mon Mar 09, 2015 9:07 am
by Camerart » Tue Apr 07, 2015 12:43 pm
Hi Trevor,

Your program is working perfectly.

Thanks very much.

Sorry about the initial TXT problem

Camerart.
Trevor
Guru

Posts:
485
Joined: Wed Jul 26, 2006 8:47 am
by Trevor » Tue Apr 07, 2015 12:50 pm
Great, glad to hear that Camerart.
Display posts from previous:
Sort by:

18 postsPage 1 of 1

Users browsing this forum: No registered users
cron