Metarace 1.6 Export Database Information

All data is exported into a single table "Cycling" with the following
columns. Overloaded columns are Data0 - Data9 and their specific meaning
depends on the data type for the row in question. See Below.


Shared Column Data
------------------

	RowID		Database table primary key
	SortOrder	Sorting column for related rows (mandatory)
	TypeID		Data type for this row
	ClassID		Subclassing for the row type
	StatusID	Row status if relevant:
			  NULL -> Don't Care
			  prerace -> event not started
			  virtual -> standing for event in progress
			  provisional -> enough data for result, but not
					complete result yet
			  final -> all riders/results accounted for
	EventID		ID for the specified event, or stage. Meta data on
			the event can be fetched with the Event data type.
			NULL implies the record is relevant to all events.
	Series		Number series for the row, NULL implies all.

Data Types
----------

Stage			Road race within a stage race/tour/series
	Data0		Title
	Data1		Date
	Data2		Location
	Data3		Distance (string)
	Data4		StartTime (advertised)
	Data5		Estimate Finish (advertised)
	Data6		Distance (kilometres)
	Data7		Chief Commissaire
	Data8		Organiser

Trackmeet
	Data0		Title
	Data1		Subtitle
	Data2		Date
	Data3		Location
	Data4		Chief Commissaire
	Data5		Organiser

Tracksession
	ClassID		Session Identifier (eg 1, 2, 3)	(session is not event, eventid=NULL)
	Data0		Session Title	(eg Session 1)
	Data1		Date
	Data2		Start Time

Trackevent
	ClassID		Reference Event Number to final classification if relevant
	Data0		Prefix
	Data1		Info
	Data2		Session
	Data3		Laps
	Data4		Distance
	Data5		Progression rules (eg top 4 to semifinals)
	Data6		Australian record string
	Data7		Type hint

Rider
	Data0		Rider Number
	Data1		First Name
	Data2		Last Name
	Data3		Team Code
	Data4		Category
	Data5		UCI Code (Nation/Date of birth)
	Data6		Transponder ID
	Data7		Nationality (IOC country code)
	
RoadTeam

	Data0		Team Code
	Data1		Short Name (<= 12 chars)
	Data2		Full Team Name
	Data3		Team Manager
	Data4		Nation
	Data5		Number of first rider on team

ResultHeader

	ClassID		unique result identifier string
	Data0		Result Heading
	Data1		Result Subheading
	Data2		Result units if applicable
	Data3		Count of rows in result
	Data4		Distance if relevant
	Data5		Category if relevant
	Data6		Abbreviated Subheading	(location of intermed)

##Startlist	(removed - use ClassID Startlist with TypeID Result)
	##Data0		empty or 'dns' if available
	##Data1		RiderNo
	##Data2		First Name
	##Data3		Last Name
	##Data4		Team
	##Data5		Category (if relevant)
	##Data6		Nation

Result

	ClassID		unique result identifier string
	Data0		Rank
	Data1		RiderNo
	Data2		First Name
	Data3		Last Name
	Data4		Team
	Data5		Category (if relevant)
	Data6		Nation
	Data7		Info

Position

	ClassID		course, bunch(comm1), chase(comm2), leaders(motocomm1)
	Data0		t	(stage offset 0->1.0)
	Data1		x	Map x coord, roughly metres east of finish
	Data2		y	Map y coord, roughly metres north of finish
	Data3		z	Map z coord, roughly elevation in metres
	Data4		len	Stage offset in km
	Data5		tod	Time at this position (eta for course)
	Data6		speed	Speed over last segment
	#Data7		1kspeed	1km moving average speed (not for course)
	#Data8		5kspeed	5km moving average speed (not for course)

Lapspeed

	ClassID		'leaders' or 'bunch'
	Data0		Lap number 1-n, average speed over lap n
	Data0		Speed (km/h)

Timing
	ClassID		Key
	Data0		Value
	Data1		Type Hint
	--
	Data2		Hours (for time of day data type)
	Data3		Minutes
	Data4		Seconds

Timing Keys:

  The following are relevant to road and stage races:

	Start		Start of race	time of day
	Finish		Finish of race	time of day
	Elapsed		Race run time or winner's elapsed time	time of day
	Average		Average speed of winner	speed (km/h)
	Totlaps		Total number of laps if relevant 	int
	Curlap		Current lap of passings at finish line 	int
	Onlap		Current lap the leader of the race is on 	int
	Lapstart	Time of day of start of current lap 	time of day
	Lapfin		Time of day of finish of current lap time of day
	Laptime		Elapsed time for current lap time of day
	Finspeed	Speed of winner at finish line speed	km/h
	Distance	Distance to go for lead riders	Float distance km
        Covered		Distanced covered by lead riders
	Gapmain		Time gap from leaders to main field	Time of day
	Gapchase	Time gap from leaders to chase	Time of day
	Down		Current gap from leader if relevant	Time of day
	Laptype		'SPRINT' if the lap is a sprint prime/int sprint
	Laplbl		Short text label for current lap
	Finstr		Short text label for stage finish
	Scrollmsg	Scrolling message for scoreboards or lower strap
	Leadspeed	Speed of leaders
	Mainspeed	Speed of main field
	Breakriders	List of riders in break, whitespace separated
	Distancemain	Distance to go for the main field
        Coveredmain	Distance covered by main field

  The following are relevant to Track Cycling (CA Track Nats):

	ClockA		Run/net time for home straight pursuit clock
	RankA		Running rank for home straight
	ClockB		Run/net time for back straight pursuit clock
	RankB		Running rank for back straight
	Timetype	Type of time '200m' or 'Time'
	Average		Average speed for one-up tt, scratch, keirin
	Timetobeat	Fastest time/time to beat
