Simulation of LC Oscillator in Rust

Over Christmas I started thinking about LC Tank Oscillators, especially as used on early Spark-gap radio transmitters.  For no particular reason (except for fun) I decided to try to simulate simple LC and LCR  oscillators from first principles in Rust.  The simulations worked out quite well but need a bit more work as they are unstable at higher frequencies (I couldn’t achieve middle C!)

The Rust code and a description can be found here:  rc-sim