Josh Radford 956529 Posted June 22, 2009 at 03:57 PM Posted June 22, 2009 at 03:57 PM Hey guys, I'm currently developing a couple of applications that interface with sector files, and I've run into an interesting situation. According to the VRC docomeentation, the 6th and 7th lines of the [iNFO] section define the distance (in nm) between lines of latitude and longitude, respectively. I [Mod - Happy Thoughts]umed this information is used to "scale" the sector file within VRC so that it is displayed properly. However, today I opened up the CYYZ_TWR sector file and noticed that these values are huge! Excerpt from file: [INFO] TORONTO TOWER V4.3 CYYZ_TWR CYYZ N043.40.37.800 W079.37.49.800 800 <<----These values are huge! 578 <<---- 10 13.300000 The weird thing is, VRC still displays the sector file normally. In addition, I'm able to change these values to anything and VRC still displays the sector normally!! My question is this: What does VRC base its distance information on? Somewhere along the line, latitude and longitude must be converted into screen coordinates to be displayed on the screen. Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
Ross Carlson Posted June 22, 2009 at 06:11 PM Posted June 22, 2009 at 06:11 PM VRC uses both values to determine a scale factor, by dividing the "miles per degree of longitude" value by the "miles per degree of latitude" value. So if the values are 45 and 60 (typical for a sector file at 45 degrees of lat,) the scale factor would be .75. VRC scope windows are drawn using the lat/lon coordinate system, and the display is scaled (squeezed) along the x axis by this scaling factor. Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy Senior Controller, Boston Virtual ARTCC Link to comment Share on other sites More sharing options...
Josh Radford 956529 Posted June 25, 2009 at 02:00 AM Author Posted June 25, 2009 at 02:00 AM Thanks Ross. That clears things up a lot for me. I'm guessing that, on top of this scaling factor, there is also a standard scaling factor employed by the program for mapping lat/lon coords into screen space? Link to comment Share on other sites More sharing options...
Ross Carlson Posted June 25, 2009 at 02:03 AM Posted June 25, 2009 at 02:03 AM Thanks Ross. That clears things up a lot for me. I'm guessing that, on top of this scaling factor, there is also a standard scaling factor employed by the program for mapping lat/lon coords into screen space? That's taken care of by the graphics library, which in this case is OpenGL. I define a viewport using screen coordinates, and I define a "projection", using lat/lon extents, and OpenGL takes care of the mapping. Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy Senior Controller, Boston Virtual ARTCC Link to comment Share on other sites More sharing options...
Josh Radford 956529 Posted June 25, 2009 at 02:06 AM Author Posted June 25, 2009 at 02:06 AM Perfect. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts