Jump to content

Recommended Posts

Posted

Hi,

 

Am trying to figure out something about some variables in the "mission" file and wondered if u could help out. Lets take the variable "lat = 0.77607826601343" is used by the ME to place objects around, then the value of this variable is transferred to the variable "x = -54070.962143947" to be used for placing the object correctly in the sim itself? How can i find the scalefactors to get the correct x and y values? to make sure the object appears in the correct place in the sim. It seems like if i load a file into the ME and the Lat and x variables dont match then i save the file then the x is controlled by the Lat and updated? The "Alt" variables is also adjusted automatically if they dont match with the new "Lat"?

System spec:

Intel Core i7 920@4.2Ghz (stable, 65degC fully loaded), EVGA GTX-780, Asus P6T Deluxe V2 v.5.04 BIOS, Saitek X52, 1TB/500GB WD HD for system/storage. Kingston SSD 120 GB for DCS, 250GB Samsung 840 SSD for the rest. 16GB Kingston KHX1600C9D3 Memory, 9 GB Pagefile, EK HFX-240 Watercooling, Corsair HX-1000 PSU. HAF-932 Tower, TrackIR-5, Win64Ult

[sIGPIC][/sIGPIC]

Posted
Hi,

 

Am trying to figure out something about some variables in the "mission" file and wondered if u could help out. Lets take the variable "lat = 0.77607826601343" is used by the ME to place objects around, then the value of this variable is transferred to the variable "x = -54070.962143947" to be used for placing the object correctly in the sim itself?

Correct. Lat/Long-values belonge to the map of MEditor. X,Y-values belonge to the sim-map(F10,ABRIS).

 

How can i find the scalefactors to get the correct x and y values?

There are several functionfiles (in LUA) in the game. Dont know the exact one.

 

It seems like if i load a file into the ME and the Lat and x variables dont match then i save the file then the x is controlled by the Lat and updated?

Correct.

My understanding is that you can create random x,y-values direct in the "mission"-file (content of tthe mission-folder *.miz). These effects the objects with the new x,y-value on the sim-map regardless wether the new x,y-values match with the long/lat-values or not. BUT if you load these changed mission (with your random x/y-values) into the MEditor then the engine looks ONLY for the long/lat-values and set the objects in the MissionEditor according the long/lat-values.

Posted

Ok i understand what u say here, but i need to get it right more or less right both in the sim directly and in the ME. I have gotten it almost right. Maybe the x,y values follows the topography and not in straight line to make things match with the altitude. Then i'm out of luck for the moment. Will look at it more when i get the time. I made some scalefactors using different criteria, but when i moved some km's away from the startpoint the error got to big to accept.

System spec:

Intel Core i7 920@4.2Ghz (stable, 65degC fully loaded), EVGA GTX-780, Asus P6T Deluxe V2 v.5.04 BIOS, Saitek X52, 1TB/500GB WD HD for system/storage. Kingston SSD 120 GB for DCS, 250GB Samsung 840 SSD for the rest. 16GB Kingston KHX1600C9D3 Memory, 9 GB Pagefile, EK HFX-240 Watercooling, Corsair HX-1000 PSU. HAF-932 Tower, TrackIR-5, Win64Ult

[sIGPIC][/sIGPIC]

Posted

The conversion between polar coordinates (lat/long) and Cartesian (x,y) doesn't use a 'scalefactor' since ED use a Gnomonic projection. See the following topic for a discussion and some working Java code (there are earlier examples in C++ but they don't do the reverse projection).

 

http://forums.eagle.ru/showthread.php?t=44427&highlight=gnomonic

 

Yoda made a sign change to make it work in FC2. You can find the equivalent working code (Yoda's port to Lua can also be found in the LEAVU2 project) at:

 

http://kenai.com/projects/leavu2/sources/subversion/content/LeavuGeneralClasses/src/nav/MapProjection.java?rev=703

 

It uses some related classes (eg. the LatLong class) in the directory:

http://kenai.com/projects/leavu2/sources/subversion/show/LeavuGeneralClasses/src/nav

Posted
The conversion between polar coordinates (lat/long) and Cartesian (x,y) doesn't use a 'scalefactor' since ED use a Gnomonic projection. See the following topic for a discussion and some working Java code (there are earlier examples in C++ but they don't do the reverse projection).

 

http://forums.eagle.ru/showthread.php?t=44427&highlight=gnomonic

 

Yoda made a sign change to make it work in FC2. You can find the equivalent working code (Yoda's port to Lua can also be found in the LEAVU2 project) at:

 

http://kenai.com/projects/leavu2/sources/subversion/content/LeavuGeneralClasses/src/nav/MapProjection.java?rev=703

 

It uses some related classes (eg. the LatLong class) in the directory:

http://kenai.com/projects/leavu2/sources/subversion/show/LeavuGeneralClasses/src/nav

 

Thanks Moa for the helpful info. Here i will have something to look at for sure :-)

System spec:

Intel Core i7 920@4.2Ghz (stable, 65degC fully loaded), EVGA GTX-780, Asus P6T Deluxe V2 v.5.04 BIOS, Saitek X52, 1TB/500GB WD HD for system/storage. Kingston SSD 120 GB for DCS, 250GB Samsung 840 SSD for the rest. 16GB Kingston KHX1600C9D3 Memory, 9 GB Pagefile, EK HFX-240 Watercooling, Corsair HX-1000 PSU. HAF-932 Tower, TrackIR-5, Win64Ult

[sIGPIC][/sIGPIC]

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...