Smooth shaded model has odd shading I'm currently working on a model of an X-wing that I'm intending for use in a game and running into a bit of trouble with the shading of the mesh. The upper nose is rounded off where the sensor cone attaches, but at the point it reaches the canopy frame it flattens out and meets at a corner.

Everything is fine and dandy when the sides are modeled:



but once I close it off and add the top of the nose, the shading goes to hell:



As you can see, the smoothing gets confused at the lip of the cockpit.

I've tried a couple different means of getting around this, none of which looks right while maintaining the correct shape. The transition from the rounded to flat is a fairly important part of the ship's character, so I don't want to discard the contours, either.

Any tips or suggestions on modeling this area?

Addendum:

If I eliminate that second angle where the canopy frame meets the fuselage as marked in red:



this also fixes the smoothing. However this is not a solution, as the angle is a part of the design. It DOES give me another thought on fixing, but I won't be able to test it until I get home.
This is because your mesh edges change direction sharply. It's unavoidable by default unless you add supporting geometry to make the transition smoother. 

The image below shows 3 similar cylinders that were smooth shaded. The first has a ngon capping the top, the second is capped with triangles and the last has a ngon cap but has a bevel around the edge. Notice that the 3rd cylinder doesn't have any weird shading since we eliminated the sharp edge.



So to fix, add supporting geometry by beveling your edges to avoid sharp curves and turns.

Another fix is to just add an Edge Split modifier. The cylinder on the left is the default one shaded smooth, the other one has the modifier. This won't always just work out of the box though for more complicated shapes and might require some tweaking.