Author Topic: Enter Coordinates using Voice: What's the best way  (Read 3352 times)

Mode1961

  • Newbie
  • *
  • Posts: 14
Enter Coordinates using Voice: What's the best way
« on: July 14, 2020, 05:00:15 AM »
Coordinates consist of Degrees, Minutes, Seconds and Decimal Seconds, plus North or South, East or West.

So, in Digital Combat Simulator F-18 Hornet, I am creating a profile to allow me to enter both targets and waypoints into the Upfront Control Panel.

I have it working fairly well but was wondering if there is a better way.

Currently, I use the following style of command(s).

I say "North Degrees 45", then "North Minutes 10", then "North Seconds 12" and finally "North Decimal 47", it saves them to relevant variables.

(1) I would love to be able to just say "North 45 10 12.47, the problem is that there are just too many options for it as the command would look like this

North [0..90] [0..60] [0..60] point [0..60] which would give approx 19 million permutations which obviously is just too large.


Is there a better way to do this while being able to just say what is in line (1)



Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4790
  • RTFM
Re: Enter Coordinates using Voice: What's the best way
« Reply #1 on: July 14, 2020, 05:36:42 AM »
To be able to speak the command as a single phrase you'd need a lot of permutations, as you've mentioned.


To make entry slightly more fluid, you could do something like
[North;South;East;West] [0..90]
Code: [Select]
Play sound, 'C:\Windows\Media\Windows Default.wav'
Wait for spoken response: '[0..60]'
Play sound, 'C:\Windows\Media\Windows Default.wav'
Wait for spoken response: '[0..60]'
Play sound, 'C:\Windows\Media\Windows Default.wav'
Wait for spoken response: 'point [0..60]'
Begin Text Compare : [{CMD}] Starts With 'North'
    Press N key and hold for 0,01 seconds and release
Else If Text Compare : [{CMD}] Starts With 'East'
    Press E key and hold for 0,01 seconds and release
Else If Text Compare : [{CMD}] Starts With 'East'
    Press S key and hold for 0,01 seconds and release
Else
    Press W key and hold for 0,01 seconds and release
End Condition
Write [Blue] '{CMDSEGMENT:0}, {TXTNUM:"{CMD}"} degrees, {TXT:~minutes} minutes, {TXT:~seconds}, decimal {TXT:~decimal}' to log
It'll still create some phrase variations, but hundreds rather than millions, and you'd be able to speak "North 45...10...12...point 47"; It still requires pausing, but less so than having it all as separate commands.

Not sure if you're using VR, but either way as the "Wait For Spoken Response" action doesn't provide any log feedback, I like to use a sound to confirm input was recognized (you could replace that with or add on a "Write a Value to the Event Log" action, if you prefer).

Obviously you'll have to adapt that to press the actual keys DCS expects, including typing the numbers.

Mode1961

  • Newbie
  • *
  • Posts: 14
Re: Enter Coordinates using Voice: What's the best way
« Reply #2 on: July 14, 2020, 01:07:20 PM »
Thanks, gonna look at that.

The input, getting numbers is a different command than the output, pressing the keys but hoping this will work.

Mode1961

  • Newbie
  • *
  • Posts: 14
Re: Enter Coordinates using Voice: What's the best way
« Reply #3 on: July 14, 2020, 01:27:28 PM »
It works almost perfectly and so much better than my way right now.

Thanks so much

filthymanc

  • Newbie
  • *
  • Posts: 4
Re: Enter Coordinates using Voice: What's the best way
« Reply #4 on: July 24, 2023, 12:58:44 PM »
Did you ever come up with a full command in the end? I have exactly the same idea that I want to use the UFC in the Hornet, but I lack the technical skill to craft a command.