Narrative:

Started the airplane and contacted hwd clearance delivery (clearance delivery). I told clearance delivery that I was VFR going north. I was expecting a squawk code and departure instructions for transversing class C and class B airspace. Instead the controller suggested that I only needed to call clearance delivery if I had an IFR flight plan on file. I was caught off guard and became a bit flustered. He said I should call ground for taxi clearance. I contacted ground; received taxi clearance to runway 28L and proceeded to the run up area. I proceeded to runway 28L at A1 and requested clearance for takeoff; requested a left 270 turn off runway 28L to avoid the noise sensitive areas; and I believe I also indicated that I wanted to go north. I was cleared for take off and the left 270 turn with an altitude restriction of 1;000 feet. After takeoff; I executed the 270 and held 1;000 feet MSL. After I crossed mid field I headed north. Very soon after that the controller had me make two 10 degree right turns. I violated the class C airspace at oakland. These turns had me headed into the hills to the east of the airport. With the low ceilings; the terrain soon became an issue. I was caught up in trying to decide what to do. I did not assert my authority as PIC and continued to follow the direction of the controller instead of making a turn to the south. As I was evaluating what I should do; the tower released me from their control and gave me permission to change frequencies. I asked for the frequency of departure in that area and he gave it to me. By the time I realized I should have gone south; and because I was not staying on top of the speed of the airplane; I found myself in a place where making a turn was unsafe and I was concerned that I would impact terrain. I decided to execute an unauthorized climb through the fog layer. At around 1;800 to 2;000 MSL I broke through and was on top of the fog layer and out of danger of the mountains. I failed to contact departure and because of the situation around me; I was not referring to my VFR charts. I believe that my assent through the clouds continued and I leveled off at 4;500 feet. It wasn't until a couple of days later that I realized that I may have busted class B in my assent through the clouds as I did not stop below 4;000 feet. I believe that I would have avoided this scenario if I had taken the initiative and gotten a squawk code before I departed from hayward. At other airports; calling clearance delivery gets you a squawk code. In retrospect I should have a checklist of things that I want to have before I depart an airport inside the class C airspace. One of those things is a squawk code so that when I leave class D; I am handed off to departure. This would have avoided the problems with class C that put me in a situation where I had to illegally go through the clouds to avoid an impact with terrain.

Google
 

Original NASA ASRS Text

Title: Pilot of an unidentified small aircraft departed HWD VFR and; after receiving vectors out of OAK Class C; felt that it was unsafe to turn further toward the south due to low airspeed and climbed through the overcast to avoid terrain. Pilot attributed the errors and confusion to not being given a discreet transponder code for the departure.

Narrative: Started the airplane and contacted HWD CD (Clearance Delivery). I told CD that I was VFR going north. I was expecting a squawk code and departure instructions for transversing Class C and Class B airspace. Instead the Controller suggested that I only needed to call Clearance Delivery if I had an IFR flight plan on file. I was caught off guard and became a bit flustered. He said I should call Ground for taxi clearance. I contacted Ground; received taxi clearance to Runway 28L and proceeded to the run up area. I proceeded to Runway 28L at A1 and requested clearance for takeoff; requested a left 270 turn off Runway 28L to avoid the noise sensitive areas; and I believe I also indicated that I wanted to go north. I was cleared for take off and the left 270 turn with an altitude restriction of 1;000 feet. After takeoff; I executed the 270 and held 1;000 feet MSL. After I crossed mid field I headed north. Very soon after that the Controller had me make two 10 degree right turns. I violated the Class C airspace at Oakland. These turns had me headed into the hills to the east of the airport. With the low ceilings; the terrain soon became an issue. I was caught up in trying to decide what to do. I did not assert my authority as PIC and continued to follow the direction of the controller instead of making a turn to the south. As I was evaluating what I should do; the Tower released me from their control and gave me permission to change frequencies. I asked for the frequency of Departure in that area and he gave it to me. By the time I realized I should have gone south; and because I was not staying on top of the speed of the airplane; I found myself in a place where making a turn was unsafe and I was concerned that I would impact terrain. I decided to execute an unauthorized climb through the fog layer. At around 1;800 to 2;000 MSL I broke through and was on top of the fog layer and out of danger of the mountains. I failed to contact Departure and because of the situation around me; I was not referring to my VFR charts. I believe that my assent through the clouds continued and I leveled off at 4;500 feet. It wasn't until a couple of days later that I realized that I may have busted Class B in my assent through the clouds as I did not stop below 4;000 feet. I believe that I would have avoided this scenario if I had taken the initiative and gotten a squawk code before I departed from Hayward. At other airports; calling Clearance Delivery gets you a squawk code. In retrospect I should have a checklist of things that I want to have before I depart an airport inside the Class C airspace. One of those things is a squawk code so that when I leave Class D; I am handed off to Departure. This would have avoided the problems with Class C that put me in a situation where I had to illegally go through the clouds to avoid an impact with terrain.

Data retrieved from NASA's ASRS site and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.