Re: Radar3DCoordinateSystem

Kevin-

Kevin Manross wrote:
I have had success with using Radar2DCoordinateSystem, but am having a hard time with its 3D cousin.

if I construct a Radar3DCoordinateSystem with:

latitude: 32
longitude: -113
altitude: 0

Radar3DCoordinateSystem r3D = new Radar3DCoordinateSystem(32.0f, -113.0f, 0.0f)

and I want to get the lat/lon/alt for a target at:

range: 100000m
azimuth: 90deg
elev: 2.0deg

double[][] targetCoordsRanAzElev = { {100000.0}, {90.0}, {2.0} };

and I use the toReference() method:

r3D.toReference(targetCoordsRanAzElev)

The values that I get back are the initial lat and lon (32, -113) and a different height.

I just tried a test with this program:

import visad.bom.*;

public class RadarCSTest {

    public static void main(String[] args) throws Exception{
       Radar3DCoordinateSystem r3D
           new Radar3DCoordinateSystem(32.0f, -113.0f, 0.0f);
       double[][] targetCoordsRanAzElev = { {100000.0}, {90.0}, {2.0} };
       double[][] lla = r3D.toReference(targetCoordsRanAzElev);
       System.out.println("return = " + lla[0][0] + "," + lla[1][0] + "," +
                           lla[2][0]);

    }
}

and got:

return = 32.0,-111.94030074226622,4273.730700664222

Which should be about right (due east and a little up).

Am I not using this class correctly? I tried reading through the RadarAdapter.java code to see how Radar3DCoordinateSystem is used, but the toReference() (nor the fromRefernce()) method is not called.

FWIW, my ScalarMaps are the following:

    latMap = new ScalarMap(RealType.Latitude, Display.YAxis);
    lonMap = new ScalarMap(RealType.Longitude, Display.XAxis);
    altMap = new ScalarMap(RealType.Altitude, Display.ZAxis);

Thank you very much!

We use both R2DCS and R3DCS extensively in our IDV and it
seems to work fine.

Don
*************************************************************
Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
"There's someone in my head, but it's not me"    Roger Waters
*************************************************************



  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: