Jump to content

DCS Waypoint Editor


grant977

Recommended Posts

Sorry, but this is driving me crazy. Can not get capture to work with 1.1.1. See screenshot. All the install requirements seem correct. The CAPTURE FROM F10 MAP button does not function and the QUICK CAPTURE feature returns F10 MAP NOT FOUND error. I am sure one of your earlier versions worked flawlessly. Any ideas?

WP Editor.jpg


Edited by Habu_69
Link to comment
Share on other sites

hi lasko, thank you alot for spending your time on this application for DCS !

 

i tried and i get about the same results as habu_69

here is the log, seems it doesnt find anything on my two screens (identical LCD monitors)

 

----settings.ini----

[PREFERENCES]
grace_period = 5
button_release_short_delay = 0.2
button_release_medium_delay = 0.5
tesseract_path = C:\Program Files\Tesseract-OCR\tesseract.exe
dcs_path = C:\Users\Teslank\Saved Games\DCS\
db_name = profiles_new.db
capture_key = ctrl+t
quick_capture_hotkey = ctrl+shift+t
enter_aircraft_hotkey = 
log_raw_tesseract_output = false
pysimplegui_theme = DarkBlue3
save_debug_images = false

--------------------

Program version: v1.1.1

2022-05-09 22:16:19,316:peewee: DEBUG - ('CREATE TABLE IF NOT EXISTS "profilemodel" ("id" INTEGER NOT NULL PRIMARY KEY, "name" VARCHAR(255) NOT NULL, "aircraft" VARCHAR(255) NOT NULL)', [])
2022-05-09 22:16:19,317:peewee: DEBUG - ('CREATE UNIQUE INDEX IF NOT EXISTS "profilemodel_name" ON "profilemodel" ("name")', [])
2022-05-09 22:16:19,317:peewee: DEBUG - ('CREATE TABLE IF NOT EXISTS "sequencemodel" ("id" INTEGER NOT NULL PRIMARY KEY, "identifier" INTEGER NOT NULL, "profile_id" INTEGER NOT NULL, FOREIGN KEY ("profile_id") REFERENCES "profilemodel" ("id"))', [])
2022-05-09 22:16:19,317:peewee: DEBUG - ('CREATE INDEX IF NOT EXISTS "sequencemodel_profile_id" ON "sequencemodel" ("profile_id")', [])
2022-05-09 22:16:19,318:peewee: DEBUG - ('CREATE TABLE IF NOT EXISTS "waypointmodel" ("id" INTEGER NOT NULL PRIMARY KEY, "name" VARCHAR(255), "latitude" REAL NOT NULL, "longitude" REAL NOT NULL, "elevation" INTEGER NOT NULL, "profile_id" INTEGER NOT NULL, "sequence_id" INTEGER, "wp_type" VARCHAR(255) NOT NULL, "station" INTEGER NOT NULL, FOREIGN KEY ("profile_id") REFERENCES "profilemodel" ("id"), FOREIGN KEY ("sequence_id") REFERENCES "sequencemodel" ("id"))', [])
2022-05-09 22:16:19,318:peewee: DEBUG - ('CREATE INDEX IF NOT EXISTS "waypointmodel_profile_id" ON "waypointmodel" ("profile_id")', [])
2022-05-09 22:16:19,319:peewee: DEBUG - ('CREATE INDEX IF NOT EXISTS "waypointmodel_sequence_id" ON "waypointmodel" ("sequence_id")', [])
2022-05-09 22:16:19,319:db: DEBUG - Connected to database
2022-05-09 22:16:19,323:gui: INFO - Tesseract path is: C:\Program Files\Tesseract-OCR\tesseract.exe
2022-05-09 22:16:19,462:gui: INFO - Tesseract version is: 5.0.1.20220118
2022-05-09 22:16:19,462:gui: DEBUG - Creating GUI
2022-05-09 22:16:19,465:peewee: DEBUG - ('SELECT "t1"."id", "t1"."name", "t1"."aircraft" FROM "profilemodel" AS "t1"', [])
2022-05-09 22:16:22,364:gui: DEBUG - Event: capture
2022-05-09 22:16:22,365:gui: DEBUG - Values: {'profileSelector': '', 'activesList': [], 'hornet': True, 'harrier': False, 'tomcat': False, 'viper': False, 'mirage': False, 'warthog': False, 0: None, 'baseSelector': '', 'CA': False, 'MA': False, 'NV': False, 'PG': False, 'SY': False, 'msnName': '', 'WP': True, 'MSN': False, 'FP': False, 'ST': False, 'IP': False, 'DP': False, 'HA': False, 'HB': False, 'sequence': 'None', 'North': True, 'South': False, 'latDeg': '', 'latMin': '', 'latSec': '', 'East': True, 'West': False, 'lonDeg': '', 'lonMin': '', 'lonSec': '', 'elevFeet': '', 'elevMeters': '', 'mgrs': ''}
2022-05-09 22:16:26,491:gui: DEBUG - Attempting to capture map coords
2022-05-09 22:16:26,554:gui: DEBUG - Looking for map on screen 1
2022-05-09 22:16:26,721:gui: DEBUG - Minval: -0.2995784878730774 Maxval: 0.672717809677124 Minloc: (1316, 391) Maxloc: (10, 0)
2022-05-09 22:16:26,721:gui: DEBUG - Looking for map on screen 2
2022-05-09 22:16:26,900:gui: DEBUG - Minval: -0.474016010761261 Maxval: 0.614976167678833 Minloc: (1456, 547) Maxloc: (981, 314)
2022-05-09 22:16:26,900:gui: DEBUG - Raise exception (could not find the map anywhere i guess)
2022-05-09 22:16:26,901:gui: ERROR - Failed to parse captured text
Traceback (most recent call last):
  File "src\gui.py", line 680, in add_parsed_coords
  File "src\gui.py", line 567, in capture_map_coords
ValueError: F10 map not found
2022-05-09 22:16:38,312:gui: DEBUG - Attempting to capture map coords
2022-05-09 22:16:38,370:gui: DEBUG - Looking for map on screen 1
2022-05-09 22:16:38,531:gui: DEBUG - Minval: -0.3976092040538788 Maxval: 0.672717809677124 Minloc: (1171, 296) Maxloc: (10, 0)
2022-05-09 22:16:38,531:gui: DEBUG - Looking for map on screen 2
2022-05-09 22:16:38,697:gui: DEBUG - Minval: -0.474016010761261 Maxval: 0.614976167678833 Minloc: (1456, 547) Maxloc: (981, 314)
2022-05-09 22:16:38,698:gui: DEBUG - Raise exception (could not find the map anywhere i guess)
2022-05-09 22:16:38,698:gui: ERROR - Failed to parse captured text
Traceback (most recent call last):
  File "src\gui.py", line 680, in add_parsed_coords
  File "src\gui.py", line 567, in capture_map_coords
ValueError: F10 map not found
2022-05-09 22:18:08,898:gui: DEBUG - Attempting to capture map coords
2022-05-09 22:18:08,960:gui: DEBUG - Looking for map on screen 1
2022-05-09 22:18:09,130:gui: DEBUG - Minval: -0.4399273693561554 Maxval: 0.6727171540260315 Minloc: (163, 785) Maxloc: (10, 0)
2022-05-09 22:18:09,130:gui: DEBUG - Looking for map on screen 2
2022-05-09 22:18:09,287:gui: DEBUG - Minval: -0.26754677295684814 Maxval: 0.5147337317466736 Minloc: (32, 299) Maxloc: (29, 216)
2022-05-09 22:18:09,288:gui: DEBUG - Raise exception (could not find the map anywhere i guess)
2022-05-09 22:18:09,288:gui: ERROR - Failed to parse captured text
Traceback (most recent call last):
  File "src\gui.py", line 680, in add_parsed_coords
  File "src\gui.py", line 567, in capture_map_coords
ValueError: F10 map not found
2022-05-09 22:19:07,386:gui: DEBUG - Attempting to capture map coords
2022-05-09 22:19:07,431:gui: DEBUG - Looking for map on screen 1
2022-05-09 22:19:07,587:gui: DEBUG - Minval: -0.4399273693561554 Maxval: 0.6727171540260315 Minloc: (163, 785) Maxloc: (10, 0)
2022-05-09 22:19:07,587:gui: DEBUG - Raise exception (could not find the map anywhere i guess)
2022-05-09 22:19:07,587:gui: ERROR - Failed to parse captured text
Traceback (most recent call last):
  File "src\gui.py", line 680, in add_parsed_coords
  File "src\gui.py", line 567, in capture_map_coords
ValueError: F10 map not found
2022-05-09 22:19:14,619:gui: DEBUG - Attempting to capture map coords
2022-05-09 22:19:14,680:gui: DEBUG - Looking for map on screen 1
2022-05-09 22:19:14,837:gui: DEBUG - Minval: -0.4399273693561554 Maxval: 0.672717809677124 Minloc: (163, 785) Maxloc: (10, 0)
2022-05-09 22:19:14,837:gui: DEBUG - Raise exception (could not find the map anywhere i guess)
2022-05-09 22:19:14,837:gui: ERROR - Failed to parse captured text
Traceback (most recent call last):
  File "src\gui.py", line 680, in add_parsed_coords
  File "src\gui.py", line 567, in capture_map_coords
ValueError: F10 map not found
2022-05-09 22:23:06,659:gui: DEBUG - Event: None
2022-05-09 22:23:06,659:gui: DEBUG - Values: None
2022-05-09 22:23:06,659:gui: INFO - Exiting...
2022-05-09 22:23:06,662:root: INFO - Finished
 

 

Link to comment
Share on other sites

On 5/10/2022 at 7:18 AM, Habu_69 said:

Sorry, but this is driving me crazy. Can not get capture to work with 1.1.1. See screenshot. All the install requirements seem correct. The CAPTURE FROM F10 MAP button does not function and the QUICK CAPTURE feature returns F10 MAP NOT FOUND error. I am sure one of your earlier versions worked flawlessly. Any ideas?

The F10 map not found issue is a tough one, I haven't figured out what triggers it.  There is something with the way the screen capture interacts with DCS that the screen isn't always complete, or is just a blank base map.

However...  In the screen capture you posted, the DCSWE window is obscuring the coordinates at the top.  The screen capture looks for the blue MAP letters, then finds the numbers to the right of it.  Anything obscuring that like in the screen capture, the frame rate display, SRS window or anything else in the top left corner will make it fail.  Here is the sample it is looking for:

image.png

But this example here will definitely cause it to fail because the sample MAP that it looks for won't be found.

image.png

One other thing you can do is change settings.ini save_debug_images = true.  This will save the images that it captures in a directory for each capture attempt.  When you get an F10 error, the image should show you what was captured and it will probably be obvious why it couldn't find the blue MAP letters.

Link to comment
Share on other sites

Tested. Screenshot and log attached. I noticed that no cursor symbol is visible in screenshot, otherwise all looks normal. My OS is Win 11. Another symptom is that shown profiles will no longer load into cockpit. I have already tried DCS Repair and reinstalling  support programs. Can you provide one of your versions from March timeframe to test?

Habu DCSWE Debug.jpg

log.txt

Link to comment
Share on other sites

I found the problem, not sure what the fix is.  The screen scaling is different, so the sample MAP text is not the right size.  If it doesn't find a 90% match it assumes it did not find the F10 map.

image.png

The top one if from your image, second is what it is looking for, and third is the one I get for 1080 screen capture.  Do you have font scaling or GUI scaling turned on?

Link to comment
Share on other sites

13 hours ago, Lasko said:

I found the problem, not sure what the fix is.  The screen scaling is different, so the sample MAP text is not the right size.  If it doesn't find a 90% match it assumes it did not find the F10 map.

image.png

The top one if from your image, second is what it is looking for, and third is the one I get for 1080 screen capture.  Do you have font scaling or GUI scaling turned on?

Ahaa! Good work. Win 11 scaling interface is somewhat different than Win 10, but I have TEXT SCALING set at 140% on a 1440x2560 monitor. Wonder how scaling might be different from selecting a larger default OS font. I will do some testing later today.

Link to comment
Share on other sites

Reset DCS Controls GUI scale from 1.25 to 1.00 and now capture works!. BUT NOW . . . WP are not loading into Hornet. That was working, so must be something on my end. Will work on that now.

Edit: OK, cockpit loading was issue with DCS-BIOS script. AT LAST, I think I have DCSWE working as intended. Very much appreciate Lasko's diligence, especially catching the MAP title problem. Convinced the culprit was the DCS\Controls GUI scaling.

Very helpful little utility.


Edited by Habu_69
Link to comment
Share on other sites

A beta version for Apache support was just published.  I also added a capture option to the use the same method as The Way to capture coordinates without using Tesseract OCR.  This works by moving the center point of the F10 map to the coordinates you want to capture, then retrieving the camera position directly from DCS.

v1.2.0 Beta 1

  • Added AH64D Pilot and CPG support. Apache functions are preliminary and have not been tested. The key sequences were created based on the ED Apache Quick Start Manual. Apache support also requires updated DCS Bios.
  • Added settings option for default aircraft type. This previously was set to "hornet" automatically.
  • Added capture option for the The Way LUA data source. If you have previously installed The Way in Export.lua, the "Capture from The Way" button will connect to the data source and capture the coordinates for the current camera view. When on the F10 map, it captures the center of the map. The Way displays a dot in the center of the display to mark the location being captured, which does not seem possible in Python. The target dot can be displayed using The Way, or the included Target-jar-with-dependencies.jar which requires Java JRE.

Edited by Lasko
Added link
  • Like 1
Link to comment
Share on other sites

2 hours ago, Teslank said:

it doesnt say "MAP" in top right corner but "CARTE"

Good catch, that will never work.  You might try the new version that uses the LUA capture.  It doesn't need to read anything from the screen so that would work fine. 

Link to comment
Share on other sites

is it possible to get the coordinates , when i click on a enemy icon, example a sam site, at the bottom left a window appears with all the precise information, because only hovering over the icon with the mouse i get some precision errors, so when bombing a small tank i would often miss by like 10 meters

 

thanks again 🙂

Link to comment
Share on other sites

1 hour ago, Teslank said:

is it possible to get the coordinates , when i click on a enemy icon

Not sure if that is possible, and the altitude being on a separate line complicates it.  To be really precise, I would zoom the map in far enough to provide better accuracy.

  • Like 1
Link to comment
Share on other sites

21 hours ago, Teslank said:

do you think its possible to speed up the number entry into the ufc?

I don't have any knowledge about that part of the code or interaction with DCS Bios.  Since you mentioned UFC, I assume this is for F18?  I time it as entering 16 digit waypoint in 12 seconds, or mission point with elevation in 16 seconds.  That does not seem unreasonable.

Link to comment
Share on other sites

On 5/15/2022 at 1:56 PM, Teslank said:

do you think its possible to speed up the number entry into the ufc? i do it quite faster manually using my keynum pad, just need a pause when entering precise numbers

 

🙂

I updated 2 year old DCS-BIOS to latest and noticed considerably faster data entry.

Link to comment
Share on other sites

10 hours ago, Lasko said:

I don't have any knowledge about that part of the code or interaction with DCS Bios.  Since you mentioned UFC, I assume this is for F18?  I time it as entering 16 digit waypoint in 12 seconds, or mission point with elevation in 16 seconds.  That does not seem unreasonable.

yes i mainly use wp editor for fa18 bombing runs, i usually fit 8 bombs or agm's

so 12 secs X 8 more than a minute 😄

Link to comment
Share on other sites

5 hours ago, Habu_69 said:

I updated 2 year old DCS-BIOS to latest and noticed considerably faster data entry.

Can u post a link to it?

i9 14900K / 64GB / RTX 4090 / Varjo Aero / Winwing Orion2 + F15EX / Virpil Wrbrd + Alpha Stick + ACE pedals

Link to comment
Share on other sites

3 hours ago, Lasko said:

https://github.com/DCSFlightpanels/dcs-bios/releases

I've been using  DCS-BIOS_0.7.44.zip for all testing.  Also if you want to use the AH64D, you need the updated BIOS.lua and lib/AH-64D.lua from the repository which have not been packaged in a release yet.

Thks.  Just checking...Is this just for stable version or works also with open beta? (think I have another DCS bios installed ... but very old and not sure which one)

 

ok just tried and answer is yes


Edited by Brainfreeze

i9 14900K / 64GB / RTX 4090 / Varjo Aero / Winwing Orion2 + F15EX / Virpil Wrbrd + Alpha Stick + ACE pedals

Link to comment
Share on other sites

A new version is now available with working AH64 waypoint entry.  DCS Bios has to be fully updated from the DCSFlightpanels/dcs-bios repository.  There are changes in multiple files, beyond just the two that I originally thought were needed.

v1.2.0 Beta 2

  • Corrected AH64D sequences. The first three characters of the waypoint name are entered in the FREE field.
  • Set default aircraft when loading a blank profile.
  • Added debug output for F16 keypresses.
  • Like 1
Link to comment
Share on other sites

Hey @Lasko, Razbam changed the AV8B in the latest update and now, if no waypoint is preloaded it creates a wpt1 automatically... problem is waypoint editor creates waypoints using wpt77 so that it picks the next available slot ... that is messing up everything now.   Is it possible to modify it so that it actually use the wpt number entered in it rather than 77?  This way wpt1 would just get overidden.

i9 14900K / 64GB / RTX 4090 / Varjo Aero / Winwing Orion2 + F15EX / Virpil Wrbrd + Alpha Stick + ACE pedals

Link to comment
Share on other sites

It looks like the 77 is arbitrary, a different implementation uses 99.  Are you sure that's the problem?  It might be related to this:

DCS: AV-8B N/A by RAZBAM Simulations

  • Fixed: Steerpoint elevation is automatically updated when entering coordinates
Link to comment
Share on other sites

  • Recently Browsing   0 members

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