You've done a lot of licensed work for various properties (40k, Star Trek, Star Gate, Doctor Who, Blakes 7 etc, etc). How much research do you typically do for the various properties? Are you provided with background information, or is it a case of breaking out the various DVDs and sitting down and watching them?
I tend to write for IPs that I enjoy and am a fan of, so usually I already have a working knowledge of the fictional world. Some franchise owners will help out and supply research materials, others will expect you to do that all yourself. Generally, I'll do my best to read up on (or watch or play) as much of the source material as I can to steep myself in the tone of the fictional world and the characters within it.
In a lot of ways, writing in an established fictional universe is no different from writing something set in a different historical period (except one is real and the other isn't!), because to make a story in either of those settings seem authentic, you have to understand the 'reality' of that world and make sure the tale you're telling feels correct.