Monday, June 25, 2012

NMEA Reboradcasting, again

This post is more like a question...
This is always the same problem, most of the NMEA devices use a Serial Port, which is always accessed exclusively (i.e. by no more than one program at a given time).
The way around this exclusive access is to have the exclusive reader to rebroadcast the NMEA data using another channel, accessible from several other programs. This other channel can be HTTP, TCP, UDP... Those channels are machine, system and language agnostic. From Java to Java, RMI is also an interesting alternative.
SailMail reads the NMEA Stream to get the position of the boat, and thus is able to find the best SailMail station, provides the possibilty to rebroadcast the data it reads. Available channels are TCP, UDP, and even COM (rebroadcast on another serial port). It rebroadcasts the NMEA Sentence as it has been read, assuming - appropriately in my humble opinion - that if it is NMEA you are interested in, you know how to parse it.
There is also something else, which OpenCPN is aware of, this is GPSd.
It runs as a daemon - on the systems where daemons exist - and is only good for GPSs, not all the NMEA messages, because it's rebroadcasting the data after reworking them in another format, some proprietary classes over json (JavaScript Object Notation).
The GPSd protocol is not exactly documented, and the project leader does not return my emails...
In the NMEA Console, you can read any of those channels (Serial, TCP, UDP, RMI) and rebroadcast on HTTP, UDP, TCP and RMI (simultaneously if needed). I'm also working on a GPSd rebroadcast, running anywhere Java runs (no need for a daemon).
Anyway, both approaches have pros and cons (even if I'd rather rebroadcast the data as they come).
If anyone has any comment or idea, please speak up!
Thanks in advance.

Saturday, June 2, 2012

NMEA Stream re-broadcast

The NMEA Console (available at http://code.google.com/p/fullnmeaconsole/) is now fully aware of several communication channels, other than Serial port.
The data can be read from a Serial Port, UDP, or RMI. You can also replay NMEA Data, logged previously (the console has logging capabilities).
The data read from one of the channels above can be re-broadcasted on RMI, UDP, and XML over HTTP (there is a default html page displaying the data).
All the data are also cached in some HashMap, which means that any program living in the same JVM (or reaching it through RMI) can access them, without having to re-damp them (the damping factor is set at the "server" level, the one reading the data first). That is the case of all the modules coming with the console (Star Finder, Planetarium, Google Locator, etc).
If you have a wireless network (like Home Network) setup in the boat, then several machines can share the same data...
The next step would be to write a pugin for OpenCPN, so it can also re-broadcast the NMEA data... But that's another story, this is all in C++.
I also want to port the console (and more) on Android, to be able to display it on a table. The Tide application has been tested already, it's working good.
Keep posted, more to come!

Monday, May 7, 2012

Star Finder explained

The goal here was to re-build the Star Finder (2102-D, from the US Hydrographic Office).
It displays the visible sky at a given latitude, and relies on the Local Hour Angle of the vernal point (a.k.a. Aries, noted γ).
The first question was to re-elaborate the way the horizon is displayed..., what can be the equation of those "blue circles"?...

This browser does not support Applets.
Use the sliders to change the latitude and Aries LHA

The background disc represents the full sky, north and south hemispheres on one single flat disc. That's why it is so distorted for the low latitudes.
The applet above represents the Star Finder set for a Northern latitude (by default, you can change it). Keep in mind that you need to think you are sitting just under the zenith, figured with a blue dot in the middle of your sky.
Also, the outer blue circle is the horizon, the center one is the zenith, that means the closer to the blue center a star is, the highest in the sky it is. Remember, it is like if the user was sitting under the blue dot.
This is the opposite of what's usually used in most of the "land" sky maps, where stars are shown as seen from the ground, like is the user was sitting on the horizon, on the edge of the visible chart...
It can be confusing if you don't know it first.
The Star Finder uses the exact Local Hour Angle (LHA) to set the two discs on top of each other. The Sky Map approximates the LHA and by matching local time with the current calendar date. This obviously does not take the leap years in account, but considering the required precision, this is probably good enough.

Monday, April 16, 2012

User Manual available

There is a User Manual for the Weather Wizard available at lulu.com.


Support independent publishing: Buy this book on Lulu.

Monday, March 26, 2012

Shark in the San Francisco Bay?

Check out http://www.sfbaywildlife.info/species/sharks.htm, you'll learn a lot.
At least, I did!

Wednesday, March 7, 2012

New display option for faxes

There is a new display option for the faxes.
We used to have check boxes on the right side of the chart panel, to hide or show the various data (charts, faxes, GRIB file, etc).
We now have the possibility to have radio buttons (instead of the check boxes) for the faxes. A right click on the check box panel will prompt you for the option.
That allows you to scroll through the faxes one by one. One fax would be displayed at a time. That would be specially useful when a composite is targeted to display faxes of the same zone, for current time, 24h forecast, 48h forecast, 96h forecast, etc.

Saturday, February 11, 2012

Polar Stereographic Projection

Many faxes, several satellite pictures (like this), from US NOAA, UK MET, Germany DWD, French Meteo France, are using some conic projection I could not figure... it was not Lambert, not Conic Equidistant...
Fritz (from Wien, Austria) told me that could be a Stereographic projection.
I tried it, implementing it in the ChartComponent project...
Obviously, that was not right...

After watching the fax from the UK MET, the geostrophic scale explicitly says "Polar Stereographic Projection". Aha! There we are:

Now we are talking! Polar, that's all the difference.
Now, we can even stack a GRIB on top, that really makes sense.
Kudos to Fritz!

It's now available in the Weather Wizard.
More patterns are coming soon, keep posted.

Monday, January 23, 2012

Rain in the SF Bay

It's raining in the San Francisco Bay Area...
This winter has been very unusual so far, sunny and dry - and cold.
The responsible is the 500mb configuration, as explained in this article. It also explains why at the same time the weather has been so bad in Alaska.

Monday, November 28, 2011

Java-Pactor Communication, part 2

It works. Even the communication with the Icom cloning cable is working.
Below an example of the NAVTEX output we get.
The code is available at GoogleCode.

Friday, November 18, 2011

Java-Pactor Communication

I managed to establish the communication between Java code on the laptop and the SCS Pactor modem that is connected to the SSB, I've written a simple and basic character mode console that works on both Linux and Windows.
I will create a Google Code project, but in short, here are the parameters to set to the serial port:
Baud Rate: 57600 bps
Data bits: 8
Stop bits: 1
parity : none
RTS/CTS in [ ]
RTS/CTS out [x]
XON/XOFF in [ ]
XON/XOFF out [ ]
RTS : [x]
CTS : [ ]
DSR : [ ]
CD : [ ]
DTR : [x]
RI : [ ]
Notice the RTS/CTS in, that remains unchecked.
I want to be able to read Navtex data, and receive faxes in the future. That would imply some signal processing (FFT and this kind of things). That sounds interesting...