The way I read it: both gates must have self latching devices. But only the smaller "pedestrian" gate must open out and be self closing, not the wider one. The wider one is not the pedestrian access gate. Just make sure that one self latches when you close it, and keep that one locked.
If you can't grade outside the gate so that it can open out, can you relocate the gate inward? Is the walkway on the pool-side of the gate flat and level? If so: remove the gate, build two short walls inward, toward the pool the same number of feet the gate is wide, like a short hallway, and then attach the gate at the end of this new hallway. The gate would then open outward, inside the hallway, but over the portion of the walkway that is flat. I'll draw you a pic if that doesn't make sense.
As others said, just ask the guy at the building dept counter. Bring him a drawing.