How to convert SpaceView3d.lens to field-of-view?
To convert focal length to field of view you need to know the sensor size. The formula is as follows:

FOV = 2 * arctan(half_the_diagonal_of_sensor / focal_length)


See this in Blender's code.

So that means your field of view is dependent on the size and aspect ratio of the 3d View window.

Best way how you could approach this is to cast a ray into the scene from one 3d window corner and measure the angle to the ray that is in center of screen (basically to the local Z axis of viewport).


you get the 3d rays like this (snippet from a modal operator - you will have to overwrite context for your application):

import bpy
from bpy_extras import view3d_utils

region = bpy.context.region
rv3d = bpy.context.region_data
pixel_coords = (0,0)

ray_vector = view3d_utils.region_2d_to_vector_3d(region, rv3d, pixel_coords)

view_camera_loc = rv3d.view_matrix.inverted().translation
look_at = rv3d.view_location
view_local_z = look_at - view_camera_loc

you measure the angle between the ray_vector and view_local_z