You might be required to notify both your equivalent of the driver's licence department and almost certainly your CAA since you will be hospitalised. I suspect your CAA will then class you temporarily unfit. Your AME will notice the scarring at your next medical so you can't very well fudge the thing.
You should expect to be in hospital for ten days and in bed for four ie: a bedpan job although the physiotherapists may briefly have you up on a zimmer frame on day one and daily thereafter.
Six weeks would, in my experience, be a minimum. If you start getting into cars and climbing into aircraft, you run the serious risk of dislocating your hip. That is extremely painful, will require an ambulance job to hospital and will probably put you back to square one. I don't think your own body is going to want to let you do that. You are likely to need raised toilet seats and if you live in a house with stairs, you'll probably have to go up them on hands and knees for a while.
If you give it time you are very likely to be able to get back to karate but if you don't sleep with a pillow between your legs for a month or whatever your surgeon tells you to do, you may regret matters mightily. It's major surgery and recovery should be treated with respect. You will have to learn how to walk all over again. Practice balance exercises with a frame once you get strong enough in the operated hip. Your goal should be to eventually balance on one foot for a minute.
I have no medical qualifications but have been to Birmingham. Good luck-it will come right if you work at it and respect your limitations - like instructing?