Re: Multigen HL database origin location

New Message Reply Date view Thread view Subject view Author view

Marko Srdanovic (mas++at++swl.msd.ray.com)
Mon, 19 May 1997 20:21:55 -0400


Christopher R Volpe wrote:
>
> Does anyone (e.g. Marcus?) happen to know what the lat/long location is
> for the origin in the Multigen OpenFlight Hunter-Ligget database on the
> Performer 2.0 CD?

I don't have the database loaded on my system so I can't check myself
but I have attached some (hacked) code that will read the Multigen
header information and print the origin of the database. The values you
get back are double precision numbers so you may have to convert to a
format you need. There is a bunch other information in the header such
as corners of the database, units, etc... (see HEADERcb in pfflt.h).
Some databases I've seen don't always fill in the origin, but use the
corner(s) instead. If you have Multigen, use that to verify the results
of the program.

This code was extracted from a larger program but it should still work.
I tried it using Performer 2.0.2, version 15.2d of the Multigen loader
and IRIX 5.3.

...
> somewhere. Since both databases are in feet, I'm hoping that
> incorporating a translational offset between the two databases will
> solve the problem. If I knew the lat/long position of the origin of each
> database, I could compute this translational offset.

I thought the database was modelled in meters, but again I don't have
the database loaded, so I can't check. The units are also part of the
header information. You should be able to use all this information to
correlate the two databases.

PS. Say "hello" to Rick and Lisa for me...

-- 
-----------------------------------------------------------------------
Marko Srdanovic                             mailto:mas++at++swl.msd.ray.com
Raytheon Electronic Systems                 voice: (508) 858-5680
Mailstop: T3MN35                            fax:   (508) 858-4336
50 Apple Hill Drive, Tewksbury, MA 01876    #include <std/disclaimer.h>
-----------------------------------------------------------------------

#include <iostream.h>

// Performer includes #include <Performer/pf/pfNode.h> #include "pfflt.h"

double CB_Header_Lat; double CB_Header_Lon;

void HeaderCallBack( pfNode *, int mgOp, int *cbs, COMMENTcb *, void* ) { switch ( mgOp ) { case CB_HEADER: CB_Header_Lat = ((HEADERcb *)(cbs))->originlat1; CB_Header_Lon = ((HEADERcb *)(cbs))->originlong1; break; default: break; } }

int main(int argc, char **argv) { pfNode *root; const char *fltfile; if (argc != 2) { cerr << "Usage: " << argv[0] << " filename.flt" << endl; return -1; } else { fltfile = argv[1]; cout << "Flight file: " << fltfile << endl; } pfInit();

// use default multiprocessing mode based on number of processors pfMultiprocess(PFMP_DEFAULT); // configure multiprocessing mode and start parallel process pfConfig(); fltRegisterNodeT pFunc = HeaderCallBack; void *hFunc = &pFunc; // NOTE: do not attempt "& myCallback" here !!! // the C language will ignore the "&". pfdConverterAttr_flt(PFFLT_REGISTER_NODE, hFunc); root = pfdLoadFile_flt(fltfile);

cout << "Lat: " << CB_Header_Lat << endl; cout << "Lon: " << CB_Header_Lon << endl;

return 0; }

======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:15 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.