> Subject: Problems with degrees and maths operations
> Date: Thu, 15 Aug 2002 16:01:27 +1000
> From: James Kelly <j.kelly@xxxxxxxxxx>
> Organization: ?
> To: visad-list@xxxxxxxxxxxxx
The above message contained the following:
> I have positional data containing latitudes and longitudes, and wish
> to to get the average position. There are some useful Data methods
> such as "add" and "divide" which help here.
> However I'm getting some unexpected results, as illustrated by the
> attached code (AverageUnits.java)
I modified some core VisAD classes (primarily RealType, Real, and
FlatField) to solve your problem. A new VisAD release that incorporates
these changes can be found at
It passes the test program that you sent (thanks!).
The code that was modified is complex, fundamental to the VisAD package,
and extremely difficult to exhaustively test. If you encounter problems,
would you please notify me immediately.