Building height shall be calculated as described in the definitions provided by this ordinance. A. Maximum building height. 1. Principal dwellings slab-on-grade: 30 feet. 2. Principal dwellings on a raised foundation: 32 feet. 3. Detached garages and detached accessory dwellings: No detached garage or detached accessory dwelling shall exceed the height of the principal dwelling or a maximum of 24 feet, whichever is lower. 4. All other structures other than energy generating devices: Fifteen feet, or no higher than the height required for proper functioning, but in no event greater than the height of the principal dwelling. B. Maximum height of certain energy devices: The height of non-polluting, energy generating devices such as wind generators, solar panels, solar water heaters and similar devices when attached to a structure or building shall not exceed 120 percent of the maximum allowed height of such structure or building, provided that: 1. The energy generating or efficiency device is not located in the front yard and does not impair views or access to the front door. 2. Additional height is required for the proper functioning of the device. 3. No other location is reasonably available that would be less visually intrusive, and which would permit the proper functioning of the device without an increase in height. 4. The increased height, as viewed from a public space or the street, is harmonious with the desired character and height of dwellings on the street within the same block.