# I have GPS, SONAR and two BLDC motors connected. I have to send data to my PC. I have radio-link. How can I send this data?

#### umerrai1

Joined Mar 29, 2021
233
I am having some issues with my laptop because of this I could not connect the weather station with it. Once I will do this then I will let you know.

#### umerrai1

Joined Mar 29, 2021
233
This is the code I got from arduino library. It is working withmmy ds1307. Now is there any easy way to convert its seconds to milliseconds?

#### Attachments

• 906 bytes Views: 1

#### umerrai1

Joined Mar 29, 2021
233
Then do the NMEA strings include timestamps? The weather station can provide 10 Hz GPS, maybe you could just run log.
We need a date also with log

#### Yaakov

Joined Jan 27, 2019
3,317
We need a date also with log
So get the date from the RTC. The RTC cannot provide milliseconds or anything smaller than a second. You would have to count those yourself and you really don’t want to.

#### umerrai1

Joined Mar 29, 2021
233
If I divide seconds by 10, will it work?

#### Yaakov

Joined Jan 27, 2019
3,317
If I divide seconds by 10, will it work?
I don't understand your thinking. Let's say it is the tenth second of the minute and you divide by 10, what do you get?

You only have one second resolution, all 1000 milliseconds of that second have the same identity.

#### umerrai1

Joined Mar 29, 2021
233
You are right sir. But What I want to say is this, for example, we are receiving messages from a device at 10Hz, so, if I divide 1 second by 10 I will get a fraction of a second. So, for example, if I get a message at 11:16:01.05 (HH: MM: SS) so next message will get a timestamp of 11:16:01.15.

#### Yaakov

Joined Jan 27, 2019
3,317
You are right sir. But What I want to say is this, for example, we are receiving messages from a device at 10Hz, so, if I divide 1 second by 10 I will get a fraction of a second. So, for example, if I get a message at 11:16:01.05 (HH: MM: SS) so next message will get a timestamp of 11:16:01.15.
What tells you the sequence of the messages? The RTC only changes each second. What will tell you which .1s the logged message arrived? If you are only concerned about temporal sequence, just append a the last 3 digits of millis() to the time, that will get you a relative and unique time stamp—assuming I understand what you are trying to do.

It is important to note that if you want the milliseconds or tenths to relate to ANY OTHER CLOCK, you will have to do a lot of work and probably use some external processing to get a good result.

#### Yaakov

Joined Jan 27, 2019
3,317
By the way, the method I am describing is not very rigorous and since the millis() clock is not synced with the RTC, I think it will sometimes put lower numbers on a later message. But the sequence in the log tells you the order, a little math during log analysis ought to be able to figure out the cycle and properly order the messages with the accuracy millis() provides.

#### Yaakov

Joined Jan 27, 2019
3,317
Hmm... let me revise my suggestion.

Log using the RTC, then also record ALL of the output of millis() in the log entry. The first pass is the order in the log, it will tell you in which second it occurred in RT, the second is the millis() count, it will tell you how far apart each message happened by subtraction.

#### ericgibbs

Joined Jan 29, 2010
13,221
hi ume,
I have over 30 years of experience designing and manufacturing marine survey electronic quipment.

There is no reason to time tag echo sounder depth readings at 100mSec intervals.

Your GPS will only give an approximate position every one second.
That is approx 10 soundings per one second position fix.
So the depth sounds are already at approx 0.1 sec intervals, so why time stamp them.??

Who is writing the specification for this survey project.??
E

#### umerrai1

Joined Mar 29, 2021
233
Sir there are no specifications written for this project. Every day boss says a new thing. So, I cannot say NO on the spot but I have to convince him that millis are not that much important and also difficult to synchronize with an actual clock.

#### ericgibbs

Joined Jan 29, 2010
13,221
hi ume,
Now I understand your work problem.

On a project as complex as this, it is important that you have an agreed written specification.

If not, the project will never get completed and the money/ time will be wasted, also you will get the blame for the failure.

Has the Boss ever managed a marine survey project.??

E

#### umerrai1

Joined Mar 29, 2021
233
Our company has a positioning system software. Which is made by our company.

#### Attachments

• 1.5 MB Views: 1

#### umerrai1

Joined Mar 29, 2021
233
Respected Members,
Can I select multiple baud rates at one time at one serial port?

#### Yaakov

Joined Jan 27, 2019
3,317
Respected Members,
Can I select multiple baud rates at one time at one serial port?
No. You can change the rate sequentially but can't use more than one at a time.

#### umerrai1

Joined Mar 29, 2021
233
Sir, what is the solution for this?
I have one serial port and cannot change the baud every time I connect different equipments.

#### Yaakov

Joined Jan 27, 2019
3,317
You will need more hardware.

#### ericgibbs

Joined Jan 29, 2010
13,221
Do you mean more that one serial input at the same time or just one at a time by plugging them in as required.??