Simhub.Swoop.Plugin
The plugin is currently ACC specific as it uses native game data to provide more accurate data than that provided by Simhub.
Initially, the project was to be able to obtain precise information on the classification and on the competitors who are in front or behind me in the classification.
Little by little, requests were made to me and we arrived at something quite complete.
What does the plugin offer?
4 major data types
1. Global data (race, best laps etc.)
2. Data about me and my car
3. Data on opponents ahead or behind me in the standings (not just on the track)
- In the general classification
- In the classification by series (GT3 GT4)
- In the classification by Cup Category (Pro, ProAM, AM etc.)
- Ranking by Driver Category (Platinum, Gold, Silver, Bronze)
- In the ranking according to a RaceApp Tag (if you use integration with RaceApp, see RaceApp Integration)
For each competitor (in front or behind) we will have a list of information available
4. Data on each competitor allowing to make a complete leader board.
1. global data
AllCarsBestLap => best lap, all categories combined
SameSerieBestLap => best lap in the same series
SameDriverCategoryBestLap => best lap in the same driver category
SameCupCategoryBestLap => best lap in the same Cup category
SameRaceAppTagBestLap => best lap in the same RaceApp tag
HaveAllCarBestLap => Do my car have the best lap?
HaveSameSerieBestLap => Do my car have the best lap in the serie?
HaveSameCupCategoryBestLap => Do my car have the best lap in my serie and same cup category?
HaveSameDriverCategoryBestLap => Do my car have the best lap in my serie and same driver category?
HaveSameRaceAppTagBestLap => Do my car have the best lap in my RaceApp Tag?
SameSerieFirstPosition => What is the best position in my serie
SameDriverCategoryFirstPosition => What is the best position in my serie and driver category
SameCupCategoryFirstPosition => What is the best position in my serie and car cup category
SameRaceAppTagFirstPosition => What is the best position in my RaceApp Tag
ChampionShip.Name => RaceApp series name (if RaceApp integration)
ChampionShip.Info => information about the RaceApp series (if RaceApp integration)
ChampionShip.CommunityName => RaceApp community name (if RaceApp integration)
MultiSerieRace => Are there several series in the race
MultiDriverCategoryRace => Are there several driver categories in the race?
MultiCupCategoryRace => Are there several Cup categories in the race?
LastDriveThroughTime => Time required to drive through the pilane on the current track. This data is persistent but you have to do a DT at least once (in practice for example) on the track to have this information.
This data was requested for making calculations of overtaking predictions during pit stops.
2. Data about me and my car
BestlapTime => My best time
CurrentDriverCategoryString => My Driver Category
InPitSince => pit stop duration TImer
IsPiting => Is the car in the pits or in the pit lane
MyCarCurrentDriverIndex => On-track driver index (if multiple drivers)
MyCarDriverCount => How many driver for the car
MyCarLocation => Position of the car (among NONE = 0,Track = 1,Pitlane = 2,PitEntry = 3,PitExit = 4)
MyCarModelType => Numerical ID of my car (ID KUNOS)
MyCategory => Category of the current driver in the car
MyChampionShipPoints => My points in the RaceApp series (if RaceApp integration)
MyChampionShipPosition => My position in the RaceApp series (if RaceApp integration)
MyChampionShipPredictedPoints => My points at the end of the race in the RaceApp series (if RaceApp integration)
MyChampionShipPredictedPosition => My position at the end of the race according to the current ranking in the RaceApp series (if RaceApp integration)
MyCupCategory => My cup category (Pro, ProAm, Am, etc.) in digital format
MyCupCategoryString => same as string format
MyCupCategoryPosition => My position in my cup category
MyDriverCategoryPosition => My position in my driver category (Platinum, Gold, Silver etc.)
MyFirstName => First name
MyFullName => Driver full name
MyLapsSinceLastPitStop => Number of laps since the last pit stop
MyLastName => Last Name
MyLastPitStopLap => Last pitstop lap
MyLastPitStopDuration => Last pitstop duration
MyPitStopCount => Number of pitstops performed
MyRaceAppTag => My RaceApp TAG (if RaceApp integration)
MyRaceNumber => My race number
MyRacePosition => My overall position
MySerie => My series (GT3 / GT4)
MySeriePosition => My position in the ranking by series
MyShortName => Nickname
MyTeamName => Team name
3. Data on opponents ahead or behind me in the standings (not just on the track)
The idea is to have access to the same information as for My car but for identified competitors.
Competitors ahead or behind me in the general classification
-->Ahead OR Behind
Competitors ahead or behind me in the series classification (GT3 / GT4)
-->SameSerieAhead OR SameSerieBehind
Competitors ahead or behind me in the classification by CupCategory (Pro, ProAM, AM etc.)
-->SameCupCategoryAhead OR SameCupCategoryBehind
Competitors ahead or behind me in the classification by Driver Category (Platinum, Gold, Silver, Bronze)
-->SameDriverCategoryAhead OR SameDriverCategoryBehind
Competitors ahead or behind me in the ranking by RaceApp Tag (if RaceApp integration=
-->SameRaceAppTagAhead OR SameRaceAppTagBehind
For each of these competitors, we will find the same information as for my car with some additional data (Example for the competitor in front of me in the general classification)
Ahead_GapToPlayer => Gap to me
Ahead_LapsToPlayer => Gap with me in laps
Ahead_PredictLapCountBeforeContact => if I'm more than a second behind the driver in front and I'm going faster, how many laps before I'm in contact.
Ahead_RaceNumber
Ahead_CarModelType
Ahead_CupCategory
Ahead_CupCategoryString
Ahead_DriverCount
Ahead_TeamName
Ahead_CurrentDriverIndex
Ahead_RacePosition
Ahead_CupCategoryPosition
Ahead_DriverCategoryPosition
Ahead_BestlapTime
Ahead_LastlapTime
Ahead_IsPiting
Ahead_LapDelta
Ahead_FirstName
Ahead_LastName
Ahead_ShortName
Ahead_FullName
Ahead_DriverCategory
Ahead_Serie
Ahead_InPitSince
Ahead_PitStopCount
Ahead_LastPitStopLap
Ahead_LastPitStopDuration
Ahead_LapsSinceLastPitStop
Ahead_ChampionShipPosition
Ahead_ChampionShipPoints
Ahead_ChampionShipPredictedPoints
Ahead_ChampionShipPredictedPosition
Ahead_RaceAppTag
4. Data on each competitor allowing to make a complete leader board.
The idea here is to be able to make a complete leaderboard with the information calculated by the plugin.
The problem is that SimHub does not allow access to a table of competitors, so we will find competitors indexed by their position in the ranking.
SimHubSwoopPlugin.SWLeaderBoard.Position1.
SimHubSwoopPlugin.SWLeaderBoard.Position2.
SimHubSwoopPlugin.SWLeaderBoard.Position3.
...
SimHubSwoopPlugin.SWLeaderBoard.PositionN.
And for each position we will always find the same information with some additional data
IsPlayer => Lets you know if the competitor is the current player
GridPosition => Position on the starting grid
Movements = positions won or lost
GapToPlayer => Gap in time with the player
GapToLeader => Gap in time with the leader
GapAhead => Gap in time with the competitor in front
RaceNumber
CarModel
CarModelType
CupCategoryString
TeamName
Series
DriverFullName
DriverShortName
DriverCategory
RaceAppTag
RacePosition
SeriesPosition
DriverCategoryPosition
CupCategoryPosition
LastlapTime
BestlapTime
lapse
CurrentLapNumber
LapDelta
LapsToPlayer
CarRental
Kmh
InPitSince
IsPiting
LapsSinceLastPitStop
LastPitStopDuration
LastPitStopLap
LastPitWasDriveThrough
PitStopCount
ChampionShipInfo.Points
ChampionShipInfo.Position
ChampionShipInfo.PredictedPoints
ChampionShipInfo.PredictedPosition
API to get datas and make any use of them in html or any other language
-----------------------------------------------------------------------
How to use API :
install AspnetCore 5 packages :
Download ASP.NET Core 5.0 Runtime (v5.0.15) - Windows Hosting Bundle Installer
dotnet.microsoft.com
Download ASP.NET Core 5.0 Runtime (v5.0.15) - Windows x64 Installer
dotnet.microsoft.com
Activate "API Use" in Plugin Settings into SimHub
Close and reopen SimHub. Api is now running
You can use it on
http://localhost:8000/swagger/index.html
Acc Controller give datas from ACC in real time
AccTest Controller give static datas just for testing and development.
More documentation to come.
you want to use it, ask me and i'll try to reply asap.
I forgot to say a big thank you to Gary 'growe19' for all his ideas and for pushing me a bit to develop !