mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-04 11:23:50 +00:00
355 lines
14 KiB
HTML
Executable File
355 lines
14 KiB
HTML
Executable File
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!--NewPage-->
|
|
<HTML>
|
|
<HEAD>
|
|
<!-- Generated by javadoc (build 1.6.0_24) on Wed Jun 15 11:41:57 CEST 2011 -->
|
|
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<TITLE>
|
|
ResultGenerator (TracTrac Result API)
|
|
</TITLE>
|
|
|
|
<META NAME="date" CONTENT="2011-06-15">
|
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
|
|
|
<SCRIPT type="text/javascript">
|
|
function windowTitle()
|
|
{
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="ResultGenerator (TracTrac Result API)";
|
|
}
|
|
}
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
</NOSCRIPT>
|
|
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
<HR>
|
|
|
|
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<A NAME="navbar_top"><!-- --></A>
|
|
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_top_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../com/tractrac/ResultAPI/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ResultGenerator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../com/tractrac/ResultAPI/PerLegResult.html" title="class in com.tractrac.ResultAPI"><B>PREV CLASS</B></A>
|
|
NEXT CLASS</FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?com/tractrac/ResultAPI/ResultGenerator.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="ResultGenerator.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_top"></A>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
|
|
<HR>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<H2>
|
|
<FONT SIZE="-1">
|
|
com.tractrac.ResultAPI</FONT>
|
|
<BR>
|
|
Class ResultGenerator</H2>
|
|
<PRE>
|
|
java.lang.Object
|
|
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.tractrac.ResultAPI.ResultGenerator</B>
|
|
</PRE>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public class <B>ResultGenerator</B><DT>extends java.lang.Object</DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
Main class for generation of:
|
|
<ul>
|
|
<li>Live ranking assuming all legs are perfectly aligned with the wind</li>
|
|
<li>Live ranking with individual wind input</li>
|
|
<li>Mark rounding tables with statistics</li>
|
|
</ul>
|
|
|
|
The class should recieve mark-roundings, routes, mark-positions and competitor positions to work properly.
|
|
<P>
|
|
|
|
<P>
|
|
<HR>
|
|
|
|
<P>
|
|
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
<A NAME="constructor_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Constructor Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../com/tractrac/ResultAPI/ResultGenerator.html#ResultGenerator(java.net.URL)">ResultGenerator</A></B>(java.net.URL paramUrl)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
<A NAME="method_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Method Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.util.List<<A HREF="../../../com/tractrac/ResultAPI/LiveResult.html" title="class in com.tractrac.ResultAPI">LiveResult</A>></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/tractrac/ResultAPI/ResultGenerator.html#getLiveResults()">getLiveResults</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Generates a live result list for the last time recalculate was run.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.util.List<<A HREF="../../../com/tractrac/ResultAPI/PerLegResult.html" title="class in com.tractrac.ResultAPI">PerLegResult</A>></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/tractrac/ResultAPI/ResultGenerator.html#getPerLegResults()">getPerLegResults</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Generate a result list with result per leg.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/tractrac/ResultAPI/ResultGenerator.html#recalcuateWithWind(long, double)">recalcuateWithWind</A></B>(long timems,
|
|
double windDirectionDegrees)</CODE>
|
|
|
|
<BR>
|
|
Recalculates the live leaderboard and the mark rounding statistics.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/tractrac/ResultAPI/ResultGenerator.html#recalculate(long)">recalculate</A></B>(long timems)</CODE>
|
|
|
|
<BR>
|
|
Recalculates the live leaderboard and the mark rounding statistics.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
|
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
|
|
<A NAME="constructor_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Constructor Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="ResultGenerator(java.net.URL)"><!-- --></A><H3>
|
|
ResultGenerator</H3>
|
|
<PRE>
|
|
public <B>ResultGenerator</B>(java.net.URL paramUrl)</PRE>
|
|
<DL>
|
|
</DL>
|
|
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
|
|
<A NAME="method_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Method Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="getLiveResults()"><!-- --></A><H3>
|
|
getLiveResults</H3>
|
|
<PRE>
|
|
public java.util.List<<A HREF="../../../com/tractrac/ResultAPI/LiveResult.html" title="class in com.tractrac.ResultAPI">LiveResult</A>> <B>getLiveResults</B>()</PRE>
|
|
<DL>
|
|
<DD>Generates a live result list for the last time recalculate was run.
|
|
<br><br>
|
|
<strong>Note: Please make sure the run recalculate first to get the latest results.</strong>
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>a list with a live result list per class</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getPerLegResults()"><!-- --></A><H3>
|
|
getPerLegResults</H3>
|
|
<PRE>
|
|
public java.util.List<<A HREF="../../../com/tractrac/ResultAPI/PerLegResult.html" title="class in com.tractrac.ResultAPI">PerLegResult</A>> <B>getPerLegResults</B>()</PRE>
|
|
<DL>
|
|
<DD>Generate a result list with result per leg. Use recalculate to update.
|
|
<br><br>
|
|
<strong>Note: Please make sure the run recalculate first to get the latest results.</strong>
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>a list of mark results per class</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="recalculate(long)"><!-- --></A><H3>
|
|
recalculate</H3>
|
|
<PRE>
|
|
public void <B>recalculate</B>(long timems)</PRE>
|
|
<DL>
|
|
<DD>Recalculates the live leaderboard and the mark rounding statistics.
|
|
<br><br>
|
|
By settings timems to now, you get the very latest result.
|
|
<br><br>
|
|
This recalculation is done using by projecting all boats onto the direct line between the previous mark and the next mark. The distance along this line is used for leaderboard calculations.
|
|
<br><br>
|
|
As a standard recommendation timems should be set to now - (timedelay).<br>
|
|
Timedelay should generally be unit sending interval + 2-5 seconds.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>timems</CODE> - Time in milliseconds to calculate results for</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="recalcuateWithWind(long, double)"><!-- --></A><H3>
|
|
recalcuateWithWind</H3>
|
|
<PRE>
|
|
public void <B>recalcuateWithWind</B>(long timems,
|
|
double windDirectionDegrees)</PRE>
|
|
<DL>
|
|
<DD>Recalculates the live leaderboard and the mark rounding statistics.
|
|
<br><br>
|
|
By settings timems to now, you get the very latest result.
|
|
<br><br>
|
|
As a standard recommendation timems should be set to now - (timedelay).
|
|
Timedelay should generally be unit sending interval + 2-5 seconds.
|
|
<br><br>
|
|
This recalculation is done using a custom wind direction. That means that:
|
|
<ul>
|
|
<li>For upwind legs (+/- 22.5 degrees compared to wind direction): All boats are projected onto wind vector passing through upwind mark. The distance along this vector is used for the leaderboard calculations.
|
|
<li>For downwind legs (180 +/- 22.5 degrees compared to the wind direction): All boats are projected onto the wind vector passing through the bottom mark. The distance along this vector is used for the leaderboard calculations.
|
|
<li>For reaching legs (all other legs): All boats are projected into the direct line between the previous mark and the next mark. The distance along this line is used for leaderboard calculations.</li>
|
|
</ul>
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>timems</CODE> - Time in milliseconds to calculate results for<DD><CODE>windDirectionDegrees</CODE> - The wind direction (where the wind is coming from) in degrees from 0 to 359.</DL>
|
|
</DD>
|
|
</DL>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<HR>
|
|
|
|
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<A NAME="navbar_bottom"><!-- --></A>
|
|
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../com/tractrac/ResultAPI/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ResultGenerator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../com/tractrac/ResultAPI/PerLegResult.html" title="class in com.tractrac.ResultAPI"><B>PREV CLASS</B></A>
|
|
NEXT CLASS</FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?com/tractrac/ResultAPI/ResultGenerator.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="ResultGenerator.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_bottom"></A>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
|
|
<HR>
|
|
|
|
</BODY>
|
|
</HTML>
|