Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 14-02-2013, 16:53   #61
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: grenada
Boat: bristol 27
Posts: 2,508
Re: WeatherFax...

Quote:
Originally Posted by sailorF54 View Post
Using W7
Opengl: I only get the weatherfax pic (.tif downloaded with Airmail/viewfax) when selecting 'inverted'
Legacy display: fine without inverting
(see pics)
How is performance? legacy is probably slower?
When you change transparency does it work at all in opengl not inverted?
Quote:
Request: being able to specify a lat/long template instead of using the calibrating procedure.
This will be added in the next version

Quote:
Re: UK weatherfaxes (downloaded with i.e. Airmail/viewfax) They use a polar stereographic projection, and I have little hope they can be displayed with OpenCpn.

Many thanks, Pavel...
If someone could explain to me the transformation required to convert it from polar stereographic mercator, I would add this and make it possible to to display these. Otherwise I might get to researching this but it's low priority at the moment.

Quote:
Originally Posted by cagney View Post
Kubuntu 64 bit 12.10
I compiled my own. No problems.
All proceeds well until it's time to actually display the fax. This is what I get.
Attachment 54758

??

I tried to turn of OpenGL. not surprisingly the app crashed.

Thomas
Quote:
Originally Posted by rgleason View Post
Thank you sailor54. Downloaded pwam99.tif put in FaxWx directory.
In OpenCpn 3.1.1405 using weatherfax_pi.dll plugin compiled by Pavel.
Was able to open Weatherfax icon, browse to FaxWx directory, could not see tiff file until I selected "all files". Might want to add "*.tiff" to supported image files. Then changed file to "*.tif" and it shows up under suppported image files.
will have this in the next version
Quote:
Set Coordinates view. Picked "Set Coordinates" Hit ok.
Picked 30n 90w enter 30 then -90
Picked 60n 0 enter 60 then 0
Then OK fax coord entry window goes away
Leaves Weather Fax popup window showing the file highlighted.
Now the Opencpn chart area screen is getting corrupted by other stuff.
I close the Weather Fax popup and it goes away, the fax does not come up in Opencpn which I think is supposed to happen, and the corruption of the chart window continues. I havve to shut down Opencpn now.

Here is a view of Opencpn

I've turned off OpenGL and also have tried it when on.

This is a Dell XPS15 Laptop with Nvidia Geforce GT 540M
Hmm.. so all goes well until it needs to render. Could you try with a smaller image and see if the result is the same? Try something less than 1000 pixels in either dimension.

Quote:
Originally Posted by ChuckSK View Post
I cloned Nohal's weatherfax_pi.git with his windows fixes. With one small change it compiled and ran OK. PCM.cpp lines 42,43,44,45 change "isnan" to "_isnan".

1. Testing with noaa gifs, a large file will cause an error at weatherfax_pi.cpp line 246. If the file is cropped to about 1200X750 it works fine.

2. Using OpenGL I also noted that the image must be inverted to display.

This project has really begun well. Thanks.

Chuck
Interesting, you seem to have the same issue as sailorF54. I will look into the non-inverted display issue on opengl closer.


With the wide range of different results for different people it is proving to be difficult to develop this plugin. I keep reporting the issues, and I'll try to have an update soon which should help resolve things.

Anyone tried with audio files yet? (not going to work on windows with prebuild dll)
__________________

__________________
boat_alexandra is offline   Reply With Quote
Old 14-02-2013, 18:35   #62
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: grenada
Boat: bristol 27
Posts: 2,508
Re: WeatherFax...

I have a new update on the git:

github.com/seandepagnier/weatherfax_pi

Hopefully it fixes alot of the problems mentioned. Keep sending me feedback and it's only a matter of time until this is working for everyone.
__________________

__________________
boat_alexandra is offline   Reply With Quote
Old 15-02-2013, 01:52   #63
Senior Cruiser
 
sailorF54's Avatar

Cruisers Forum Supporter

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 772
Re: WeatherFax...

Quote:
Originally Posted by boat_alexandra View Post
How is performance? legacy is probably slower?

Legacy vs OpenGl: no noticeable difference

When you change transparency does it work at all in opengl not inverted?

The position of the pic area is clearly visible with non inverted Opengl (see pic)
Could you try with a smaller image and see if the result is the same? Try something less than 1000 pixels in either dimension.

Using a small tif (316 x 250) doesn't make any difference (OK under legacy, only inverted with OpenGl (see pic)



)
.....................
Attached Thumbnails
Click image for larger version

Name:	Image003.jpg
Views:	142
Size:	116.1 KB
ID:	54825   Click image for larger version

Name:	Image004.jpg
Views:	136
Size:	106.9 KB
ID:	54826  

__________________
sailorF54 is offline   Reply With Quote
Old 15-02-2013, 04:21   #64
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 7,623
Re: WeatherFax...

This is a Dell XPS15 Laptop with Nvidia Geforce GT 540M

Hmm.. so all goes well until it needs to render. Could you try with a smaller image and see if the result is the same? Try something less than 1000 pixels in either dimension.

Image is gif 864 x 553 14.6kb PWAM99.tiff
__________________
rgleason is offline   Reply With Quote
Old 15-02-2013, 05:05   #65
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 7,623
Re: WeatherFax...

cmake ..
looked pretty good
cmake --build .
had 253 warnings and 4 errors

\plugins\weatherfax_pi\src\libaudiofile\modulles\P CM.cpp(42) error C3861: isnan: identifier not found ...weatherfax_pi.wcxproj

same ... PCM.cpp(43) same
same ...PCM.cpp (44) same
same ...PCM cpp (45) same

When compile MS VC++ 2010 Express Debug > Build
see two attached files.

It made a new weatherfax_pi.dll
and place it in
C:\Data-Dart....\Navigation\opencpn-git\build\plugins\weatherfax_pi\Release

Copied weatherfax_pi.dll to
C:\Data-Dart\...\Navigation\OpenCPN 3.1.1405\plugins
to test in Opencpn 3.2.2405

Are there any other files needed from the
C:\Data-Dart....\Navigation\opencpn-git\build\plugins\weatherfax_pi\Release
That the plugin needs? Or is everything in the dll?
Attached Thumbnails
Click image for larger version

Name:	weatherfax-opencpn-chartwindow-corruption-2.jpg
Views:	143
Size:	415.5 KB
ID:	54836  
Attached Files
File Type: doc WF-outputC-1.doc (22.8 KB, 42 views)
File Type: doc WF-outputD-2.doc (20.9 KB, 42 views)
__________________
rgleason is offline   Reply With Quote
Old 15-02-2013, 05:33   #66
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 7,623
Re: WeatherFax...

The above was done with Dell XPS15 Laptop with Nvidia Geforce GT 540M with Win7
with OpenGL checked in OpenCPN and with no special instructions regarding use of the Geforce Gt 540M other than to use OpenGL.

Next I went into NVIDIA software and made a special setting for OpenCPN 3.1.1405 exe program to use Intel Integrated Graphics rather than the NVidia card and I turned off OpenGL in Opencpn 3.1.1405

The weather fax window did not corrupt after adding the first fax, so I was able to add two more, but highllighting the faxes does not do anything. Double click does nothing. No fax shows up. How do we execute a fax to get it to show on the screen? Or should it just appear with no command?

This is getting pretty frustrating for Sean as well as me. I am sorry.
Attached Thumbnails
Click image for larger version

Name:	weatherfax-opencpn-chartwindow-noOpenGL-withIntegratedGraphics-2.jpg
Views:	133
Size:	407.1 KB
ID:	54837  
__________________
rgleason is offline   Reply With Quote
Old 15-02-2013, 05:50   #67
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 7,623
Re: WeatherFax...

Okay, I tried Checking OpenGL in Opencpn 3.1.1405 with the Graphics program override so that OpenCPN is still using Intel Integrated Graphics. So the program is using Intel Integrated Graphics with OpenGL.

The Weatherfax Popup started corrupting again after adding the first fax. When I don't have OpenGL checked in Opencpn, I can add multiple faxes and move the Weatherfax popup around without corruption, however the faxes do not show up.

When I shut the Weather fax Popup and reopen it the Faxes are still showing and I can highlight each one (but nothing seems to happen).

When I shut down the weather fax poppup and then shut down Opencpn, the two faxes are lost and have to be reselected and coordinated positioned.
It would be more useful if they were only deleted when we select them to be deleted.

Just to be clear, I have no been abble to get the faxes to appear over the charts in transparency.
__________________
rgleason is offline   Reply With Quote
Old 15-02-2013, 16:54   #68
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: grenada
Boat: bristol 27
Posts: 2,508
Re: WeatherFax...

Quote:
Originally Posted by sailorF54 View Post
.....................
Inverted thing was a bug introduced from changes to make it compile with visual studio. Fixed now
Quote:
Originally Posted by rgleason View Post
Okay, I tried Checking OpenGL in Opencpn 3.1.1405 with the Graphics program override so that OpenCPN is still using Intel Integrated Graphics. So the program is using Intel Integrated Graphics with OpenGL.
Does this computer have both intel and nvidia graphics cards or something? Do you physically switch the monitor cable as well? Do you have a machine with only a single card?

Quote:
The Weatherfax Popup started corrupting again after adding the first fax. When I don't have OpenGL checked in Opencpn, I can add multiple faxes and move the Weatherfax popup around without corruption, however the faxes do not show up.
What version of wxwidgets are you using? It is possible that wxImage::GetSubImage is not properly implemented on your version which would explain it.
Quote:
When I shut the Weather fax Popup and reopen it the Faxes are still showing and I can highlight each one (but nothing seems to happen).

When I shut down the weather fax poppup and then shut down Opencpn, the two faxes are lost and have to be reselected and coordinated positioned.
It would be more useful if they were only deleted when we select them to be deleted.
you mean to save between sessions of opencpn? this is planned but not yet implemented

Quote:
Just to be clear, I have no been abble to get the faxes to appear over the charts in transparency.
yes, opengl is needed for partial transparency though it may be possible to implement in legacy mode.

I have updated the git.. but wait another day or two and there should be substantial improvements as I am adding a new interface and many options.
__________________
boat_alexandra is offline   Reply With Quote
Old 15-02-2013, 17:42   #69
Registered User

Join Date: Apr 2009
Location: Marina Del Rey
Boat: Hylas 44
Posts: 385
Re: WeatherFax...

If the fax image is scrolled while the coordinates are being set GetSubImage fails.

This occurs with both gif and wav files and with opengl or not.
__________________
ChuckSK is offline   Reply With Quote
Old 15-02-2013, 18:15   #70
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: grenada
Boat: bristol 27
Posts: 2,508
Re: WeatherFax...

Quote:
Originally Posted by ChuckSK View Post
If the fax image is scrolled while the coordinates are being set GetSubImage fails.

This occurs with both gif and wav files and with opengl or not.
Very enlightening... So if the image is not scrolled, or is in the upper left on both bars it works? Also, can you check if the parameters passed to GetSubImage are valid?
__________________
boat_alexandra is offline   Reply With Quote
Old 15-02-2013, 18:39   #71
Registered User

Join Date: Apr 2009
Location: Marina Del Rey
Boat: Hylas 44
Posts: 385
Re: WeatherFax...

If the image is not scrolled it works. An image with scroll bars will work if the image is not scrolled or returned to the non-scrolled position. The parameters seem to be valid.
__________________
ChuckSK is offline   Reply With Quote
Old 15-02-2013, 20:26   #72
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 7,623
Re: WeatherFax...

Quote:
Does this computer have both intel and nvidia graphics cards or something? Do you physically switch the monitor cable as well? Do you have a machine with only a single card?
Dell Laptop XPS15 with onboard Intel bleIntegrated Graphics and Nvidia Card.No cable to remove.
---------
Quote:
The Weatherfax Popup started corrupting again after adding the first fax. When I don't have OpenGL checked in Opencpn, I can add multiple faxes and move the Weatherfax popup around without corruption, however the faxes do not show up.
Quote:
What version of wxwidgets are you using? It is possible that wxImage::GetSubImage is not properly implemented on your version which would explain it.
C:\wxWidgets-2.8.12
Opencpn compiles in Build Release or Debug. Charts work Faxes can be overlayed as Kap files, etc. are you telling me wxImage::GetSubImage isn't working, when Opencpn is? How do I test or check if wxImage::GetSubImage is correct? or exists?
------------

I have gotten the Debug version of Weatherfax working now, so I can debug it. This evening I started by entering lat long and there was a break and the program stopped. Tried to capture image of code, but lost it and program forced a shutdown due to low memory in computer.

What information screens will you want when I run this tomorrow?
__________________
rgleason is offline   Reply With Quote
Old 16-02-2013, 05:30   #73
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 7,623
Re: WeatherFax...

Found in "image.cpp" under wxWidgets-2.8.12\src\common\image.cpp

Code:
wxImage wxImage::GetSubImage( const wxRect &rect ) const
{
    wxImage image;

    wxCHECK_MSG( Ok(), image, wxT("invalid image") );

    wxCHECK_MSG( (rect.GetLeft()>=0) && (rect.GetTop()>=0) &&
                 (rect.GetRight()<=GetWidth()) && (rect.GetBottom()<=GetHeight()),
                 image, wxT("invalid subimage size") );

    const int subwidth = rect.GetWidth();
    const int subheight = rect.GetHeight();

    image.Create( subwidth, subheight, false );

    const unsigned char *src_data = GetData();
    const unsigned char *src_alpha = M_IMGDATA->m_alpha;
    unsigned char *subdata = image.GetData();
    unsigned char *subalpha = NULL;

    wxCHECK_MSG( subdata, image, wxT("unable to create image") );

    if (src_alpha != NULL) {
        image.SetAlpha();
        subalpha = image.GetAlpha();
        wxCHECK_MSG( subalpha, image, wxT("unable to create alpha channel"));
    }

    if (M_IMGDATA->m_hasMask)
        image.SetMaskColour( M_IMGDATA->m_maskRed, M_IMGDATA->m_maskGreen, M_IMGDATA->m_maskBlue );

    const int width = GetWidth();
    const int pixsoff = rect.GetLeft() + width * rect.GetTop();

    src_data += 3 * pixsoff;
    src_alpha += pixsoff; // won't be used if was NULL, so this is ok

    for (long j = 0; j < subheight; ++j)
    {
        memcpy( subdata, src_data, 3 * subwidth );
        subdata += 3 * subwidth;
        src_data += 3 * width;
        if (subalpha != NULL) {
            memcpy( subalpha, src_alpha, subwidth );
            subalpha += subwidth;
            src_alpha += width;
        }
    }

    return image;
}
__________________
rgleason is offline   Reply With Quote
Old 16-02-2013, 06:35   #74
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 7,623
Re: WeatherFax...

Ok here are some debug snapshots in sequence.
Attached Thumbnails
Click image for larger version

Name:	weatherfax-widgets-debug-alert.jpg
Views:	148
Size:	411.5 KB
ID:	54916   Click image for larger version

Name:	weatherfax-opencpn-trigger-breakpoint.jpg
Views:	141
Size:	395.7 KB
ID:	54917  

Click image for larger version

Name:	weatherfax-opencpn-stopped-working.jpg
Views:	150
Size:	230.4 KB
ID:	54918   Click image for larger version

Name:	weatherfax-setcoord-close-image-popup-wxwindisup-then-this.jpg
Views:	146
Size:	418.2 KB
ID:	54919  

__________________
rgleason is offline   Reply With Quote
Old 16-02-2013, 11:02   #75
Registered User

Join Date: Apr 2009
Location: Marina Del Rey
Boat: Hylas 44
Posts: 385
Re: WeatherFax...

Quote:
Originally Posted by boat_alexandra View Post
Very enlightening... So if the image is not scrolled, or is in the upper left on both bars it works? Also, can you check if the parameters passed to GetSubImage are valid?
Changing all occurrences of CalcUnscrolledPosition to CalcScrolledPosition fixed the problem.

I spoke to soon. The change allows the image to appear, but it is not complete. The scrolled part of the image is missing.
__________________

__________________
ChuckSK is offline   Reply With Quote
Reply

Tags
paracelle

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
For Sale: SSB, Tuner, Amp, WeatherFax Palarran Classifieds Archive 7 19-03-2011 08:22
Help with WeatherFax and SeaTTY desierto Navigation 2 12-12-2008 21:36
Basic Weatherfax reception Tnflakbait Marine Electronics 3 23-09-2008 22:55
How do I set myself up with weatherfax? tracker_46 Marine Electronics 4 12-10-2006 15:51
Weatherfax Recommendations Please Salacia Marine Electronics 3 03-07-2005 14:28


Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

» More about our Communities

Automotive Communities

Our Automotive communities encompass many different makes and models. From U.S. domestics to European Saloons.

» More about our Automotive Communities

Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities


Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 21:43.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.