In-Development Prototype planetary landing assistance using VoiceAttack inline function

Only the saving to the EDDI thing. The first bit is going to be very useful, just speaking in the lat and long, and I've already started work on it. I'll test it out and let you know how it goes.
It's encouraging that you're engaged and enthusiastic about this project; thanks for your input (and you too, Hoodathunk). I have just started a github repository for this work - and I know as much about github as I do about EDDI. Perhaps you would like to contribute?
 
Only the saving to the EDDI thing. The first bit is going to be very useful, just speaking in the lat and long, and I've already started work on it. I'll test it out and let you know how it goes.
Well, that wasn't too difficult. I can enter lat and long via spoken commands although you do have to pause between each part to prevent VA from joining all the parts together. Still, it is a start at least.

Pause between each part. So Latutuide...1...4...2...point...7...4....2...1...longitude...minus...2...7...point...1...1...7....8

To confirm the coordinates say 'confirm coordinates'.

The VA variables CoordLatitude and CoordLongitude contain the lat & long as text.

VA-Lat-Long.png

VA-Numbers.png

VA-Confirm.png
 
Last edited:
It's encouraging that you're engaged and enthusiastic about this project; thanks for your input (and you too, Hoodathunk). I have just started a github repository for this work - and I know as much about github as I do about EDDI. Perhaps you would like to contribute?
I'm just packing to go away until Tuesday so I'll do something about it when I get back. For now, enjoy the new speech entered coordinate system :)
 
I wonder if there is a way to force the delay in EDDI for testing purposes. It would make sense to test for the radius not being set until after the event just to see what happens in the VA script but you'd need a way to do this reliably. Might be worth asking in the EDDI thread.

Personally, I'd put in a message to say that the radius was being determined if it came back as zero the first time and then a warning message after the timeout period (your 5 times loop), saying that since the radius could not be found the directions to the target could not be determined and the entire loop abandoned. Something along the Iines of:

"Waiting for planetary radius to be determined" and "Unable to determine planetary radius, direction to target cannot be given."

But that's just me.

By the way, I'd make the loop counter a variable that can be set in the VA script somewhere so that it can easily be tweaked by the commander to cope with slower computers.
I've implemented this suggestion with an initial loop count of 3. The spoken messages, with 'wait until complete' checked, provide the necessary delay between attempts.
 
Well, that wasn't too difficult. I can enter lat and long via spoken commands although you do have to pause between each part to prevent VA from joining all the parts together. Still, it is a start at least.

Pause between each part. So Latutuide...1...4...2...point...7...4....2...1...longitude...minus...2...7...point...1...1...7....8

To confirm the coordinates say 'confirm coordinates'.

The VA variables CoordLatitude and CoordLongitude contain the lat & long as text.
I amended your Confirm Location command to do some validation on the input:

Code:
Set Boolean [validLocation] to True
Set decimal [testLatitude] value to the converted value of {TXT:CoordLatitude}
Set decimal [testLongitude] value to the converted value of {TXT:CoordLongitude}
Begin Condition : [testLatitude] Is Less Than -90 OR [testLatitude] Is Greater Than 90
    Set Boolean [validLocation] to False
    Write [Red] 'The latitude is invalid: {DEC:testLatitude}' to log
    Say, 'The latitude is invalid. It should be in the range minus ninety to plus ninety. Please try again'  (and wait until it completes)
End Condition
Begin Condition : [testLongitude] Is Less Than -180.00000 OR [testLongitude] Is Greater Than 180.00000
    Set Boolean [validLocation] to False
    Write [Red] 'The target longitude is invalid: {DEC:targetLongitude}' to log
    Say, 'The target longitude is invalid. It should be in the range minus 180, to plus 180.'  (and wait until it completes)
End Condition
Begin Boolean Compare : [validLocation] Equals True
    Write [Blue] 'Latitude {TXT:CoordLatitude}, Longitude {TXT:CoordLongitude}' to log
End Condition
And to help with the timing of the spoken numbers, I've written to the log the current value of latitude and longitude as each digit is appended; this indicates when VA is ready for the next number:

Code:
Begin Text Compare : [CoordVariable] Equals 'LAT'
    Set Text [CoordLatitude] to [CoordNumber]
    Write [Green] 'Latitude: {TXT:CoordLatitude}' to log
Else If Text Compare : [CoordVariable] Equals 'LONG'
    Set Text [CoordLongitude] to [CoordNumber]
    Write [Green] 'Longitude: {TXT:CoordLongitude}' to log
End Condition
The next step is to decide what to do with the numbers! This is a different scenario from the one I've developed so far where waypoints are known in advance and stored in commands. If an ad hoc location can be captured, I need to think about where that fits in the sequence of approaching the target body, retrieving its radius, etc.
 
I amended your Confirm Location command to do some validation on the input:

Code:
Set Boolean [validLocation] to True
Set decimal [testLatitude] value to the converted value of {TXT:CoordLatitude}
Set decimal [testLongitude] value to the converted value of {TXT:CoordLongitude}
Begin Condition : [testLatitude] Is Less Than -90 OR [testLatitude] Is Greater Than 90
    Set Boolean [validLocation] to False
    Write [Red] 'The latitude is invalid: {DEC:testLatitude}' to log
    Say, 'The latitude is invalid. It should be in the range minus ninety to plus ninety. Please try again'  (and wait until it completes)
End Condition
Begin Condition : [testLongitude] Is Less Than -180.00000 OR [testLongitude] Is Greater Than 180.00000
    Set Boolean [validLocation] to False
    Write [Red] 'The target longitude is invalid: {DEC:targetLongitude}' to log
    Say, 'The target longitude is invalid. It should be in the range minus 180, to plus 180.'  (and wait until it completes)
End Condition
Begin Boolean Compare : [validLocation] Equals True
    Write [Blue] 'Latitude {TXT:CoordLatitude}, Longitude {TXT:CoordLongitude}' to log
End Condition
And to help with the timing of the spoken numbers, I've written to the log the current value of latitude and longitude as each digit is appended; this indicates when VA is ready for the next number:

Code:
Begin Text Compare : [CoordVariable] Equals 'LAT'
    Set Text [CoordLatitude] to [CoordNumber]
    Write [Green] 'Latitude: {TXT:CoordLatitude}' to log
Else If Text Compare : [CoordVariable] Equals 'LONG'
    Set Text [CoordLongitude] to [CoordNumber]
    Write [Green] 'Longitude: {TXT:CoordLongitude}' to log
End Condition
The next step is to decide what to do with the numbers! This is a different scenario from the one I've developed so far where waypoints are known in advance and stored in commands. If an ad hoc location can be captured, I need to think about where that fits in the sequence of approaching the target body, retrieving its radius, etc.
That seems to be reasonable. My code was a proof of concept so I left validation out. I've also tried to make the code general since there may be other VA commands that can use a spoken numeric input. I can't think of any off hand, but that doesn't mean that there are none, just that I can't think of any. Extending the first two commands would achieve this as required.

As for where it fits, well, I'd say that this is just another way to enter a single waypoint except that it is for the current body rather than one of a set of waypoints. But that's just off the top of my head and, since I've not put a great deal of thought into it, I'm probably spouting rubbish!

:)
 
Top Bottom