Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 18-06-2015, 03:02   #1
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
projections alpha test

Code:
git clone github.com/seandepagnier/OpenCPN -b projections
  1. raster charts in quilted mode use per-chart coordinates (without reprojection support switching on/off quilting you might notice tracks shift relative to the chart as quilted mode was inaccurate)
  2. charts with different projections can be in the same quilt (eg: mercator and transverse mercator)
  3. mercator, polar, and spherical projections supported by pressing '1', '2', '3'
  4. hardware accelerated panning in course up mode
  5. optimized and improved efficiency in several ways

Please advise of any possible reversions. I intend to integrate this effort similarly to the optimizing work last year. I will be adding support routines for plugins next.
seandepagnier is offline   Reply With Quote
Old 18-06-2015, 05:12   #2
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: projections alpha test

___________
Attached Thumbnails
Click image for larger version

Name:	projection.jpg
Views:	242
Size:	78.0 KB
ID:	103907  
seandepagnier is offline   Reply With Quote
Old 18-06-2015, 08:04   #3
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,208
Re: projections alpha test

Sean...
The linkage on Linux is a bit broken due to missing X11 and GL dependencies (already handled in master, so I just attach a brutal patch for anybody not wanting to wait for the rebasing of this patchset)
Code:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c4139f7..9e829bf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -532,6 +532,7 @@ IF(UNIX)
     FIND_PACKAGE(ZLIB REQUIRED)
     INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
     FIND_PACKAGE(TinyXML)
+    SET(OPENGL_LIBRARIES "X11" "GL" "GLU")
   ENDIF(NOT QT_ANDROID)  
 ENDIF(UNIX)
FWIW, I can't see any vector charts at all with this branch and RNCs just in single chart mode. OpenGL or not. Sometimes, some vector chart artifacts get rendered for a moment, the most I have seen so far is shown on the attached screenshot. Do you have any special debugging requirements?

Code:
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample, 
    GLX_EXT_create_context_es2_profile, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, 
    GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, 
    GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
    GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_SGI_swap_control
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, 
    GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample, 
    GLX_EXT_buffer_age, GLX_EXT_create_context_es2_profile, 
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, 
    GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, 
    GLX_ARB_get_proc_address, GLX_ARB_multisample, 
    GLX_EXT_create_context_es2_profile, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, 
    GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SGI_video_sync
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ironlake Mobile 
OpenGL version string: 2.1 Mesa 10.5.5
OpenGL shading language version string: 1.20
OpenGL extensions:
    GL_3DFX_texture_compression_FXT1, GL_AMD_performance_monitor, 
    GL_AMD_seamless_cubemap_per_texture, GL_AMD_shader_trinary_minmax, 
    GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5, 
    GL_APPLE_object_purgeable, GL_APPLE_packed_pixels, 
    GL_APPLE_vertex_array_object, GL_ARB_ES2_compatibility, 
    GL_ARB_buffer_storage, GL_ARB_clear_buffer_object, GL_ARB_clear_texture, 
    GL_ARB_color_buffer_float, GL_ARB_compressed_texture_pixel_storage, 
    GL_ARB_copy_buffer, GL_ARB_copy_image, GL_ARB_debug_output, 
    GL_ARB_depth_buffer_float, GL_ARB_depth_clamp, GL_ARB_depth_texture, 
    GL_ARB_draw_buffers, GL_ARB_draw_elements_base_vertex, 
    GL_ARB_draw_instanced, GL_ARB_explicit_attrib_location, 
    GL_ARB_explicit_uniform_location, GL_ARB_fragment_coord_conventions, 
    GL_ARB_fragment_program, GL_ARB_fragment_program_shadow, 
    GL_ARB_fragment_shader, GL_ARB_framebuffer_object, 
    GL_ARB_framebuffer_sRGB, GL_ARB_get_program_binary, 
    GL_ARB_half_float_pixel, GL_ARB_half_float_vertex, 
    GL_ARB_instanced_arrays, GL_ARB_internalformat_query, 
    GL_ARB_invalidate_subdata, GL_ARB_map_buffer_alignment, 
    GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multisample, 
    GL_ARB_multitexture, GL_ARB_occlusion_query, GL_ARB_occlusion_query2, 
    GL_ARB_pixel_buffer_object, GL_ARB_point_parameters, GL_ARB_point_sprite, 
    GL_ARB_provoking_vertex, GL_ARB_robustness, GL_ARB_sampler_objects, 
    GL_ARB_seamless_cube_map, GL_ARB_seamless_cubemap_per_texture, 
    GL_ARB_separate_shader_objects, GL_ARB_shader_bit_encoding, 
    GL_ARB_shader_objects, GL_ARB_shader_texture_lod, 
    GL_ARB_shading_language_100, GL_ARB_shadow, GL_ARB_sync, 
    GL_ARB_texture_border_clamp, GL_ARB_texture_compression, 
    GL_ARB_texture_compression_rgtc, GL_ARB_texture_cube_map, 
    GL_ARB_texture_env_add, GL_ARB_texture_env_combine, 
    GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3, 
    GL_ARB_texture_float, GL_ARB_texture_mirror_clamp_to_edge, 
    GL_ARB_texture_mirrored_repeat, GL_ARB_texture_non_power_of_two, 
    GL_ARB_texture_query_lod, GL_ARB_texture_rectangle, GL_ARB_texture_rg, 
    GL_ARB_texture_rgb10_a2ui, GL_ARB_texture_storage, GL_ARB_texture_swizzle, 
    GL_ARB_transpose_matrix, GL_ARB_vertex_array_bgra, 
    GL_ARB_vertex_array_object, GL_ARB_vertex_attrib_binding, 
    GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, GL_ARB_vertex_shader, 
    GL_ARB_vertex_type_10f_11f_11f_rev, GL_ARB_vertex_type_2_10_10_10_rev, 
    GL_ARB_window_pos, GL_ATI_blend_equation_separate, GL_ATI_draw_buffers, 
    GL_ATI_separate_stencil, GL_ATI_texture_env_combine3, 
    GL_ATI_texture_float, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, 
    GL_EXT_blend_equation_separate, GL_EXT_blend_func_separate, 
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_compiled_vertex_array, 
    GL_EXT_copy_texture, GL_EXT_draw_buffers2, GL_EXT_draw_instanced, 
    GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_framebuffer_blit, 
    GL_EXT_framebuffer_object, GL_EXT_framebuffer_sRGB, 
    GL_EXT_gpu_program_parameters, GL_EXT_multi_draw_arrays, 
    GL_EXT_packed_depth_stencil, GL_EXT_packed_float, GL_EXT_packed_pixels, 
    GL_EXT_pixel_buffer_object, GL_EXT_point_parameters, 
    GL_EXT_polygon_offset, GL_EXT_provoking_vertex, GL_EXT_rescale_normal, 
    GL_EXT_secondary_color, GL_EXT_separate_specular_color, 
    GL_EXT_shadow_funcs, GL_EXT_stencil_two_side, GL_EXT_stencil_wrap, 
    GL_EXT_subtexture, GL_EXT_texture, GL_EXT_texture3D, 
    GL_EXT_texture_array, GL_EXT_texture_compression_dxt1, 
    GL_EXT_texture_compression_rgtc, GL_EXT_texture_compression_s3tc, 
    GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp, 
    GL_EXT_texture_env_add, GL_EXT_texture_env_combine, 
    GL_EXT_texture_env_dot3, GL_EXT_texture_filter_anisotropic, 
    GL_EXT_texture_integer, GL_EXT_texture_lod_bias, GL_EXT_texture_object, 
    GL_EXT_texture_rectangle, GL_EXT_texture_sRGB, GL_EXT_texture_sRGB_decode, 
    GL_EXT_texture_shared_exponent, GL_EXT_texture_snorm, 
    GL_EXT_texture_swizzle, GL_EXT_timer_query, GL_EXT_vertex_array, 
    GL_EXT_vertex_array_bgra, GL_IBM_multimode_draw_arrays, 
    GL_IBM_rasterpos_clip, GL_IBM_texture_mirrored_repeat, 
    GL_INGR_blend_func_separate, GL_INTEL_performance_query, 
    GL_KHR_context_flush_control, GL_KHR_debug, GL_MESA_pack_invert, 
    GL_MESA_texture_signed_rgba, GL_MESA_window_pos, GL_NV_blend_square, 
    GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_light_max_exponent, 
    GL_NV_packed_depth_stencil, GL_NV_primitive_restart, 
    GL_NV_texgen_reflection, GL_NV_texture_env_combine4, 
    GL_NV_texture_rectangle, GL_OES_EGL_image, GL_OES_read_format, 
    GL_S3_s3tc, GL_SGIS_generate_mipmap, GL_SGIS_texture_border_clamp, 
    GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays

OpenGL ES profile version string: OpenGL ES 2.0 Mesa 10.5.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:
    GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5, 
    GL_APPLE_texture_max_level, GL_EXT_blend_minmax, 
    GL_EXT_discard_framebuffer, GL_EXT_draw_buffers, GL_EXT_map_buffer_range, 
    GL_EXT_multi_draw_arrays, GL_EXT_read_format_bgra, 
    GL_EXT_separate_shader_objects, GL_EXT_texture_compression_dxt1, 
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_format_BGRA8888, 
    GL_EXT_texture_rg, GL_EXT_texture_type_2_10_10_10_REV, 
    GL_EXT_unpack_subimage, GL_INTEL_performance_query, 
    GL_KHR_context_flush_control, GL_NV_draw_buffers, 
    GL_NV_fbo_color_attachments, GL_NV_read_buffer, GL_OES_EGL_image, 
    GL_OES_EGL_image_external, GL_OES_compressed_ETC1_RGB8_texture, 
    GL_OES_depth24, GL_OES_depth_texture, GL_OES_element_index_uint, 
    GL_OES_fbo_render_mipmap, GL_OES_get_program_binary, GL_OES_mapbuffer, 
    GL_OES_packed_depth_stencil, GL_OES_rgb8_rgba8, 
    GL_OES_standard_derivatives, GL_OES_stencil8, GL_OES_surfaceless_context, 
    GL_OES_texture_3D, GL_OES_texture_float, GL_OES_texture_float_linear, 
    GL_OES_texture_half_float, GL_OES_texture_half_float_linear, 
    GL_OES_texture_npot, GL_OES_vertex_array_object

24 GLX Visuals
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x020 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x021 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x082 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x083 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x084 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x085 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x086 24 tc  0  24  0 r  . .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x087 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x088 24 tc  0  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x089 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
0x08a 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x08b 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16  0  0 0 Slow
0x08c 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x08d 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x08e 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x08f 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x090 24 dc  0  24  0 r  . .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x091 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x092 24 dc  0  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x093 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x094 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
0x095 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x096 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16  0  0 0 Slow
0x05d 32 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None

36 GLXFBConfigs:
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x05e  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x05f  0 tc  0  16  0 r  . .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x060  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x061  0 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x062 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x063 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x064 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x065 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x066 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x067 24 tc  0  24  0 r  . .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x068 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x069 24 tc  0  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x06a  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x06b  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
0x06c 32 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x06d 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
0x06e 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x06f 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16  0  0 0 Slow
0x070  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x071  0 dc  0  16  0 r  . .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x072  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x073  0 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x074 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x075 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x076 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x077 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x078 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x079 24 dc  0  24  0 r  . .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x07a 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x07b 24 dc  0  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x07c  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x07d  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
0x07e 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x07f 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
0x080 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x081 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16  0  0 0 Slow
Pavel
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2015-06-18 10:01:34.png
Views:	171
Size:	62.6 KB
ID:	103917  
nohal is offline   Reply With Quote
Old 19-06-2015, 02:08   #4
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: projections alpha test

Pavel,

Thanks for the feedback.

I don't understand how it can compile fine for me without your small patch.

Are you using cm93 or other vector charts? Does the world background chart work? Could you try again I just pushed a few fixes. what geographic location are your charts? Do the different projections work at all using 1, 2, 3 or right click menu?

Sean
seandepagnier is offline   Reply With Quote
Old 19-06-2015, 03:33   #5
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: projections alpha test

I merged with master branch now, should be working better than ever, but no quilts in dc mode. Maybe I should just handle them the way they were before which is unfortunate.
seandepagnier is offline   Reply With Quote
Old 19-06-2015, 09:51   #6
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,208
Re: projections alpha test

Sean...
Seems you did not push the master merged code to github.
Further test:
  • basemap - always works
  • vector charts - never work (CM93 or NOAA ENCs), regardless of projection, OpenGL and quilting setting, the best I can ever see is what I posted above.
  • raster charts (NOAA RNCs) - never work in quilting mode. Do work in single chart mode, regardless of projection or OpenGL setting
  • switching projection in DC mode is broken (see the screenshot attached)

Pavel
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2015-06-19 11:50:02.png
Views:	214
Size:	107.9 KB
ID:	103952  
nohal is offline   Reply With Quote
Old 19-06-2015, 11:54   #7
Registered User

Join Date: Jun 2013
Location: Moscow, Russia
Boat: Clerk Chair 1.6ft
Posts: 39
Re: projections alpha test

My experience:
  • No troubles compiling in openSUSE 13.2.
  • Charts look “grayscale” (at least in non-OpenGL mode).
  • Chart outlines move “out-of-sync” with chart content — like in old videogames with parallax layers.
  • No graticules — just lines of longitude.

PS. Where do I get North Pole vector charts?
SamsonovAnton is offline   Reply With Quote
Old 19-06-2015, 22:59   #8
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: projections alpha test

Quote:
Originally Posted by nohal View Post
Sean...
Seems you did not push the master merged code to github.
I got confused and merged with my own master branch (which has lots of other changes) I reverted this and merged now instead with upstream/master

Quote:
Further test:
  • basemap - always works
  • vector charts - never work (CM93 or NOAA ENCs), regardless of projection, OpenGL and quilting setting, the best I can ever see is what I posted above.
  • raster charts (NOAA RNCs) - never work in quilting mode. Do work in single chart mode, regardless of projection or OpenGL setting
  • switching projection in DC mode is broken (see the screenshot attached)

Pavel
I made a couple of changes after testing more charts last night. Basically some charts use clockwise coordinates and others use counterclockwise, so both should work now.

Thanks for the list. I need to disable projection switching in dc mode as it can not work without an extra conversion routine and even then would be very slow. Currently quilted mode in dc is also broken as I search for the best way to fix it.. everything else should work.

I just verified I can quilt polyconic charts with mercator and even skewed mercator charts correctly.

Since am using polygons not rectangles for quilting, I found skewed charts, if there are several in a quilt take only 3ms, before took 10ms to quilt, so 2-3x faster, but with many (15-20) charts in the quilt, if all rectangles, before it took only 2ms to compose, but now 3-4ms, however there are plenty of ways to improve this and eventually it can be faster than it is now.
seandepagnier is offline   Reply With Quote
Old 19-06-2015, 23:07   #9
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: projections alpha test

Please pull and try now. I merged with master and tested with:
us raster, new zealand raster, google earth kap us enc and cm93 charts

Pavel,
your change to sentence.cpp in the dashboard plugin broke wx-2.8 do we support wx-2.8 still?
seandepagnier is offline   Reply With Quote
Old 20-06-2015, 06:03   #10
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,208
Re: projections alpha test

Quote:
Originally Posted by boat_alexandra View Post
Please pull and try now. I merged with master and tested with:
us raster, new zealand raster, google earth kap us enc and cm93 charts
RNCs seem to work fine for me now.
CM93 result in just grey screen, except in elliptic projection, where the attached psychedelic effect is observed.
ENCs now consistently show cell borders and the light artifacts as shown on my first screenshot, but nothing else.
Quote:
Pavel,
your change to sentence.cpp in the dashboard plugin broke wx-2.8 do we support wx-2.8 still?
We try, fixed in master now.
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2015-06-20 07:59:07.png
Views:	139
Size:	364.0 KB
ID:	103993  
nohal is offline   Reply With Quote
Old 22-06-2015, 01:24   #11
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: projections alpha test

Pavel,

I have updated the branch a bit more. It should support a few additional projections as well as fix some more issues.

I can't understand what the problem with vector charts is, but t must have something to do with the regions. It doesn't work in single chart or quilted mode correct? What about the case where raster and vectors are both visible in the same quilt? I think it must have something to do with how the extents for your vector charts are being computed. Perhaps you can step throught glChartCanvas::RenderCharts and print the regions, eg:
Code:
(gdb) call region.Print()
(gdb) call backgroundRegion.Print()
Or else just put the code to print the region and recompile and see if the region passed to Current_Ch->RenderRegionViewOnGL( *m_pcontext, vp, region ); is empty or not. If not I would have to step in there and try to find out why it isn't rendering, but for some reason it works for me which is frustrating.


As an interesting note, I have found the polyconic projection used in opencpn does not match the polyconic projection used by the actual us bsb raster charts. If it did, then the chart would display as a perfect rectangle when this projection is used. This is somewhat of a bug in opencpn (and always has been) as the coordinates (although fairly accurate because of the polynominal interpolation) are incorrect for these charts. Maybe we should think of a way to fix it. Obviously polyconic can mean infinite different possible projections as the cone may intersect the earth at any of 1 or 2 possible latitudes.
seandepagnier is offline   Reply With Quote
Old 22-06-2015, 10:00   #12
Registered User

Join Date: Jun 2013
Location: Moscow, Russia
Boat: Clerk Chair 1.6ft
Posts: 39
Re: projections alpha test

Quote:
Originally Posted by boat_alexandra View Post
I have updated the branch a bit more.
Does not compile now:
Code:
georef.cpp:726:12: error: ‘pole’ was not declared in this scope
     *lat = pole - atan(d) * 2 / DEGREE;
Indeed:
Code:
void fromSTEREO(double x, double y, double lat0, double lon0, double *lat, double *lon)
{
    const double z = WGS84_semimajor_axis_meters * mercator_k0;
    double xn = x/z;
    double yn = -y/z;
    double d = sqrt(xn*xn + yn*yn);
    if(lat0 < 0) // south polar (negative root and correct branch from cosine)
        d = -d, yn = -yn;

    *lat = pole - atan(d) * 2 / DEGREE;

    double theta = atan2(xn, yn);
    *lon = theta / DEGREE + lon0;
}
SamsonovAnton is offline   Reply With Quote
Old 23-06-2015, 03:07   #13
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: projections alpha test

I fixed some things and added gnomonic projections. It is interesting because in this projection all great circles are straight lines on the screen. Should compile.

I am halfway through optimizing the region algorithm but not yet finished... Then there is the case of no-opengl quilts, which I think I will simply handle the old way which is unfortunate, but may explore other possibilities. Finally, it is possible to optimize the quilting calculations considerably, as well as perform them in a background thread which would probably help a bit on slower arm processors that have plenty of cores.

What about vector charts? Can anyone see them?

To be clear, the goal isn't about supporting many more projections (which is nice but maybe will be exposed to users via a plugin) but more about improving the accuracy of displayed charts, allowing quilts to combine charts of different projections and improving performance.
seandepagnier is offline   Reply With Quote
Old 25-06-2015, 01:28   #14
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: projections alpha test

Pavel,

I fixed a bunch of issues with the regions.. the vector charts should work a lot better now, the only remaining issue for me is panning is not hardware accelerated as well as it should be.


Another issue I uncovered is, opencpn assumes cm93 covers everything which is wrong from 40 east to 120 east north of 40. Because of this assumption, there are charts in russian waters for higher level of detail in this region which are only possible to view in single chart mode.
seandepagnier is offline   Reply With Quote
Old 02-07-2015, 18:58   #15
Registered User

Join Date: Apr 2009
Location: Marina Del Rey
Boat: Hylas 44
Posts: 387
Re: projections alpha test

Check this out!

Click image for larger version

Name:	Capture2.jpg
Views:	207
Size:	313.7 KB
ID:	104559


chuck
ChuckSK is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenCPN for Android Alpha test 4.1.409 bdbcat OpenCPN 117 12-10-2015 01:28
OpenCPN for Android Alpha test 4.1.427 bdbcat OpenCPN 139 29-05-2015 14:27
OpenCPN for Android Alpha test 4.1.412 bdbcat OpenCPN 120 15-05-2015 12:12
S63_PI Alpha Test 0.3.0 bdbcat OpenCPN 25 07-04-2014 10:00
S63_PI Alpha Test 0.2.0 bdbcat OpenCPN 29 05-02-2014 10:26

Advertise Here


All times are GMT -7. The time now is 12:29.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.