How to estimate total gps of the whole grin network at specific block height?

how to estimate total gps of the whole grin network at specific block height based on difficulty and secondary_scaling ?

See https://forum.grin.mw/t/on-dual-pow-graph-rates-gps-and-difficulty