I'm building a monitor for my Trimble GPSDO based on a STM32F4 driving a 3.5" screen at 480x320. What a lot of fun.
So far, I'm receiving the TOD from the dedicated TOD USART entirely via DMA and interrupts - no loop. The alternate/fake seconds are filled in via counter/interrupt, as well. The most time consuming portion, besides waiting for data, is drawing to screen, obviously. But, I have it down to less than 240 microseconds per clock digit change and only updating the digits that changes.
The time is computed on the fly, converting the GPS seconds to UTC via Modified Julian Date. I'm amazed that the math to convert to MJD and back is only a few hundred cycles on the 168MHz MCU - hardly any time at all.
Leap seconds are added when available on the TOD stream.
I'm updating to the screen the PPS and DAC values each second, as well. The Sat data is split between POSSTAT and SYST:STAT?, alternating on each second. It seems the El and Az data is only available from SYST:STAT?, so you have to match the Sat ID/PRN from POSSTAT to the SYST:STAT? data. Can create messy issues if the data changes between the two USART transfers.
I'd like to create a plot of the DAC, PPS, and OSC, as well as a scattergram/skyplot as texaspyro has done in LH, but haven't quite got that down yet. texaspyro has done some amazing work with his software.
However, I got a whole bunch of questions to ask those that would know:
- I'm confused by the definition of “Tracking”. What does “tracking”, as provided by POSSTAT mean compared to “tracking” in SYST:STAT? I found out the hard way that the actual tracked sats should be parsed from “position available”
- There are supposedly 10 different TFOM values (0-9). I’ve seen the first 4 and the last one described, but not 4 through 8. When I try to interpret it and break it out, it doesn’t end as “9 = > 1ms”. Below is what I break it down to. Clearly something is not matching up:
“0 = < 1ns", “1 = 1-10ns", “2 = 10-100ns", “3 = 100ns-1us", “4 = 1-10us", “5 = 10-100us", “6 = 100us-1ms”???, “7 = 1-10ms”???, “8 = 10-100ms”???, “9 = 100ms-1s”???, “10 = > 1s”??? Do we skip the “100ms-1s”? - Where does OSC data come from and how is it calculated? Next to the PPS, this is the most valuable piece, as it relates to the GPSDO's performance.
- What does a negative DAC % value mean? This one I have now is at -11.30 %. The previous one was 5.xx %. Don’t remember if it was negative. It's a percentage of the 5v, correct (for UCCM-P Trimble)? So, what does negative mean?
- Is the info from DIAG:LOOP? of any value to monitor? If so, what part?
- What is referred to by phase in SYST:STAT? and is it related to SYNC:TINT? Haven’t been able to determine that it IS actually the PPS Time Interval
- Building Skyplot/scattergram: Is there a good reference/source for computing the spot based on EL/AZ. Google hasn't been helpful. This isn't a popular topic, apparently.
![Tongue :P](https://www.eevblog.com/forum/Smileys/default/xtongue.gif.pagespeed.ic.J5mTe0A2NA.png)
best regards,
MAJ
![](https://dl.dropboxusercontent.com/u/1180773/GPSDO_screen.jpg)