Is there any way to calculate the altitude above sea level of a given point on the map?
Say function where I give it the (x,y) position of a point on the map and it returns the land elevation at that point?
Is there any way to calculate the altitude above sea level of a given point on the map?
Say function where I give it the (x,y) position of a point on the map and it returns the land elevation at that point?
System: Microsoft Windows 10 Pro 64 bit, 10.0.18362 N/A Build 18362, 20,437 MB |
ASUS GeForce GTX 1060 3GB | Intel Core i5-2500 Quad-Core Processor 3.3 GHz 6 MB Cache LGA 1155 | Intel DB65AL motherboard | ARCTIC Freezer i11 CPU Cooler | SVGA 500 watt power supply | Microsoft Sidewinder 2 Force Feedback joystick
Yes sir just hold you mouse over the intended spot on the map in the FMB and at the end of the coordinate numbers after the ; is the AGL in meters including tenths of a meter<S> Fatal
i7 2700 ,32 gigs, 4 ssd's ,1 7200rpm 2terabyte,1 samsung 55 display,2 mfd's,EDTRACKER,Warthog ,X55 stick, 7inch liliput monitor in mfd's 21 I-inc secondary display for instruments using virtual cockpit
[*]iustus facere unus[*] JUST MAKE ONE ( FATAL ERROR) Commander TWC http://twcpilots.com
Aha yes - but I'm hoping to be able to grab that value in a script during the middle of a mission.
There must be some way it is available as it certainly does display in FMB and also it's used frequently throughout the mission as it runs. But is it available to scripts while a mission is running?
FYI Salmo's TF_extensions .dll has a function to provide elevation at any given point, but I can't seem to get that .dll to run under CloD 4.57 any more, and he didn't provide source for the dll so I'm not certain how he did it . . .
System: Microsoft Windows 10 Pro 64 bit, 10.0.18362 N/A Build 18362, 20,437 MB |
ASUS GeForce GTX 1060 3GB | Intel Core i5-2500 Quad-Core Processor 3.3 GHz 6 MB Cache LGA 1155 | Intel DB65AL motherboard | ARCTIC Freezer i11 CPU Cooler | SVGA 500 watt power supply | Microsoft Sidewinder 2 Force Feedback joystick
Try
Code:double z = Landscape.HQ(x, y);
Aha, this was the key. Thank you.
For whatever reason, I don't seem to be able to access Landscape--perhaps I don't know what namespace it is in or something.
But I can access maddox.core.WLandscape.
However, functions H, HQ, and other interesting-looking functions in maddox.core.WLandscape are all marked as "protected".
So to get around that little issue I just made my own class derived from maddox.core.WLandscape and then I can access those functions from this derived class.
It looks like this:
Then I just access twcLandscape.HQ(), twcLandscape.H(), etc, from anywhere in my script. And it seems to work just fine.Code:class twcLandscape : maddox.core.WLandscape { public static double HQ(double x, double y) { double height = twcLandscape.cHQ((float)x, (float)y); Console.WriteLine("Height HQ" + height.ToString()); return height; } public static double H(double x, double y) { double height = twcLandscape.cH((float)x, (float)y); Console.WriteLine("Height H" + height.ToString()); return height; } public static double Hmax(double x, double y) { double height = twcLandscape.cHmax((float)x, (float)y); Console.WriteLine("cHmax" + height.ToString()); return height; } public static double Hmin(double x, double y) { double height = twcLandscape.cHmin((float)x, (float)y); Console.WriteLine("cHmin" + height.ToString()); return height; } public static double HQ_air(double x, double y) { double height = twcLandscape.cHQ_Air((float)x, (float)y); Console.WriteLine("Height HQ_air" + height.ToString()); return height; } public static double HQ_forestHeightHere(double x, double y) { double height = twcLandscape.cHQ_forestHeightHere((float)x, (float)y); Console.WriteLine("Height HQ_forestHeightHere" + height.ToString()); return height; } }
I added a few additional functions that looked like they might be useful, such as HQ_Air(), HQ_forestHeightHere(), etc.
System: Microsoft Windows 10 Pro 64 bit, 10.0.18362 N/A Build 18362, 20,437 MB |
ASUS GeForce GTX 1060 3GB | Intel Core i5-2500 Quad-Core Processor 3.3 GHz 6 MB Cache LGA 1155 | Intel DB65AL motherboard | ARCTIC Freezer i11 CPU Cooler | SVGA 500 watt power supply | Microsoft Sidewinder 2 Force Feedback joystick
Bookmarks