I am not sure where do you get that formula from. In my understanding, you just need to convert RGB to YUV and just keep the Y which you should get grayscale.
You will be able to find the RGB to YUV conversion equation easily on internet.
If you have seen the colour triangle, you will realise that the reciprocal of the distances of the corners i.e. the colours RED, GREEN and BLUE from the white spot in the interior are in the ratio 0.3:0.59:0.11. That would mean that closer the colour to the white spot, greater its contribution to the intensity which is represented by the grayscale.