public static long fHtmEq(double ra, double dec) { double x, y, z; HtmTrixel ht = new HtmTrixel(); SpatialVector.radec2cartesian(ra, dec, out x, out y, out z); return ht.cartesian2HID(x, y, z, level); }
public static long fHtmLatLon(double lat, double lon) { double x, y, z; HtmTrixel ht = new HtmTrixel(); SpatialVector.radec2cartesian(lon, lat, out x, out y, out z); return ht.cartesian2HID(x, y, z, level); }
public static long fHtmXyz(double x, double y, double z) { // avoid zero vectors by setting them to 1,0,0. if (Cartesian.Epsilon2 > (x * x + y * y + z * z)) { x = 0; y = 0; z = 1; } HtmTrixel ht = new HtmTrixel(); return ht.cartesian2HID(x, y, z, level); }