Exporting Tasks to LK8000
Moderator: BOD1
Re: Exporting Tasks to LK8000
Thanks Bre901,
I tested it with the \Documents\Condor blank, and it worked wonderfully well.
Cheers
John
I tested it with the \Documents\Condor blank, and it worked wonderfully well.
Cheers
John
Re: Exporting Tasks to LK8000
I took a quick look at it, it was so straightforward that I decided to do it this morning, while the engine was still warm
Beta3 version (hopefully RC, when I update the manual) : https://drive.google.com/open?id=17k73k ... ubX4BOra3C
The .ini file will be updated on first run, then set :
Code: Select all
# Default Files (0/1)
# XCSoar: copy task to Default.tsk - LK8000: overwrite all default files
Write Default Files=1
CN: MPT — CondorUTill webpage: https://condorutill.fr/
Re: Exporting Tasks to LK8000
Excellent tool !
Would it be possible to add an option to always output files as 'Condor.*' (.lkt, .prf and .acf)' ?
The reason why I'm asking is that I'm using a script to FTP the file to my phone, so I don't have to plug/unplug it from the computer.
With this feature, the script only has to copy three files that are always named the same: condor.prf, condor.lkt and condor.acf
If anyone is interested in the script, here we go:
You may need to update the first part of the script to adapt it to your own device.
FYI: I'm using 'Cx File explorer'' from Google Store that has a nice ftp server mode.
Next step, integrate this script into CoTaCo
Would it be possible to add an option to always output files as 'Condor.*' (.lkt, .prf and .acf)' ?
The reason why I'm asking is that I'm using a script to FTP the file to my phone, so I don't have to plug/unplug it from the computer.
With this feature, the script only has to copy three files that are always named the same: condor.prf, condor.lkt and condor.acf
If anyone is interested in the script, here we go:
Code: Select all
@echo off
set HOST_IP=192.168.1.25
set HOST_PORT=8309
set LK8000_DEVICE_PATH=device/LK8000
set LK8000_WINDOWS_PATH=e:\Games\CondorTools\LK8000
set LK8000_PROFILE=condor.prf
set LK8000_AIRCRAFT=condor.acf
set LK8000_TASK=condor.lkt
pushd .
cd /d %LK8000_WINDOWS_PATH%
echo open %HOST_IP% %HOST_PORT% >> ftp_script.txt
echo anonymous >> ftp_script.txt
echo cd %LK8000_DEVICE_PATH% >> ftp_script.txt
echo cd _Configuration >> ftp_script.txt
echo lcd _Configuration >> ftp_script.txt
echo put %LK8000_PROFILE% >> ftp_script.txt
echo put %LK8000_AIRCRAFT% >> ftp_script.txt
echo cd ..\_Tasks >> ftp_script.txt
echo lcd ..\_Tasks >> ftp_script.txt
echo put %LK8000_TASK% >> ftp_script.txt
echo quit >> ftp_script.txt
ftp -s:ftp_script.txt
del ftp_script.txt
popd
FYI: I'm using 'Cx File explorer'' from Google Store that has a nice ftp server mode.
Next step, integrate this script into CoTaCo
Re: Exporting Tasks to LK8000
How about something like that ?ybuqc wrote: ↑Fri May 15, 2020 1:23 pmWould it be possible to add an option to always output files as 'Condor.*' (.lkt, .prf and .acf)' ?
The reason why I'm asking is that I'm using a script to FTP the file to my phone, so I don't have to plug/unplug it from the computer.
With this feature, the script only has to copy three files that are always named the same: condor.prf, condor.lkt and condor.acf
Code: Select all
# destination folder (or filename) for the converted tasks
Destination Folder=E:\CondorUTill\CoTaCoV3-tests\_Tasks\Condor.lkt
# Default Files
# XCSoar: copy task to Default.tsk (0/1)
# LK8000: (0/1/2) 1=overwrite all default files, 2=write all files with specified outfile name
Write Default Files=2
I guess the script will depend very much on local configurations, but it would be very easy to add one more field in the .ini file to specify the script and to execute it before exiting.Next step, integrate this script into CoTaCo
I guess XCSoar users might be interested as well
CN: MPT — CondorUTill webpage: https://condorutill.fr/
Re: Exporting Tasks to LK8000
Something like:
That should be nice.
And another like ...
Code: Select all
# Default Files
# XCSoar: copy task to Default.tsk (0/1)
# LK8000: (0/1/2) 1=overwrite all default files, 2=write all files with specified outfile name
Write Default Files=2
# name if the write default files is set to 2
Output name=condor
And another like ...
Code: Select all
# script to run once the task conversion has been processed.
# default: no script
Post run script=my_transfert_script.bat
Re: Exporting Tasks to LK8000
Thanks for doing this for LK8000, will be very useful. I've done a few quick tests and seems to work ok except:-
LK8000 crashes if there's a 270deg sector, prob because the lkt file is missing the "sector type" bit. LK8000 doesn't do 270 sectors anyhow and all sectors have to be the same, unless you select an AAT, when a task can have different types.
Setting the LK8000 home airport - it doesn't seem to remember this but this could be due to me not having any actual turnpoints selected, just the flightplan task, so an LK8000 feature I think.
LK8000 crashes if there's a 270deg sector, prob because the lkt file is missing the "sector type" bit. LK8000 doesn't do 270 sectors anyhow and all sectors have to be the same, unless you select an AAT, when a task can have different types.
Setting the LK8000 home airport - it doesn't seem to remember this but this could be due to me not having any actual turnpoints selected, just the flightplan task, so an LK8000 feature I think.
Re: Exporting Tasks to LK8000
could you please post your FPL (either in code: [</>] in the menubar, or attach as zip)mikkieg42 wrote: ↑Fri May 15, 2020 7:44 pmThanks for doing this for LK8000, will be very useful. I've done a few quick tests and seems to work ok except:-
LK8000 crashes if there's a 270deg sector, prob because the lkt file is missing the "sector type" bit. LK8000 doesn't do 270 sectors anyhow and all sectors have to be the same, unless you select an AAT, when a task can have different types.
I'm not familiar at all with LK8000 at all, where does it store that info ?Setting the LK8000 home airport - it doesn't seem to remember this but this could be due to me not having any actual turnpoints selected, just the flightplan task, so an LK8000 feature I think.
CN: MPT — CondorUTill webpage: https://condorutill.fr/
Re: Exporting Tasks to LK8000
I think the Home Waypoint is reliant on it being set from a .cup file on the device. I am sure that when you change a .cup file, the "remembered" Home location is lost....
The updated program is working very nicely for me, Bre901. And if anyone can break it - it will be me
Cheers
John in Sunny Carnarvon - Western Australia
The updated program is working very nicely for me, Bre901. And if anyone can break it - it will be me
Cheers
John in Sunny Carnarvon - Western Australia
Re: Exporting Tasks to LK8000
I found where the Home waypoint is stored in LK8000...
It's in the Runtime.log as an entry created on exit (I think)...
. HomeWaypoint set to <Springfield> wpnum=655
Cheers
John in Sunny Carnarvon - Western Australia
It's in the Runtime.log as an entry created on exit (I think)...
. HomeWaypoint set to <Springfield> wpnum=655
Cheers
John in Sunny Carnarvon - Western Australia
Re: Exporting Tasks to LK8000
The index mentioned by JBlyth is linked to the number of waypoints loaded by LK8000. So based on your cup files, it may change :/
It may be added in the flags from the waypoints file also: see LK8000/Common/Source/SaveLoadTask/CTashFileHelper.cpp:621
And the flag information is defined in
So settings the correct flags value within the task file in the <waypoints> section should do the trick.
The function SetHome() is called at startup or whenever the waypoint / airfield files are changed.
See LK8000/Common/Source/lk8000.cpp:455 and LK8000/Common/Source/Settings.cpp:91.
The home is mainly used for the best alternate computation, and of course for the distance to home information
I'm not really conviced by the advantages of having this included for Condor when performing tasks...
It may be added in the flags from the waypoints file also: see LK8000/Common/Source/SaveLoadTask/CTashFileHelper.cpp:621
And the flag information is defined in
Code: Select all
LK8000/Common/Header/MapWindow.h:53
#define AIRPORT 0x01
#define TURNPOINT 0x02
#define LANDPOINT 0x04
#define HOME 0x08
#define START 0x10
#define FINISH 0x20
#define RESTRICTED 0x40
#define WAYPOINTFLAG 0x80
The function SetHome() is called at startup or whenever the waypoint / airfield files are changed.
See LK8000/Common/Source/lk8000.cpp:455 and LK8000/Common/Source/Settings.cpp:91.
The home is mainly used for the best alternate computation, and of course for the distance to home information
I'm not really conviced by the advantages of having this included for Condor when performing tasks...
Re: Exporting Tasks to LK8000
I'll stick with :ybuqc wrote: ↑Fri May 15, 2020 3:38 pmSomething like:That should be nice.Code: Select all
# Default Files # XCSoar: copy task to Default.tsk (0/1) # LK8000: (0/1/2) 1=overwrite all default files, 2=write all files with specified outfile name Write Default Files=2 # name if the write default files is set to 2 Output name=condor
Code: Select all
# destination folder (or filename) for the converted tasks
Destination Folder=E:\CondorUTill\CoTaCoV3-tests\_Tasks\Condor.lkt
# Default Files
# XCSoar: copy task to Default.tsk (0/1)
# LK8000: (0/1/2) 1=overwrite all default files, 2=write all files with specified outfile name
Write Default Files=2
No problem for that oneAnd another like ...Code: Select all
# script to run once the task conversion has been processed. # default: no script Post run script=my_transfert_script.bat
I'm rather busy this weekend, more next week
CN: MPT — CondorUTill webpage: https://condorutill.fr/
Re: Exporting Tasks to LK8000
Is it a start/end sector or a Waypoint ?mikkieg42 wrote: ↑Fri May 15, 2020 7:44 pmThanks for doing this for LK8000, will be very useful. I've done a few quick tests and seems to work ok except:-
LK8000 crashes if there's a 270deg sector, prob because the lkt file is missing the "sector type" bit. LK8000 doesn't do 270 sectors anyhow and all sectors have to be the same, unless you select an AAT, when a task can have different types.
I mus confess that I forgot to consider that in the code
As a tasksetter, I never use this kind of sector
... just like a lot of junk stuff, it's not because something exists and is available that you must buy or use it
The waypoint type in LK8000 is currently set according to the first waypoint after start in the FPL file (if there is none before finish : sector/radius=3000)
Open question to LK8000 users : what should we do with 270° WPS -> line, sector or circle ?
I'd go for the circle, but as I'm not a LK8000 user, my opinion should have very little weight
I'll fix it in the next version.
CN: MPT — CondorUTill webpage: https://condorutill.fr/
Re: Exporting Tasks to LK8000
In the current LK8000 7.1 beta, choices for task turnpoints are:-
By the way, I used CoTaCo today for the US Late Night Competition, and it worked wonderfully well!
Cheers
John in Sunny Carnarvon - Western Australia
By the way, I used CoTaCo today for the US Late Night Competition, and it worked wonderfully well!
Cheers
John in Sunny Carnarvon - Western Australia
You do not have the required permissions to view the files attached to this post.
Re: Exporting Tasks to LK8000
Just a thought, Bre901,
Microsoft OneDrive now has the option for a user to keep their "local" documents folder in the cloud. This gave me a fright when I tried it as all my "Local" Documents folders disappeared to OneDrive, but happily, Condor and other programs still point correctly to the main local-sort of/OneDrive/Documents/cloud folder.
I have two laptops, but Condor is only used on one.
My question is:-
Is there any need for CaTaCo to actually look for a Condor installation as long as the correct pointers to the Documents folders etc are in the .ini file.
It would be nice if I could use CaTaCo from my non-Condor-installed laptop as all the needed Flight Plan folders are now "clouded".....
Cheers
John in Sunny Carnarvon - Western Australia
Microsoft OneDrive now has the option for a user to keep their "local" documents folder in the cloud. This gave me a fright when I tried it as all my "Local" Documents folders disappeared to OneDrive, but happily, Condor and other programs still point correctly to the main local-sort of/OneDrive/Documents/cloud folder.
I have two laptops, but Condor is only used on one.
My question is:-
Is there any need for CaTaCo to actually look for a Condor installation as long as the correct pointers to the Documents folders etc are in the .ini file.
It would be nice if I could use CaTaCo from my non-Condor-installed laptop as all the needed Flight Plan folders are now "clouded".....
Cheers
John in Sunny Carnarvon - Western Australia
Re: Exporting Tasks to LK8000
My answer is:
Yes
Because CoTaCo needs to read :
- the .trn file in order to initialise the coordinates conversion routines
- and/or the .apt and .cup files in order to read the airport/waypoint informations and/or
[nitpicker]
BTW the name is CoTaCo (Condor Task Converter)
[/nitpicker]
CN: MPT — CondorUTill webpage: https://condorutill.fr/