Case Posted May 29, 2010 Posted May 29, 2010 The Problem The ruler tool in the Flaming Cliffs 2.0 and Black Shark mission editors returns the wrong bearings. Due to the difference between the map in the editor, which is spherical, and the map in the game, which is flat, the bearing measured in the editor can be off by as much as 4 to 7 degrees. This will makes lining up units with features on the map very tedious. The Solution Replace BlackShark\modules\me_map_window.lua for LockOn Flaming Cliffs 2.0 and/or DCS:Black Shark with the file in the attachment below. The attachment changes the code in BlackShark\modules\me_map_window.lua from --local x1,z1 = Roads.xz(tape.points[1][1].x, tape.points[1][1].y) --local x2,z2 = Roads.xz(tape.points[1][2].x, tape.points[1][2].y) --local dist = base.math.floor(base.math.sqrt((x1-x2)*(x1-x2)+(z1-z2)*(z1-z2))+0.5) local lat1 = tape.points[1][1].x local long1 = tape.points[1][1].y local lat2 = tape.points[1][2].x local long2 = tape.points[1][2].y local dist = base.math.floor(db.getDist(lat1, long1, lat2, long2)) --local ang = base.math.mod(base.math.floor(360+90-base.math.atan2(lat2-lat1, long2-long1)*180/base.math.pi), 360) local cos = base.math.cos; local sin = base.math.sin; local atan2 = base.math.atan2; local pi = base.math.pi; local dl = long2 - long1; ang = atan2(sin(dl)*cos(lat2), cos(lat1)*sin(lat2) - sin(lat1)*cos(lat2)*cos(dl)); to local x1,z1 = Roads.xz(tape.points[1][1].x, tape.points[1][1].y) local x2,z2 = Roads.xz(tape.points[1][2].x, tape.points[1][2].y) local dist = base.math.floor(base.math.sqrt((x1-x2)*(x1-x2)+(z1-z2)*(z1-z2))+0.5) --local lat1 = tape.points[1][1].x --local long1 = tape.points[1][1].y --local lat2 = tape.points[1][2].x --local long2 = tape.points[1][2].y --local dist = base.math.floor(db.getDist(lat1, long1, lat2, long2)) --local ang = base.math.mod(base.math.floor(360+90-base.math.atan2(lat2-lat1, long2-long1)*180/base.math.pi), 360) --local cos = base.math.cos; --local sin = base.math.sin; local atan2 = base.math.atan2; local pi = base.math.pi; --local dl = long2 - long1; --ang = atan2(sin(dl)*cos(lat2), cos(lat1)*sin(lat2) - sin(lat1)*cos(lat2)*cos(dl)); ang = atan2(z2-z1,x2-x1) Essentially, the bug was that the bearing was calculated for the spherical mission editor map, not on the flat game map.me_map_window.rar 6 There are only 10 types of people in the world: Those who understand binary, and those who don't.
crazyeddie Posted May 29, 2010 Posted May 29, 2010 If this works I will personally offer to bear your babies ... this problem has pi**ed me off for ages. Will give you feedback tomorrow, when I'm sober ... 1
Panzertard Posted May 29, 2010 Posted May 29, 2010 Much appreciated, such a small issue can be really annoying. Thanks for the fix, bud :) The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning
Grimes Posted May 29, 2010 Posted May 29, 2010 Win. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
LawnDart Posted May 29, 2010 Posted May 29, 2010 +1 That's great! Any idea if there's a fix for the LAT/LONG coordinates as well? [sigpic]http://www.virtualthunderbirds.com/Signatures/sig_LD.jpg[/sigpic] Virtual Thunderbirds, LLC | Sponsored by Thrustmaster Corsair 750D Case | Corsair RM850i PSU | ASUS ROG MAXIMUS X CODE | 32GB Corsair DDR4 3200 | Intel i7-8086K | Corsair Hydro H100i v2 Cooler | EVGA GTX 1080 Ti FTW | Oculus Rift | X-Fi Titanium Fatal1ty | Samsung SSD 970 EVO 1TB NVMe | Samsung SSD 850 EVO 1TB | WD Caviar Black 2 x 1TB | TM HOTAS Warthog | TM Pendular Rudder | TM MFD Cougar Pack | 40" LG 1080p LED | Win10 |
Kuky Posted May 30, 2010 Posted May 30, 2010 Great! PC specs: Windows 11 Home | Asus TUF Gaming B850-Plus WiFi | AMD Ryzen 7 9800X3D + LC 360 AIO | MSI RTX 5090 LC 360 AIO | 55" Samsung Odyssey Gen 2 | 64GB PC5-48000 DDR5 | 1TB M2 SSD for OS | 2TB M2 SSD for DCS | NZXT C1000 Gold ATX 3.1 1000W | TM Cougar Throttle, Floor Mounted MongoosT-50 Grip on TM Cougar board, MFG Crosswind, Track IR
Moa Posted May 30, 2010 Posted May 30, 2010 +1 That's great! Any idea if there's a fix for the LAT/LONG coordinates as well? The mapping from Lat/Long to in-game x,y is complicated. This is because an Gnomonic projection is used to project the spherical surface onto a flat plane. The formulae for the projection (and its inverse) can be found in the following thread: http://forums.eagle.ru/showthread.php?t=44427 For the working Java code I wrote for LEAVU2 (including a bugfix by Yoda) see the MapProjection class in the LEAVU2 source code at: http://kenai.com/projects/leavu2/sources/subversion/content/LeavuGeneralClasses/src/nav/MapProjection.java
STP Dragon Posted May 30, 2010 Posted May 30, 2010 Thx for that! :) Homepage: Spare-Time-Pilots DCS:BlackShark v1.0.2: BLINDSPOTs EditorMod DRAGONs ArmA2-Sounds DRAGONs BS1 TRAININGPACK DRAGONs MISSIONPACK [bS & FC2] DCS:World: TM WARTHOG PROFIL FOR BS2 DRAGONs BS2_TRAININGPACK DRAGONs TRAININGPACK DRAGONs MISSIONPACK
crazyeddie Posted May 30, 2010 Posted May 30, 2010 Brilliant mate - now about the babies ... I was pi**ed when I said it and I have this no womb problem ... can we negotiate.
Case Posted May 30, 2010 Author Posted May 30, 2010 Brilliant mate - now about the babies ... I was pi**ed when I said it and I have this no womb problem ... can we negotiate.At the moment I have no need for babies, so it's your lucky day :D 1 There are only 10 types of people in the world: Those who understand binary, and those who don't.
Vecko Posted June 14, 2010 Posted June 14, 2010 (edited) Ah finaly ,blocks on road again...:D TY Case,S! P.S.And here is madman pack for lazy peoples...Mission Editor Bearing Bug Fix.rar Edited June 14, 2010 by Vecko [sIGPIC][/sIGPIC] Virtual Aerial Operations
X-man Posted June 15, 2010 Posted June 15, 2010 Good stuff Case! :thumbup: 1 64th Aggressor Squadron Discord: 64th Aggressor Squadron TS: 135.181.115.54
Case Posted June 15, 2010 Author Posted June 15, 2010 P.S.And here is modman pack for lazy peoples...Thanks Vecko! There are only 10 types of people in the world: Those who understand binary, and those who don't.
coolts Posted June 15, 2010 Posted June 15, 2010 Brilliant mate - now about the babies ... I was pi**ed when I said it and I have this no womb problem ... can we negotiate. At the moment I have no need for babies' date=' so it's your lucky day :D[/quote'] Dont let the whole no-womb thing be a problem guys. Arnie got round that one ! :megalol: [sIGPIC][/sIGPIC] i7 9700k | 32gb DDR4 | Geforce 2080ti | TrackIR 5 | Rift S | HOTAS WARTHOG | CH PRO Pedals
Vecko Posted June 15, 2010 Posted June 15, 2010 I don't know do you all guys realise but this bug is driving crazy mission designers since DCS come out.this is realy good peace of work and it should be uploaded on lockon files. [sIGPIC][/sIGPIC] Virtual Aerial Operations
christopher m Posted June 20, 2010 Posted June 20, 2010 (edited) I wonder if we can merge this mod with "Mission Editor Mod" by Blindspot http://forums.eagle.ru/showthread.php?t=55186&highlight=editor Regards, Edited June 20, 2010 by christopher m ad url [sIGPIC][/sIGPIC] Christopher M
Shaman Posted June 27, 2010 Posted June 27, 2010 Is this already part of Blindspot'sME from version 1.6? If it is not, if I install this modman file on top of Blindspot'sME will I break something? Since Blindspot'sME comes with own me_map_window.lua. Do you have any information how the mission plays when copied to computers without the mod? Any misalignment then? Or over multiplayer? 51PVO Founding member (DEC2007-) 100KIAP Founding member (DEC2018-) :: Shaman aka [100☭] Shamansky tail# 44 or 444 [sIGPIC][/sIGPIC] 100KIAP Regiment Early Warning & Control officer
Case Posted June 27, 2010 Author Posted June 27, 2010 This fix does not affect multiplayer and missions made with a ME using the fix will play perfectly on machines with the ME without the fix. There are only 10 types of people in the world: Those who understand binary, and those who don't.
Blindspot Posted June 28, 2010 Posted June 28, 2010 It's not part of 1.6 but will be in 1.7. I promise :) Я только понимаю Вокзал.
combatace Posted July 7, 2010 Posted July 7, 2010 Well there is a problem in this mod I think. I have to set point target little south to hit the it. To support my models please donate to paypal ID: hp.2084@gmail.com https://www.turbosquid.com/Search/Artists/hero2084?referral=hero2084
Vecko Posted July 7, 2010 Posted July 7, 2010 Well there is a problem in this mod I think. I have to set point target little south to hit the it. This mod just fixing bearing , correct positioning of units and target spots are still broken... [sIGPIC][/sIGPIC] Virtual Aerial Operations
combatace Posted July 8, 2010 Posted July 8, 2010 This mod just fixing bearing , correct positioning of units and target spots are still broken... Oh! so its not due to this mod. To support my models please donate to paypal ID: hp.2084@gmail.com https://www.turbosquid.com/Search/Artists/hero2084?referral=hero2084
Vecko Posted July 8, 2010 Posted July 8, 2010 Oh! so its not due to this mod. Correct ! [sIGPIC][/sIGPIC] Virtual Aerial Operations
Gaanalma Posted March 23, 2013 Posted March 23, 2013 Unfortunately I have to reopen this old topic of FC2 for a problem that I'm experiencing between editor and cdu entries in the A-10C ... If you try to measure the distance and the bearing of the editor to reach a target starting from the bullseye when I insert data in the CDU by Oset of my A-10C, they lead me off course ... I get the impression that the problem detected in FC2 is also transferred to the DCS World ... Can someone test how to mè exposed and see if it is my problem or the simulator? thanks [sIGPIC][/sIGPIC] www.36stormovirtuale.net
Recommended Posts