There was a thread on here entitled Fuel Consumption and other Fuel related data from basic OBD-II parameters where the author was concerned about fuel consumption. While the question was never "answered", there was an article posted which sheds light on your question. It is a PDF entitled Estimation of Fuel Consumption using In-Vehicle Parameters, by Min Goo Lee, Yong Kuk Park, Kyung Kwon Jung, and Jun Jae Yoo (sorry, I need to give the authors credit here). Their purpose in the article was to estimate fuel consumption through the OBD-II system.
What, you ask, does this have to do with your question? The two main factors these individuals used to provide their datum is RPM (engine speed) and TPS (Throttle Position Sensor). In their article, they provide a couple of graphs which are very telling. The first graph (which is their figure 8), shows Fuel Consumption versus engine speed.
Each one of the blue "X"'s is a data point. The first time I looked at this graph, I was perplexed as to why there would be a bunch of data points showing no (ie: zero, zed, nil, none, nada) fuel consumption between ~1000-1500 rpm. Then I realized when a vehicle is coasting with the foot off the throttle, fuel consumption goes to zero at some points because fuel is not needed to keep the engine turning (ie: engine braking to an extent, but not quite). This is one way auto manufacturers use to improve fuel consumption. This is why engine braking uses less fuel than coasting in neutral. In every vehicle which utilizes Electronic Fuel Injection (almost every new automobile on the market today uses some sort of EFI), there resides in the computer a fuel map. The Powertrain Control Module (PCM - also known as Engine Control Module or ECM, etc.) takes input from several different sensors located on the engine. These sensors read such things as the engine coolant temperature, air intake temperature, manifold pressure, amount of air coming into the engine, as well as the throttle position, engine RPM, vehicle speed, and which gear the transmission is currently engaged (mind you it reads other input as well, these are just some of the main inputs ... each vehicle manufacturer can do their own thing differently). The PCM takes all of these inputs, shuffles them through algorithms, and comes up with the precise amount of time to leave the injector open.
This next graph, shows the relationship of throttle position to fuel consumption:
This graph indicates that fuel consumption is very linear to throttle position. You can expect the further you press on the pedal (and thus affect the throttle position), the more fuel you are going to use.
With these facts in mind, let's try to answer your questions:
If I take my foot of the gas and coast for 30 seconds, would that be the same petrol consumption as sitting idle in traffic for 30 seconds?
To me, it is obvious, sitting idle is going to get the worst fuel economy. Why? Because you are not moving. If one of your input factors in figuring fuel economy is distance traveled, in this case "0" (nil, zero, zed, nada, null) ... you've used 30 seconds of fuel keeping the engine running to achieve nothing, except for wasting fuel. Travelling any distance in the 30 seconds, regardless of engine or vehicle speed, is going to produce better fuel economy than sitting still. This is why some manufacturers have introduced systems in their vehicles which allow the engine to completely stop while sitting at a stop light, then as soon as you release the brake and step on the gas, the engine fires right back up and away you go.
Or if If I'm driving through a slow zone with the gas pedal 30% depressed, over a minute would that be the same gas consumption as driving on a motor way in top gear with the gas pedal at 30% depressed?
You are forgetting a few major factors here, one of which is vehicle speed versus engine speed. Remember, as you go faster (at least with an automatic gearbox), the transmission will shift up into another gear, until the transmission is either in the top gear, or in a gear consistent with the desired vehicle speed. So say, at 30mph, the engine is running at 2000 rpm (these numbers are just thrown out here for demonstration and may/may not actually be accurate) at your 30% throttle. Your engine will have turned a total of 1000 rotations and your vehicle will have traversed 1320 feet. Now, at highway speed (70mph) with the engine turning 2000rpm and 30% throttle, your vehicle will have traversed ~3080 feet. You should realize that as you go faster, other factors come into play. First, you only have so many gears in the gearbox. Once you've reached the top gear, that's all you have. At that point, in order to speed up, engine speed will have to increase. All vehicles are different as to wind resistance, so as you go faster, the air around the vehicle also starts to play a factor. The faster you go, the more wind resistance, and the more throttle you'll have to depress in order to maintain that speed (or go faster). All of this affects the fuel consumption. There is a point of diminishing returns as to vehicle speed versus fuel consumption.
NOTE: Please remember, when you are traveling a given speed (say 70mph), your throttle position will be much less than 30%. It doesn't take very much horsepower to keep a vehicle traveling at a constant speed. Your throttle will not need to be open as much in order to maintain that speed. The major factors in reference to your throttle position will be whether you, the driver, command the vehicle to speed up or slow down. Driver input is given directly through the throttle.
Do slopes / hills have an influence?
Absolutely. As described above with the graphs, if you are going down hill and do not want to go faster, the first thing which you do is take your foot off of the pedal, which reduces your throttle position to 0%. The vehicle computer registers this and after a given time, will reduce the injector pulse width to zero allowing the momentum of the vehicle to keep the engine turning (through the gearbox). As soon as you open the throttle any given amount, the computer will start throwing fuel back at the engine. Mind you, this is a very simplified version of what really happens and each vehicle manufacturer is going to do it a little differently.
On the other side of the equation, in order to go up a hill, you must depress the throttle more at a given speed to climb a hill. This is because it takes more energy output to maintain a given speed at an incline. Bottom line is, the engine will need more air and fuel to make it up the hill, therefor your throttle will be open further and the computer will increase the injector pulse width to accomplish this.