Thursday, November 23, 2006

Glassfish and socket problems

I was trying use gnu.hylafax libraries (a libraries that implement the HylaFAX protocol, similar to the FTP) to comunicate with a HylaFAX server.
I had created an EJB module with a class containig all the necessary code. I had been tested it in a simple java application and works fine, but when I put it into the EJB class, it fails. See the post at: Hylafax connection into an EJB module to see the error.

To resume the error was in the socket implementation. Looking for help I saw that many people has the same problem, and the solution was to do (see
Unable to launch the Java AppServer or Timeout waiting for domain1 to start):

  • cd \domains\domain1
  • edit config\domain.xml
  • search for elements like
  • add -Dcom.sun.enterprise.server.ss.ASQuickStartup=false
  • save the file.

Saturday, November 18, 2006

A bit of quaternions

I need to implement some kind of "go to" function in The Balloon Project, that is, give the user the possility to go to any position of the planet experssed in lat/lon.

Looking for information about how to do this I found (an extensive list of links) but this two resumes very well the concepts and the utility of quaternions.

  1. http://www.isner.com/tutorials/quatSpells/quaternion_spells_14.htm
  2. http://www.gamedev.net/reference/articles/article1095.asp
Expressin rotations in Euler angles are not always a good way, first because exists the gimbal lock problem and second because I want interpolate between two angles to animate the rotation of the camera from one point to other. Quaternions solves this two problems.