CoTaCo always writes Units in knots and feet. I want metric

Moderators: Uros, Tom, OXO

Post Reply
Bravo Zulu
Posts: 96
Joined: Sat Jun 30, 2012 4:25 am

CoTaCo always writes Units in knots and feet. I want metric

Post by Bravo Zulu » Thu Jan 21, 2021 11:06 pm

How do I get the profile that gets written to my PDA to have metric units? The program makes the Default. prf write feet and knots. I don't know if this helps but this is my INI file:
# CoTaCo.ini : settings file for CoTaCo
# This file is automatically created or updated at the first run
# It can be edited to reflect your local configuration

# CoTaCo version number - please do not modify
CoTaCo Version=3100

# Target software (XCSoar/LK8000 - default=XCSoar)
Target=XCSoar

# path to Condor 1 installation folder
Condor 1 Path=

# path to Condor 2 installation folder
Condor 2 Path=C:\_Games\Condor2

# Condor root folder (usually DOCUMENTS\Condor - default=read from registry)
Condor root folder=C:\Users\Owner\Documents\Condor

##When downloading new maps with CoTaCo they go to this location.
# destination path (folder or filename) for the converted tasks
Destination Path=C:\_Games\xcsoardata

# verbose mode (0/1) :
verbose=0

# AAT mode (0/1) :
AAT=0

# Condor 1 warnings (0/1) :
Condor 1 warnings=1

# 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=1

#### What to do if map found in CoTaCo_maps.txt or CoTaCo_LK8000_maps.txt :
# 1=always ask for map, 0=use map found
Ask for map=0

### Polars and maps are stored in a specific folder (Polars resp. Maps)(XCSoar only)
0=none, 1=Polars, 2=Maps, 3=Polars and maps
Use Polars folder=1
# What to do if map found in CoTaCo_maps.txt or CoTaCo_LK8000_maps.txt :
# 1=always ask for map, 0=use map found
Ask for map=0

# Height margin for max start altitude (m)
Start height margin=0

### Profile file (name or 0=NO - default=Condor.prf) :
Profile file=default.prf
# Airspace file (name - default=FLIGHTPLAN-PZ.txt) :
Airspace file=

# Default path for flightplans
Flightplans path=C:\Users\Owner\Documents\Condor\FlightPlans\0_condor.fpl

# Script to run once the task conversion has been processed (default: no script)
Post run script=
I would give more but I have no idea what to tell you. Please ask questions.

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

Re: CoTaCo always writes Units in knots and feet. I want metric

Post by Bre901 » Fri Jan 22, 2021 4:35 pm

CoTaCo knows nothing about feet or knots and does not change such settings in the profile file.

What navigation application are you using ?
CN: MPT — CondorUTill webpage: https://condorutill.fr/

Bravo Zulu
Posts: 96
Joined: Sat Jun 30, 2012 4:25 am

Re: CoTaCo always writes Units in knots and feet. I want metric

Post by Bravo Zulu » Mon Jan 25, 2021 2:20 pm

Thanks for the response. I am using XCSoar as my PDA nav. I would like to be able to switch between Australian and Metric units for contests. In the US we mostly use Miles and feet. When I fly a European contest, those are mostly Metric.

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

Re: CoTaCo always writes Units in knots and feet. I want metric

Post by Bre901 » Mon Jan 25, 2021 2:31 pm

What you need is two (or three) different XCSoar profiles which will set the units you want, but CoTaCo handles only one.

The easiest way to work around that would be to create two different CoTaCo.ini files, e.g. CoTaCo_MET.ini and CoTaCo_AUS.ini, identical except for referencing a different profile, e.g. Condor_MET.prf and Condor_AUS.prf. Then create 2 batch files CoTaCo_MET.bat and CoTaCo_AUS.bat.

Code: Select all

Copy /y CoTaCo_MET.ini CoTaCo.ini
CoTaCo.exe
Then use the desired .bat file and load the corresponding .prf file in XCSoar
CN: MPT — CondorUTill webpage: https://condorutill.fr/

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

Re: CoTaCo always writes Units in knots and feet. I want metric

Post by Bre901 » Tue Jan 26, 2021 5:16 pm

Detailed how-to (tested it here, it works)

Make a backup copy of the XCSoar profile you are currently using so that your settings are preserved (let's assume it is Default.prf)

Open XCSoar, select that profile file, then change the units to, say, Australian:
Config/System/Setup/Units/Preset=Australian

Exit XCSoar, rename Default.prf to Condor_AUS.prf

Make a backup copy of your CoTaCo.ini,
Open it with Notepad or your favourite text editor
Set Profile file=Condor_AUS.prf
Save as CoTaCo_AUS.ini

Create a CoTaCo_AUS.bat file in the CoTaCo installation folder which contains

Code: Select all

Copy /y CoTaCo_AUS.ini CoTaCo.ini
CoTaCo.exe  %1
You can make a shortcut of that .bat file to your desktop, which would make possible to drag and drop a .fpl file to the shortcut

Same for metric, or imperial or whatever

Hope this helps

It would be possible to automate that in CoTaCo but:
The Condor units information is not stored in the flightplan file but in setup.ini.
This means that it would indeed be possible to make CoTaCo write automatically the units information in the profile file, but that would be reliable only if CoTaCo runs in "wait" mode, i.e. it waits until the flight has started (in which case one could assume that the user has selected the proper units in Condor).
Otherwise, the units might have been changed in between.
CN: MPT — CondorUTill webpage: https://condorutill.fr/

Bravo Zulu
Posts: 96
Joined: Sat Jun 30, 2012 4:25 am

Re: CoTaCo always writes Units in knots and feet. I want metric

Post by Bravo Zulu » Wed Jan 27, 2021 4:58 pm

Thank you! It works as desired. I am not sure it matters, but after numerous failed attempts, I ended up making a copy of the Default.prf (in the units desired) inside XC soar (tablet) and naming it Condor XXXX.prf. I exited the XCsoar (tablet) and in the file explorer renaming to Condor_XXX.prf and then copied that file back to the Tablet XCsoar.

Operationally, if I am staying with the same units, the CoTaco.exe can be run, but If I need to change units, I need to run the appropriate BAT file rather than the stock CoTaco.exe.

Thank you again. I am happy,

Post Reply