Go Down

### Topic: problems combining millis() and GPS timekeeping (Read 6852 times)previous topic - next topic

#### pito

#15
##### Jan 30, 2013, 11:18 pmLast Edit: Jan 30, 2013, 11:35 pm by pito Reason: 1
The 1sec pulse from a GPS module is not exactly 1sec. It has a jitter (~few milliseconds) thus the short time precision is poor. Only when averaged over a longer time period (~hours) it follows the "GPS" precision, however. Normally, you do not want to use 1sec pulses from a GPS module for a measurement. It is used for disciplining of a quality crystal oscillator (ie 5-10MHz) instead. Google "crystal oscillator disciplining"..
http://en.wikipedia.org/wiki/GPS_disciplined_oscillator

#### Jack Christensen

#16
##### Jan 31, 2013, 01:26 amLast Edit: Jan 31, 2013, 01:28 am by Jack Christensen Reason: 1

The 1sec pulse from a GPS module is not exactly 1sec. It has a jitter (~few milliseconds) thus the short time precision is poor. Only when averaged over a longer time period (~hours) it follows the "GPS" precision, however. Normally, you do not want to use 1sec pulses from a GPS module for a measurement. It is used for disciplining of a quality crystal oscillator (ie 5-10MHz) instead. Google "crystal oscillator disciplining"..
http://en.wikipedia.org/wiki/GPS_disciplined_oscillator

I wondered about short term jitter and yes I am aware of disciplined oscillators. Yet, using this technique, I have measured several µCs with crystals for their system clock, and having one of the timers set to create a 1MHz output, I can watch the readings for minutes at a time and I usually don't see more than a single digit bobble. A few milliseconds jitter would cause variations of thousands of Hertz. Perhaps this particular GPS receiver uses a disciplined oscillator for its 1 PPS output. Don't remember but I'll double check the datasheet.

Here is some typical output, I was fairly amazed. Just the first minute's worth in the quote but the attached file has ten minutes or so. I've checked this particular unit several times over as many days, and the frequency is always the same, so I'm not seeing any longer-term variation either.

Code: [Select]
`GPS Frequency Counter2: 1,000,003 Hz4: 1,000,003 Hz6: 1,000,004 Hz8: 1,000,003 Hz10: 1,000,003 Hz12: 1,000,003 Hz14: 1,000,004 Hz16: 1,000,002 Hz18: 1,000,003 Hz20: 1,000,003 Hz22: 1,000,003 Hz24: 1,000,003 Hz26: 1,000,003 Hz28: 1,000,003 Hz30: 1,000,003 Hz32: 1,000,000 Hz34: 1,000,003 Hz36: 1,000,003 Hz38: 1,000,003 Hz40: 1,000,003 Hz42: 1,000,003 Hz44: 1,000,003 Hz46: 1,000,003 Hz48: 1,000,003 Hz50: 1,000,003 Hz52: 1,000,003 Hz54: 1,000,003 Hz56: 1,000,003 Hz58: 1,000,003 Hz60: 1,000,003 Hz`

#### michinyon

#17
##### Jan 31, 2013, 03:32 pm
Which GPS are you using to get 40 samples per second ?

#### Jack Christensen

#18
##### Jan 31, 2013, 04:08 pm

Which GPS are you using to get 40 samples per second ?

I read that he was logging data 40/sec, not that the GPS was providing updates at that rate.

Go Up

Please enter a valid email to subscribe