30km is do able on an aircraft carrier but not on a sub.
30km = about 16.2nm or 18.6 miles. This means your height of sight would have to be roughly 190 feet to see 30km on a crystal clear day.
Allowing for the UZO's magnification at best you shouldn't be able to see over 10nm