Changes between Version 41 and Version 42 of ScoringFormulas


Ignore:
Timestamp:
May 17, 2009, 8:03:21 AM (12 years ago)
Author:
Stein Tore Erdal
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ScoringFormulas

    v41 v42  
    1212[[BR]][[BR]][[BR]]
    1313== Create a scoring formula (!! 20090517: NOTE: explanation is under work, by no means complete (or even correct) !!) ==
    14 Does only apply to FS versions >= 1.2.13.
     14Does only apply to FS versions >= 1.2.13 (the prinsiple is the same for earlier versions but some details differ).
    1515
    16 Create a DLL named "!FsSf_<formula id>.dll" which implement the interface described below (found in !FsFsdb.dll) in a class named "Sf".
    17 
    18 Put it in the folder where !FsComp.exe is and it should show up on the list for selecting a scoring formula.
     16 1. Create a DLL (Class Library) named "!FsSf_<formula id>.dll".
     17 1. Set a reference to !FsSf.dll.
     18 1. Set !AssemblyTitle to <formula id>.
     19 1. Set !AssemblyDescription to the description that should show when one select scoring formula in FS.
     20 1. Create a class named "Sf" implementing the interface !FsSf.Isf[[BR]]
     21   (`public class Sf : !FsSf.ISf ...`)
     22 1. Compile and put the DLL in the folder where !FsComp.exe is and it should show up on the list for selecting a scoring formula.
    1923
    2024The "!EditScoreFormula" method is called from FsComp when one select and edits a scoring formula.
     
    2428(any time one changes anything about one or more pilot's flightdata in a task, all FsResult elements for that task will be removed).
    2529[[BR]][[BR]][[BR]]
     30From !FsSf.dll:
    2631{{{
    27 using System.Xml;
    2832
    2933/*
    30  * Fs/FsCompetition/FsScoreFormula
    31  * Fs/FsCompetition/FsTask/FsScoreFormula
    32  * Fs/FsCompetition/FsTask/FsParticipants/FsParticipant/FsFlightData
    33  * Fs/FsCompetition/FsTask/FsParticipants/FsParticipant/FsResult
     34
     35XML elements that have usefull information about the task and flightdata:
     36FsScoreFormula (attributes are set by the EditScoreFormula method)
     37FsTaskScoreParams (attributes are calculated before the ScoreTask method is called)
     38FsParticipants/FsParticipant/FsFlightData
     39FsParticipants/FsParticipant/FsResult
     40
     41Example of FsTaskScoreParams:
     42ss_distance="37.706"
     43task_distance="39.901"
     44no_of_pilots_present="46"
     45no_of_pilots_flying="45"
     46no_of_pilots_lo="6"
     47no_of_pilots_reaching_nom_dist="45"
     48no_of_pilots_reaching_es="39"
     49no_of_pilots_reaching_goal="39"
     50sum_flown_distance="1659.459"
     51best_dist="39.902"
     52best_time="0.896388888888889"
     53worst_time="2.06222222222222"
     54no_of_pilots_in_competition="63"
     55
    3456*/
    35 namespace FlightSys.FsFsdb
     57
     58namespace ...
    3659{
    3760  public interface ISf