glideangle / flare-timing Goto Github PK
View Code? Open in Web Editor NEWScoring for free flight competitions.
License: Mozilla Public License 2.0
Scoring for free flight competitions.
License: Mozilla Public License 2.0
For Greda 2018, the arrival weight should be zero as it is a PG comp.
- goalRatio: 0.571428
weight:
distance: 0.39839067
leading: 0.10528163
arrival: 7.520116e-2
time: 0.42112653
When the comp inputs are extracted from .fsdb
, please read when the goal is a line.
<FsTaskDefinition ss="2" es="5" goal="LINE" groundstart="0">
The cabal build fails.
flare-timing> cabal new-build all
cabal: Could not resolve dependencies:
[__0] trying: aeson-via-sci-0.1.0 (user goal)
[__1] trying: template-haskell-2.13.0.0/installed-2.1... (dependency of
aeson-via-sci)
[__2] next goal: uom-plugin (user goal)
[__2] rejecting: uom-plugin-0.2.0.1 (conflict:
template-haskell==2.13.0.0/installed-2.1..., uom-plugin =>
template-haskell>=2.9 && <2.13)
[__2] rejecting: uom-plugin-0.2.0.0, uom-plugin-0.1.1.0, uom-plugin-0.1.0.0
(constraint from user target requires ==0.2.0.1)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: template-haskell, uom-plugin,
aeson-via-sci
> ../../bin/cross-zone --file=forbes2016.comp-input.yaml
Reading competition from 'forbes2016.comp-input.yaml'
cross-zone: day 1/Gijs_Wanders.20160102-192026.[CIVLID].7.igc:
hGetContents: invalid argument (invalid byte sequence)
The test suites are not being built as part of the shake build.
Please merge the earth-flat
, earth-sphere
and earth-ellipsoid
packages into one package, including tests.
$ __shake-build/mask-track "--file=/data/Australia Forbes 2012.comp-input.yaml" --task=6
mask-track: parseTimeOrError: no parse of "2012-01-12T02:09:58"
CallStack (from HasCallStack):
error, called at libraries/time/lib/Data/Time/Format/Parse.hs:116:12 in time-1.6.0.1:Data.Time.Format.Parse
When I run extract-input
giving an *.fsdb
file that specifies utc_offset="+10"
parsing fails with;
"(line 1, column 1):\nunexpected \"
> ./stack-shake-build.sh
# dhall-format (for dhall-format-zone)
# hpack-dhall (for hpack-dhall-zone)
zone/flight-zone.cabal is up-to-date
...
# dhall-format (for dhall-format-aeson-via-sci)
# hpack-dhall (for hpack-dhall-aeson-via-sci)
aeson-via-sci/aeson-via-sci.cabal is up-to-date
Error when running Shake build system:
* stack-test-apps
* stack-test-kml-parser
Error, file does not exist and no rule available:
stack-test-kml-parser
CallStack (from HasCallStack):
error, called at src/Development/Shake/Internal/Rules/File.hs:180:58
in shake-0.16.4-KMeoCwUNS3d5jzYY220kU9:Development.Shake.Internal.Rules.File
Find out whether the siggy-chardust
package is duplicating functionality that already has been published to hackage.
When extracting comp inputs, include the discipline.
<FsCompetition discipline="pg">
earth> stack ghci flight-earth:earth
:main --pattern=outside
...
From origin (0°,-180°) bearing r = 0.0
No points > [u| 0.0 mm |] outside a [u| 4.0e-2 km |] cylinder
when searching within [u| 1.0e-3 m |]: FAIL
Exception: Ratio has zero denominator
...
From origin (0°,-180°) bearing r = 120.0
No points > [u| 0.0 mm |] outside a [u| 4.0e-2 km |] cylinder
when searching within [u| 1.0e-3 m |]: FAIL
Exception: Ratio has zero denominator
...
From origin (0°,0°) bearing r = 0.0
No points > [u| 0.0 mm |] outside a [u| 4.0e-2 km |] cylinder
when searching within [u| 1.0e-3 m |]: FAIL
Exception: Ratio has zero denominator
Add liquid haskell checks for the flight-gap
package.
flare-timing/gap/test-suite-score/Points.hs:40:13: warning: [-Wmissing-fields]
• Fields of ‘Points’ not initialised: distance
sphericalEdgeToEdge: null
ellipsoidEdgeToEdge: null
projection: null
From task-length.yaml
> stack test flight-gap:score
...
No penalties = sum of distance, leading, time & arrival points: FAIL
/Users/pdejoux/dev/src/blockscope/flare-timing/gap/test-suite-score/Points.hs:39:
expected: TaskPoints (4 % 1)
but got: TaskPoints (5 % 1)
...
Somewhat early start HG = full points minus jump the gun penalty: FAIL
/Users/pdejoux/dev/src/blockscope/flare-timing/gap/test-suite-score/Points.hs:78:
expected: TaskPoints (39 % 1)
but got: TaskPoints (49 % 1)
...
Can score a stopped task, Pg: FAIL
*** Failed! Falsifiable (after 100 tests):
StopCanScoreTest (FromLastStart [7839s,9739s,6332s,6070s,8438s,6497s,692s,8282s,5040s,7785s,93s,361s,3414s,6040s,1883s,9166s,3781s,4228s,5835s,5860s,691s,640s,5775s,2809s,2637s,7648s,3007s,7290s,2282s,2149s,528s,498s,5310s,1305s,897s,9907s,7578s,9434s,8171s,4590s,2463s,6988s,1928s,5105s,5558s,2749s,971s,5041s,9057s,380s,4954s,2358s,1906s,6417s,9251s,2243s,8682s,4858s,2386s,8955s,866s,3938s,3752s,1547s,4489s,533s,6352s,3321s,3386s,6410s,6714s,3551s,7783s,663s,762s,7432s,3596s,318s,2407s,2162s,7792s,6132s,6940s,9405s,881s,5415s,2264s,5266s,2734s,8319s,9003s,4696s,1782s,3486s] (TaskStopTime (615402169662642 % 143444252249)))
Use --quickcheck-replay=974869 to reproduce.
...
3 out of 215 tests failed (449.51s)
The build is broken on windows.
Configuring regex-pcre-0.94.4...
Cabal-simple_Z6RU0evB_2.0.1.0_ghc-8.2.2.exe: Missing dependency on a foreign
library:
* Missing C library: pcre
This dependency is being pulled in by hcoord
. I've raised an issue with that package for breaking up hcoord so that parts of it can be used without needing pcre.
Work out distances also with the Andoyer algorithm.
That is the method that has been chosen for FS to use to calculate distances on the wgs84 ellipsoid.
The flight-units
package builds but its documentation fails to build.
> stack haddock flight-units
...
haddock: internal error: renameType: HsSpliceTy
CallStack (from HasCallStack):
error, called at utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs:267:30
in main:Haddock.Interface.Rename
> ./stack-shake-build.sh docs
# stack (for kml-docs)
<no location info>: error:
can't find file: kml/app-cmd/Kml/Options.hs
> ../../bin/cross-zone --file=forbes2018.comp-input.yaml
Reading competition from 'forbes2018.comp-input.yaml'
error: ""ABRA02486\r\nHFDTE301217\r\nHFFXA100\r\nHFPLTPILOT:..."" (line 1, column 1):
unexpected "A"
expecting xml declaration, comment, processing instruction, "<!DOCTYPE" or "<"
error: ""AXCGAventura 3.0|C17B-20520095\r\nHFDTE301217\r..."" (line 1, column 1):
unexpected "A"
expecting xml declaration, comment, processing instruction, "<!DOCTYPE" or "<"
The siggy-chardust
package already has one test suite for hlint. Please add another one that tests the rounding functions.
Even though stack ghci
in the root of this repo is not something I use, I thought I'd try it anyway and got this error;
Error: Multiple files use the same module name:
* Driver found at the following paths
* /.../build/app-cmd/Driver.hs (build-flare-timing:exe:build-flare-timing)
* /.../flare-timing/prod-apps/align-time/Driver.hs (flare-timing:exe:align-time)
* /.../flare-timing/prod-apps/cross-zone/Driver.hs (flare-timing:exe:cross-zone)
* /.../flare-timing/prod-apps/discard-further/Driver.hs (flare-timing:exe:discard-further)
* /.../flare-timing/prod-apps/extract-input/Driver.hs (flare-timing:exe:extract-input)
* /.../flare-timing/prod-apps/gap-point/Driver.hs (flare-timing:exe:gap-point)
* /.../flare-timing/prod-apps/land-out/Driver.hs (flare-timing:exe:land-out)
* /.../flare-timing/prod-apps/mask-track/Driver.hs (flare-timing:exe:mask-track)
* /.../flare-timing/prod-apps/tag-zone/Driver.hs (flare-timing:exe:tag-zone)
* /.../flare-timing/prod-apps/task-length/Driver.hs (flare-timing:exe:task-length)
* /.../flare-timing/test-apps/fsdb-parser/Driver.hs (flare-timing:exe:test-fsdb-parser)
* /.../flare-timing/test-apps/igc-parser/Driver.hs (flare-timing:exe:test-igc-parser)
* /.../flare-timing/test-apps/kml-parser/Driver.hs (flare-timing:exe:test-kml-parser)
* Options found at the following paths
* /.../flare-timing/prod-apps/align-time/Options.hs (flare-timing:exe:align-time)
* /.../flare-timing/prod-apps/cross-zone/Options.hs (flare-timing:exe:cross-zone)
* /.../flare-timing/prod-apps/discard-further/Options.hs (flare-timing:exe:discard-further)
* /.../flare-timing/prod-apps/extract-input/Options.hs (flare-timing:exe:extract-input)
* /.../flare-timing/prod-apps/gap-point/Options.hs (flare-timing:exe:gap-point)
* /.../flare-timing/prod-apps/land-out/Options.hs (flare-timing:exe:land-out)
* /.../flare-timing/prod-apps/mask-track/Options.hs (flare-timing:exe:mask-track)
* /.../flare-timing/prod-apps/tag-zone/Options.hs (flare-timing:exe:tag-zone)
* /.../flare-timing/prod-apps/task-length/Options.hs (flare-timing:exe:task-length)
* /.../flare-timing/test-apps/fsdb-parser/Options.hs (flare-timing:exe:test-fsdb-parser)
* /.../flare-timing/test-apps/igc-parser/Options.hs (flare-timing:exe:test-igc-parser)
* /.../flare-timing/test-apps/kml-parser/Options.hs (flare-timing:exe:test-kml-parser)
* * * * * * * *
Not attempting to start ghci due to these duplicate modules.
Use --no-load to try to start it anyway, without loading any modules (but these are still likely to cause errors)
``
> ../../bin/cross-zone "--file=2018 XC Dalmatian Paragliding Open"
The --dir argument is not a directory or the --file argument is not a file.
The file checked for was '2018 XC Dalmatian Paragliding Open.cross-zone.yaml'.
> ../../bin/extract-input "--file=2018 XC Dalmatian Paragliding Open.fsdb"
The --dir argument is not a directory or the --file argument is not a file
When building on windows;
> stack install
...
Configuring haskell-ci-0...
Preprocessing library for haskell-ci-0..
Building library for haskell-ci-0..
←[;1msrc\MakeTravisYml.hs:1:1: ←[;1m←[31merror:←[0m←[0m←[;1m←[0m←[0m←[;1m
File name does not match module name:
Saw: `Main'
Expected: `MakeTravisYml'←[0m←[0m
Module comments still refer to bsd3. Please update to mpl-2.0. For example;
In *.gap-point.yaml
, elapsed time is serialised as fractional hours with the unit symbol. Could we instead serialise it as the more human readable HH:MM:SS.SS
?
velocity:
ss: 2018-05-27T11:15:45Z
gs: 2018-05-27T11:00:00Z
es: 2018-05-27T12:23:54Z
distance: 30.9 km
ssElapsed: 1.135833 h
gsElapsed: 1.398333 h
There's scoring logic in flight-gap
for stopped tasks but these are not wired up. We'll need to read when the tasked was stopped from the *.fsdb
as an input and then feed this into the scoring.
The command tag-zone
expect a *.cross-zone.yaml
file as input but all other commands expect a *.comp-input.yaml
file. If one of those is given instead there's this error;
> ../../bin/tag-zone --file=forbes2016.comp-input.yaml
Reading zone crossings from 'forbes2016.comp-input.yaml'
Error in $: key "dnf" not present
Tagging zones completed in 13.06 ms
> stack ghci flight-task:task
/.../flare-timing/task/test-suite-task/EdgeToEdge.hs:33:1: error:
Could not find module ‘Flight.Sphere.PointToPoint.Rational’
Perhaps you meant
Flight.Earth.Sphere.PointToPoint.Rational (from flight-earth-0.1.0)
Flight.Earth.Flat.PointToPoint.Rational
Use -v to see a list of the files searched for.
|
33 | import qualified Flight.Sphere.PointToPoint.Rational as Rat
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
/.../flare-timing/task/test-suite-task/EdgeToEdge.hs:35:1: error:
Could not find module ‘Flight.Sphere.Cylinder.Rational’
Perhaps you meant
Flight.Earth.Sphere.Cylinder.Rational (from flight-earth-0.1.0)
Use -v to see a list of the files searched for.
|
35 | import qualified Flight.Sphere.Cylinder.Rational as Rat (circumSample)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/.../flare-timing/task/test-suite-task/EdgeToEdge.hs:37:56: error:
Module ‘Flight.Task’ does not export ‘separatedZones’
|
37 | import Flight.Task (Zs(..), AngleCut(..), CostSegment, separatedZones)
| ^^^^^^^^^^^^^^
Failed, three modules loaded.
> stack install
...
/.../flare-timing/flare-timing/test-apps/fsdb-parser/FsdbMain.hs:95:35: error:
• No instance for (Data.UnitsOfMeasure.Singleton.KnownUnit
(Data.UnitsOfMeasure.Internal.Unpack
(Data.UnitsOfMeasure.Internal.Base "s")))
arising from a use of ‘print’
• In the expression: print stopped'
In a case alternative: Right [Just stopped'] -> print stopped'
In a stmt of a 'do' block:
case stopped of
Left msg -> print msg
Right [Just stopped'] -> print stopped'
Right _ -> putStr "Expected only one score back time."
|
95 | Right [Just stopped'] -> print stopped'
| ^^^^^^^^^^^^^^
Failed, one module loaded.
Use the participant identifier from the *.fsdb
. Test a competition with duplicate pilot names.
<FsParticipant id="1" name="..." />
The nix build refers to bsd3 but the licensing is now mpl-2.0. For example;
With package detour-via-sci
showSci
is rounding but toSci
and encode
are not.
>>> let x = 0.1122334455667788
>>> showSci (DecimalPlaces 8) x
"0.11223345"
>>> let x = 1122334455667788 % 10000000000000000
>>> toSci (DecimalPlaces 8) x
0.11223344
>>> encode (Lat x)
"0.11223344"
>>> Csv.encode [("A", Lat x)]
"A,0.11223344\r\n"
Remove the following from stack.yaml
now that uom-plugin-0.3.0.0
is up on hackage;
- location:
git: https://github.com/blockscope/uom-plugin.git
commit: c170a2df329fe8e40d13aea0b4299758d5079bda
subdirs:
- uom-plugin
extra-dep: true
> __shake-build/task-length "--file=dalby-2017/dalby open 2017.fsdb"
dalby open 2017.fsdb
"Error in $: expected record (:*:), encountered String"
Measuring task lengths completed in 11.60 ms
For instance, task 3 from greda 2018 has one start gate.
<FsTaskDefinition ss="2" es="7" goal="CIRCLE" groundstart="0">
<FsTurnpoint ... />
<FsStartGate open="2018-05-27T13:00:00+02:00" />
</FsTaskDefinition>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.