
## for sure upgrades:
1. UPGRADE TO PI5 8GB
   1. HARDWARE IMPROVEMENTS
      1. the Pi5 8GB/16GB
	  2. High stability USB-C power
		  1. quality GaN
		  2. behind surge protector (less ideal) or batt backup (ideal)
      3. Case ([amazon link to quality case](https://www.amazon.com/dp/B0CN8NQC47/?coliid=I25D7WU06WT9HS&colid=1ZF04J4MPX8Z9&th=1))
         1. Metal
         2. Quality
		 3. case has thermal paste/heats inks/fans
			1. [High quality thermal compound to attach to heatsinks](https://www.amazon.com/dp/B09VDLH5M6/?coliid=I2IGRDTAC7943I&colid=1ZF04J4MPX8Z9&th=1) 
		4. Fan controlled and monitored, heat monitored
			 1. Alarm for higher or lower than usual temp
			 2. output fan usage/history to log/telegraf/grafana every 5 seconds
			 3. output system temperature to log/telegrad/grafana every 5 seconds
			 4. output uptime/%CPU/%MEM to log/telegraf/grafana every 5 seconds
			 5. Exposes ALL GPIO and usb
      2. [Quality 512GB microsd (Sandisk Extreme Pro (latest model) 512GB)](https://www.amazon.com/dp/B0G8M74T13/?coliid=I2R7TER3Q0G09U&colid=1ZF04J4MPX8Z9&th=1)
      3. [20ft CAT8 Ethernet](https://www.amazon.com/dp/B0G8M74T13/?coliid=I2R7TER3Q0G09U&colid=1ZF04J4MPX8Z9&th=1)
	2. PCB HAT
	   1. MADE OF
		   1. PERF Board (have)
		   2. female to male pins, gold coated copper (have)
		   3. good leaded activated solder and activated flux (have)
		   4. Solid copper core plastic coated, colored wire
		   5. Clock pulse generator/frequency programmable dividers/multipliers (to get)
				1. 10mhz reference clock gpio pin input (from reference oscillator)
			    2. programmable low jitter clean quality programmable clock generators/frequency divider/multiplier (3.3v)
				  1. clock generator chips (these can take 10mhz/etc as input then multiply or divide the signal into a clean jitter free signal modified frequency output)
				 3. Texas Instruments LMK04832 (best, supports 54mhz, programmablew)
				     1. plus programming figured out
				6. Analog Devices ADF4351 (worse, doesnt natively support 54mhz, programmable)
				    1. plus programming figured out
		        7. 7490 IC 4-bit counter (div/5, div/2, together div/10) (cheapest, easiest, most common, can only convert 10mhz to 1mhz (div 5+2), 5mhz (div 2), or 2mhz (div 5))
				   1. plus programming figured out (shoudl just be setting/connecting/shorting some pins)
		2. UART gpio pins in/out (from NEO-10 gps timekeeping, pin in/out same as UART on NEO-10T) (3.3v)
	   3. i2c pins for high precision RTC module (3.3v)
	          1. and 3.3v lithium coin batt 
	   4. with NEO-10 gps module attached
		      1. room for 3.3v lithium coin batt on NEO-10 gps timekeeping
	  5. room for external antenna (have, get adaptor)
		  1. get adaptor for [IP65 IPEX (U.FL) to SMA](https://gnss.store/products/elt0179)
	  6. pps gpio pin input (from NEO-10 gps timekeeping)
			1. Solid Coper Wire ideally (have)
				1. _possibly_ with female/male pins crimped on?
					1. gold coated copper
					2. connection quality
					3. connection strength
			2. or stranded high quality copper jumper with gold coated copper pins
	7. (?) Logic shifters (high precision, arbitrary)
		1. like TXS0108E (have)
    8. SOFTWARE IMPROVEMENTS
		 1. OPERATING SYSTEM IMPROVEMENTS
	         1. Rpi os lite 64bit latest stable
	         2. disable and uninstall any unused services
             3. get list of registered services with

```bash
sudo service --status-all | tee -a "~/$(date +"%Y-%m-%d-%H%M-%S-%Z")_service-status-all.txt"
```

            4. uninstall any unused packages
	            1. get list of packages installed with

```bash
sudo apt list --installed | tee -a "~/$(date +"%Y-%m-%d-%H%M-%S-%Z")_installed_packages.txt"
```

      1. pin chrony/etc to one specific core?
      2. dial up NEO-10 gps timekeeping uart speed to highest practical baud rate
         1. to Pi5 GPIO
         2. to Ublox2 highest stable setting
            1. This will require serial interface with the chip
               1. normal pins for uart?
               2. usb d+ and d- lines?
               3. external uart to somewhere else
      3. OUTPUT IMPROVEMENTS
         1. remote hosted web apps (prolly node) that get goverened by grandfather clock over idk webrtc/websockets/mqtt/calling a page, whatever
            1. goven universal beat time web app
            2. govern a normal multi-tz grandmasterclock output web app
         2. highest possible accuracy/speed ntp/time server available
         3. Update Telegraf/Grafana/etc to log
            1. pps variance over four periods of time
               1. measure each pps, log exact value in telegraf->grafana
               2. Occasinoally calculate an average inaccuracy
                  1. Hourly (display in grafana view)
                  2. Daily (display in grafana view)
                  3. Weekly (display in grafana view)****
                  4. Monthly (display in grafana view)
               3. use average inaccuracy to develop multiplier/divisor in real time for chrony
            2. cpu speed variance
               1. Occasinoally calculate an average inaccuracy
                  1. Hourly (display in grafana view)
                  2. Daily (display in grafana view)
                  3. Weekly (display in grafana view)
                  4. Monthly (display in grafana view)
               2. use average inaccuracy to develop multiplier/divisor in real time
            3. checks against RTC
               1. Occasinoally calculate an average inaccuracy
                  1. Hourly (display in grafana view)
                  2. Daily (display in grafana view)
                  3. Weekly (display in grafana view)
                  4. Monthly (display in grafana view)
               2. use average inaccuracy to develop multiplier/divisor in real time
            4. checks against NTP burst
               1. Occasinoally calculate an average inaccuracy
                  1. Hourly (display in grafana view)
                  2. Daily (display in grafana view)
                  3. Weekly (display in grafana view)
                  4. Monthly (display in grafana view)
               2. use average inaccuracy to develop multiplier/divisor in real time
			5. telegraf->grafana
			    1. average hourly, daily, weekly, monthly erors average from
					1. NTP Burst check
					2. High quality RTC
				    3. Pulsar signals (later)
			  2. max/min error of
				   1. NTP Burst check
				   2. high quality RTC
				   3. os clock speed
			       4. pulsar signals (later)
				   5. each
					   1. Hourly
					   2. Daily
					   3. Weekly
					   4. Monthly
1. GPS MODULE TIMEKEEPING
   1.  new NEO-10 gps timekeeping one, one with a 3.3v battery input for hot/warm starts maybe the [139Euro NEO-F10T L1/L5/E5a Receiver](https://gnss.store/products/elt0184) (need) MAKE SURE YOUR ANTENNA PLUG MATCHES THIS FORMAT! NO SCREW ON MORE LIKE SMA attached
   2. maybe get the canonical antenna/cable/adaptors off same site: 
      1. (? not sure this is any better than my existing barrel antenna) [gps antenna](https://gnss.store/products/elt0140)
      2. (need) [gps antenna adaptor](https://gnss.store/products/elt0179)
      3. solder 3.3v lithium coincell battery/breakout to timekeeping gps (see datasheet)
         1. for hot and warm starts when power is lost
         2. to prevent pwoer loss of precision or accuracy
      4. see datasheet

2. HIGH PRECISION REFERENCE OSCILLATOR SHIT ([gps disciplined 10mhz rubidium reference oscillator](https://www.aliexpress.us/item/3256811412964525.html)) (neeed)
   1. options for adding external oscillator:
      1. desolder pi4's normal crystal and input 10mhz reference pulses after high precision multiplying/dividing to the expected value, then soldered in. high precision pi native clock
         1. crystal available internetally
         2. would make pi4s ops far more consistant speed
         3. no effect on pps accuracy
      2. desolder gps timekeeping crystal and wire in 10mhz reference through high precision frequency multiplier/divider and soldered in
         1. this will make the gps pps very very accurate
         2. will let pi5 just operate off of the high quality pps signal
      3. apply 10mhz reference clock to rpi x xtal 0,1 to get 10mhz signal inside pi (see pi4 datasheet/notes)
         1. recalibrate chrony/gpsd/etc to base time off of this input?
	         1. may require custom forks or other shenanigans
      4. use high precision frequency multiplier/divider to get 10mhz reference into useable frequency for timekeeping, then input via x xtal 0,1 (see pi4 datasheet/notes)
         1. then base chrony/gpsd/etc off of that clock?
3. PULSAR SHIT
   1. will need to use google starmap thing to identify the roughs of where the milisecond pulsars are
   2. 2+ RTL-SDR V4 s
   3. 2+ LNA (Low Noise Amplifiers)
      1. coax in and out
      2. low noise < 0.5db
      3. high gain > 20db
   4. BPF (Bandpass Filter) to block strong out of band sdignasls
   5. parabolic antennas (ali express)
      1. high gain
      2. 2.5-3 meter diamater
      3. tuned to 420–440 MHz (70cm band) and/or 1420 MHz (21cm band).
   6. wire to connect to RTL-SDR 4
   7. tripod/mount/adjustment mount (look into)
   8. maybe extra usb space