I need to write two functions to calculate the speed and the $fine for over speeding. The formula I need to use is: V = c * (W0 – W1) / W0
I wrote the function to calculate the speed, but the results are incorrect, using the formulas below.
V = speed
C = speed of light (669,600,000 miles per hour)
W0 = wavelength of red light (.533 microns)
W1 = wavelength of green light (.674 microns)
V = 669600000 * (.674 - .533 ) / .674
The formula is correct, except that the values of microns are incorrect. The assigned value (.533 & .674) needs to be converted into miles, but even when I did the conversion, the results are still not correct.
.533 microns converted to miles per hour = 3.311908
.674 microns converted to miles per hour = 4.188042
I would appreciate if someone can tell me what type of conversion I need for the microns, I would greatly appreciate it.