The answer to that is "it depends".
Windows are known to work, but not all windows are made equal. Which direction your window is facing and whether you are in an urban canyon can make significant difference. Some windows also have films or coatings.
If you are working in tricky situations, then the quality of your antenna and the quality of your receiver will make a difference (e.g. multi-constellation support, interference mitigation, multipath rejection etc. etc.).
If you do not have access to a workable window, then your alternative options are:
- Accept slightly lower accuracy and use LW radio instead (e.g. MSF, DCF etc.)
- Rent a leased line to your country's national time laboratory. They will deliver you certified, traceable time with no roof access required and microsecond accuracy (backed by an SLA, i.e. accurate or your money back).
- Run a long cable to the roof (if money is no object you can even get super fancy setups that run exclusively on fibre, no coax in sight)
- Install an internal GNSS repeater system (still involves roof install, but gives you *much* more flexibility indoors for obvious reasons).AIUI, urban canyons was one of the reasons why Japan built their QZSS system:
* https://en.wikipedia.org/wiki/Quasi-Zenith_Satellite_System
Other methods for obtaining times are:
- GPS: Satellite receiver for the Global Positioning System
- GNS: Combined GPS/GLONASS/Galileo/BeiDou satellite receiver (L1 frequency band), can also be used for mobile applications
- GNS-UC: GPS and Galileo Satellite Receiver with Up Converter for Meinberg GPS Antenna/Converter
- PZF: DCF77 correlation receiver for middle europe
- MSF: Long wave receiver for Great Britain
- WWVB: Long wave receiver for the US time signal
- TCR: Time code receiver for IRIG A/B, AFNOR or IEEE1344 codes
- MRS: (GPS, PPS, 10MHz, NTP): Multi Reference Source - several reference source
For professional setups, typically you'd have a coax going from the roof somewhere to the rack inside the data center where your time server is located.
I built a clock with a GNSS module and it gets enough of a signal by the window to keep time fine but I wouldn't rely on it.
Imprecision in GPS (GNSS in general) solutions comes from a number of sources: Orbital errors in the satellite ephemerides, atmospheric distortions to the signal, multipath at the receiver antenna, and a bunch of minor stuff we're not gonna worry about. Those are the big three.
Orbital errors, you can't do anything about. Post-processing allows _position_ solutions to be corrected once the errors are known (a process that takes hours or days after the fact, to work back where the satellites must've actually been) in a process called Precise Point Solution, but that doesn't apply to [this kind of] timing.
Atmospheric errors you can kindof do something about. Signals from satellites lower to the horizon take a longer path through the atmosphere, so they tend to have wackier pseudoranges. Most timing-grade receivers have a default "elevation mask" of 15 or 20 degrees above the horizon, to simply not even bother with these crap signals, and derive timing only from what's left. (There are of course atmospheric models and corrections to apply, but these are applied to everything. Still, start with a cleaner signal and you'll end up with a cleaner result.) This means you need clear sky view to the middle of the sky, in order to raise the chances of an adequate number of satellites passing the elevation mask.
Multipath is huge. The reason survey-grade antennas have these enormous choke-ring structures around them is to eliminate multipath reflections off the surface of the ground below. Even cheap little antennas try to be more sensitive to signals from above than below, to limited success. (Especially if they're wrist-worn and thus not orientation-controlled. Ugh.) Any situation where the antenna is subject to multipath will have demonstrably worse precision as a result. So, most timing antennae are considerably elevated (gives the reflections an opportunity to fall apart), shielded (choke-ring mounts), or both. Cellular sites usually go with the elevation option since there's already a giant lightning-rod nearby, elevating the GPS antenna doesn't come with additional risk for the receiver.
Worse GPS reception means the receiver has a noisier signal to start with, and can't discipline its local oscillator as tightly. Even if you don't care about nanoseconds in the final application, you probably do care about _holdover performance_. And if your LO can be disciplined with nanosecond-accurate signals in the first place, it'll hold millisecond-accurate timing for days or weeks in a GPS outage. If the disciplining process is crap, the holdover will also be crap.
In a typical real life scenario where the GPS / antenna malfunctions, your server clock will just slowly.. drift.. I.e. the crystal runs a bit too fast or a bit too slow.
Edit: and for that matter even ntpd/chrony does this tuning in software and can compensate for imprecise and/or slowly wandering host clock generator (obviously it cannot compensate for abrubt changes and intentionally does not even try to).
https://csrc.nist.gov/glossary/term/disciplined_oscillator_d...
For a quartz oscillator, it's typically done by holding the crystal at a constant temperature ("ovenized", "oven controlled"), and then varying its loading capacitance by manipulating the reverse bias voltage of a varactor (a diode whose junction capacitance varies in a well-defined way according to applied voltage). You connect a lots-of-bits DAC and a very stable amplifier to the varactor, and keep all those pieces inside the same oven so they're all isothermal.
Apply a very long time constant (typically on the order of 11h58m out to maybe 2 weeks) to the control loop that drives the DAC, and after a few loop-times you've got a quartz crystal whose period is precisely tuned and whose behavior will remain incredibly stable when the disciplining reference goes away. (As long as you're smart enough to notice the loss of reference and freeze the DAC value, rather than naively assuming there's an enormous difference and slamming the control loop against a limit and destroying your carefully-honed performance. Which is what pretty much everyone implementing this from scratch does at least once.)
For rubidium atomic clocks, the disciplining process is usually done by varying the magnetic field applied to the vapor cell. Since these work by measuring the energy absorbed by a specific hyperfine transition, but that energy is only well-defined at zero static magnetic field, it's necessary for the physics package to cancel out the Earth's magnetic field. This is done with a set of Helmholtz coils, but how do you know how much current to put through them? By comparing the measured frequency with an external reference of higher quality. Since Rubidium oscillators are inherently several orders of magnitude more stable than quartz, this is done with very long time-constants (since any apparent error is probably jitter on the GPS receiver's part).
Ovenized quartz GPSDOs are common at cellular tower sites, whereas rubidium finds more application at central offices. I own clocks that exploit both of these mechanisms. (The rubidium is down right now while I build a new DAC for the tuning voltage that drives the coil current amplifier.)