Exporting Tasks to LK8000

Moderator: BOD1

User avatar
JBlyth
Posts: 183
Joined: Thu Apr 23, 2020 12:10 pm

Re: Exporting Tasks to LK8000

Post by JBlyth » Mon May 11, 2020 3:38 pm

I would say no need for that information - in the Condor/LK8000 environment.

User avatar
ybuqc
Posts: 608
Joined: Sat Oct 14, 2006 11:41 pm
Location: France

Re: Exporting Tasks to LK8000

Post by ybuqc » Mon May 11, 2020 3:44 pm

For training purpose, I think it may be good to have those information.
Let's say student for cross-country training... Even if he should have the info before taking off, it's better to train with all the info as in RL.
Image

mikkieg42
Posts: 14
Joined: Tue Nov 29, 2011 3:28 pm

Re: Exporting Tasks to LK8000

Post by mikkieg42 » Mon May 11, 2020 6:23 pm

I agree that the runway dir etc is not really needed for Condor/LK8000. I think that if it's being used for training purposes it's better to enter the task manually into LK8000 for the practice. The real advantage (from my point of view) of having a convertor is when a new waypoint is used in a Condor task it's passed across to LK8000 automatically, otherwise we can just use the supplied cup files.

Generating the penalty zone txt file would also be useful, the one produced with the Xcsoar convertor works ok with LK8000. Copying the start/finish heights would also useful if possible.

User avatar
ybuqc
Posts: 608
Joined: Sat Oct 14, 2006 11:41 pm
Location: France

Re: Exporting Tasks to LK8000

Post by ybuqc » Mon May 11, 2020 8:04 pm

mikkieg42 wrote:
Mon May 11, 2020 6:23 pm
[...] I think that if it's being used for training purposes it's better to enter the task manually into LK8000 for the practice.
Good point !
No argument on my side for that feature then ;)
Image

User avatar
JBlyth
Posts: 183
Joined: Thu Apr 23, 2020 12:10 pm

Re: Exporting Tasks to LK8000

Post by JBlyth » Tue May 12, 2020 2:27 am

I am not sure, but I would image that the Condor to LK8000 task process would not create new waypoints in the LK8000. They would need to already exist in the LK8000 .cup file - I presume. If my wild guess is true, then the frequency and other data would not be utilised in the conversion process.

But I would be more than happy with any outcome that worked.

I use Frank Paynter's program to combine Landscape Airport and Cup data into a single file. Frank's app can be found at https://virtualsoaring.eu/download - search for CondorWPFileGen.

Frank may be updating the program soon to handle the newer 6 digit runway bearing format.

Cheers
John in Sunny Carnarvon - Western Australia

User avatar
Bre901
Posts: 1790
Joined: Tue Nov 22, 2016 8:57 pm
Location: Annecy (France)
Contact:

Re: Exporting Tasks to LK8000

Post by Bre901 » Tue May 12, 2020 7:54 am

JBlyth wrote:
Tue May 12, 2020 2:27 am
I am not sure, but I would image that the Condor to LK8000 task process would not create new waypoints in the LK8000. They would need to already exist in the LK8000 .cup file -
You scared me a bit, but I checked : LK8000 is not that dumb that it cannot accept a WP that is not in the .dup file :mrgreen:

I does accept any valid WP, wherever it comes from

I am going to use my existing Condor -> XCSoar converter (CoTaCo) and just add the possibility to write a .lkt file instead of a .tsk file.

Today, CoTaCo can either :
- get the WP data directly from the .apt or .cup files (option)
- or, (when the option is active, if the WP hasn't been found in those files), convert the Condor coordinates to Lat,Lon (default)

When writing a .lkt file the data will be taken from the files.

I'll add the extra info mentioned above as I'm interested in some of that for another application I'm working on, and mainly because if I decide to skip part of it, sometime in the future there will be a good reason to need id
... that's one thing I learned in 40+ years programming : if it's easy and doesn't consume too much resources, do it now, you might need it in the future :wink:
CN: MPT — CondorUTill webpage: https://condorutill.fr/

User avatar
JBlyth
Posts: 183
Joined: Thu Apr 23, 2020 12:10 pm

Re: Exporting Tasks to LK8000

Post by JBlyth » Tue May 12, 2020 8:30 am

Sounds perfect!

I understand from some little bits I have been doing with Frank Paynter that the newer 6 digit Runway Bearing system can cause issues. This is used in the Christchurch New Zealand landscape for example....

For instance, if there is a decimal point in the bearing, SeeYou will ignore the entry. LK8000 seems to be a little more forgiving but it might be worth a thinking about rounding the bearing to the nearest degree to fit in with Naviter's .cup format.

Having mentioned that, don't let me lead you astray.

Isn't programming wonderful! I have recently written a program called "CupX Tools" (in the Microsoft Store and it's FREE) which creates the newer .CupX format files from .cup files and downloads Google images of each waypoint - so I know exactly what you mean ;-)

Cheers
John in Sunny Carnarvon - Western Australia

User avatar
Bre901
Posts: 1790
Joined: Tue Nov 22, 2016 8:57 pm
Location: Annecy (France)
Contact:

Re: Exporting Tasks to LK8000

Post by Bre901 » Wed May 13, 2020 7:09 pm

I have a beta-0 version available, it can be downloaded from my GD : https://drive.google.com/open?id=12xInq ... 0zc-FTidIh

I still need to add the writing of min/max altitudes for waypoints in the comment field (as I do for XCSoar)

Edit CoTaCo.ini to match your configuration (the target folder is the same as for XCSoar)

To activate the LK8000 conversion, run from a command-prompt window :
...CoTaCoV3> CoTaCo -lk8000

I haven't worked on the documentation, for the meantime, use the standard doc.
If you haven't got it, you may download it from the webpage : https://condorutill.pagesperso-orange.fr/index.html

The .lkt files I generate from an FPL are accepted by LK8000, and if I save them to another file, there are no significant differences (except for trailing 0s)
I did some non-regression tests but I would not recommend to use this version for daily conversion of FPLs to XCSoar tasks

Thanks for your tests, comments and suggestions are welcome
CN: MPT — CondorUTill webpage: https://condorutill.fr/

User avatar
ybuqc
Posts: 608
Joined: Sat Oct 14, 2006 11:41 pm
Location: France

Re: Exporting Tasks to LK8000

Post by ybuqc » Wed May 13, 2020 7:28 pm

I have a seg fault when running the program. Here is the output:

Code: Select all

E:\Games\CondorTools\CoTaCoV3>CoTaCo.exe -lk8000
        2200  2002705280         220         220
 FPL path :C:\Users\ybu_h\Documents\Condor\FlightPlans\
GetFileName *.fpl 5 0
GetFileName 1
           0
 E:\Games\CondorTools\LK8000 T
 E:\Games\CondorTools\LK8000
 XCSoar_rootE:\Games\CondorTools\LK8000                                                                                                                                                                                                         
   0.00000000

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x456e03
#1  0x44f8eb
#2  0x42da2e
#3  0x75deba8f
The test task is a basic one with start, 2TP, finish on the Slovenia2 landscape.
I updated the CoTaCo.ini to match my configuration. I copied the Polars file just in case but no change on the behavior.
Let me know if you need anything else.
Image

User avatar
Bre901
Posts: 1790
Joined: Tue Nov 22, 2016 8:57 pm
Location: Annecy (France)
Contact:

Re: Exporting Tasks to LK8000

Post by Bre901 » Wed May 13, 2020 7:39 pm

It doesn't wok on the polars for the time being
Please send me your FPL and CoTaCo.ini
CN: MPT — CondorUTill webpage: https://condorutill.fr/

User avatar
Bre901
Posts: 1790
Joined: Tue Nov 22, 2016 8:57 pm
Location: Annecy (France)
Contact:

Re: Exporting Tasks to LK8000

Post by Bre901 » Wed May 13, 2020 11:07 pm

ybuqc wrote:
Wed May 13, 2020 7:28 pm
I have a seg fault when running the program. Here is the output:
The test task is a basic one with start, 2TP, finish on the Slovenia2 landscape.
I updated the CoTaCo.ini to match my configuration. I copied the Polars file just in case but no change on the behavior.
Let me know if you need anything else.
Bug identified : bad handling of duplicate entry in .cup file = POSTOJNA
Normally duplicates are solved by comparing altitudes.
In this peculiar case, the TP in the FPL file and the two entries in the .cup files had 3 different altitudes.
Moreover, there is an airfield with the same name and that one was the good one ...

FIxed (+ an another bug I found in the same time)
Same download link
CN: MPT — CondorUTill webpage: https://condorutill.fr/

User avatar
JBlyth
Posts: 183
Joined: Thu Apr 23, 2020 12:10 pm

Re: Exporting Tasks to LK8000

Post by JBlyth » Thu May 14, 2020 4:04 am

Hello Bre901,

I have attached in a zipped file my:-
DEFAULT_PROFILE.prf (this is the default name in LK8000 - no longer default.prf)
CC 120520.ftp - Flight Plan for Christchurch NZ landscape Task
Condor.prf
Condor.tsk
CaTaCo.ini
CC120520.lkt - note the file extension is NOT .tsk - manually constructed LK8000 task - the waypoints same as CC 120520.ftp from the LK8000 cup file.

From my testing:-
Task Conversion gives Invalid Old Task when trying to load in LK8000 PC version. Profile is not populating correctly at this stage
LK8000 uses .LKM and .DEM files for Maps now. .XCM files seems to lose the topographical data and still need a .DEM file to work correctly.
Airspace is not being picked up for the Condor.prf

I am very happy to assist wherever I can....

Cheers, and thanks for your hard work,
John in Sunny Carnarvon - Western Australia
You do not have the required permissions to view the files attached to this post.

User avatar
Bre901
Posts: 1790
Joined: Tue Nov 22, 2016 8:57 pm
Location: Annecy (France)
Contact:

Re: Exporting Tasks to LK8000

Post by Bre901 » Thu May 14, 2020 6:13 am

For the time being, CoTaCo only does the task conversion, I haven't worked on the profile or the .acf file yet

I didn't find the CC120520.lkt file in the zip archive you provided. Thanks for the LK8000 profile

When I convert CC120520.prf it get a .lkt which is readable by LK8000
However there were still 2 bugs in there :
- LK8000 doesn't recognize the "cylinder" keyword, it's actually "circle"
- the min-height was < 0 it should be 0 in this case

once this is fixed, I get that converted file, which works fine with LK8000

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<lk-task type="Default" >
        <options auto-advance="Auto" >
                <start type="line" radius="3000" />
                <finish type="line" radius="1000" />
                <sector type="circle" radius="1000" />
                <rules>
                        <finish fai-height="false" min-height="0" />
                        <start max-height="1148000" max-height-margin="0" max-speed="0" max-speed-margin="0" height-ref="AGL" />
                </rules>
        </options>
        <taskpoints>
                <point idx="0" name="Start" />
                <point idx="1" name="TP 1" />
                <point idx="2" name="Cass3 Rs" />
                <point idx="3" name="L141 Acheron" />
                <point idx="4" name="Springfield" />
        </taskpoints>
        <waypoints>
                <point name="Start" latitude="-43.347198" longitude="171.795441" altitude="552" flags="1" format="2" style="1" />
                <point name="TP 1" latitude="-42.873707" longitude="172.191528" altitude="1150" flags="1" format="2" style="1" />
                <point name="Cass3 Rs" latitude="-43.038334" longitude="171.756668" altitude="585" flags="1" code="Cass3 Rs" format="2" style="1" />
                <point name="L141 Acheron" latitude="-43.318333" longitude="171.679993" altitude="1161" flags="1" code="L141 Ach" format="2" style="1" />
                <point name="Springfield" latitude="-43.333668" longitude="171.928299" altitude="369" flags="1" code="Springfi" format="2" style="1" />
        </waypoints>
</lk-task>
CN: MPT — CondorUTill webpage: https://condorutill.fr/

User avatar
JBlyth
Posts: 183
Joined: Thu Apr 23, 2020 12:10 pm

Re: Exporting Tasks to LK8000

Post by JBlyth » Thu May 14, 2020 7:20 am

I have attached an updated Zip file - sorry about the omission! It now contains my original CC120520.lkt file.

I get an error in LK8000 about "Invalid Old Task" if I use the output from CoTaCo program with .tsk file extension. If I change the file extension to .lkt it doesn't come up with an error, but also shows no waypoints in the task. Note that I have I have the Start waypoint in my .cup file as START120520 and not START.

I have tried de-selecting any .cup file in Setup, and just using the raw .lkt file as you supplied, but I still get a blank task.

Is there anything you would like to to try?

Cheers
John
You do not have the required permissions to view the files attached to this post.

User avatar
Bre901
Posts: 1790
Joined: Tue Nov 22, 2016 8:57 pm
Location: Annecy (France)
Contact:

Re: Exporting Tasks to LK8000

Post by Bre901 » Thu May 14, 2020 7:48 am

Are you starting CoTaCo like I mentioned above ?
To activate the LK8000 conversion, run from a command-prompt window :
...CoTaCoV3> CoTaCo -lk8000
If you don't do that, you will be in XCSoar mode, no .lkt file will be generated !

For the time being, please just check the .lkt file created and ignore the rest.

LK8000 (V7.0) has no problem reading the lkt file created by CoTaCo from your CC120520.pl file
Which version are you using ?

For each waypoint in the FPL file, CoTaCo tries to find it in the LANDSCAPE.apt or LANDSCAPE.cup files.
If its found, the coordinates are taken from the file, otherwise they are converted

Note : CoTaCo reads the .cup file which is in the default Condor folder : DOCUMENTS\Condor\Turnpoints\LANDSCAPE.cup

BTW : The lkt file you just send doesn't correspond with your CC120520.pl

Code: Select all

TPName1=Start
TPName2=TP 1
TPName3=Cass3 Rs
TPName4=L141 Acheron
TPName5=Springfield
TPPosX5=266386.625

Code: Select all

		<point idx="0" name="START120520"/>
		<point idx="1" name="TP1 120520"/>
		<point idx="2" name="Cass3 Rs"/>
		<point idx="3" name="L141 Acheron"/>
		<point idx="4" name="Springfield"/>
CN: MPT — CondorUTill webpage: https://condorutill.fr/

Post Reply