Wondering how you guys want the sector delta times to work, for example sector_time_delta_self[3]? Should it be current lap sector times vs previous lap sector times? If so, and car for example is in sector 2, should I set deltas for sector 2 and 3 to -1.0? Or should it be previous lap sector times vs the lap before that?
I never use delta sector times in my apps so I'll let the others comment. Though I just noticed that you have sector_time_previous_self[3] and not sector_time_current_self[3]. Does that mean you'll output the sectors of the previous lap or its just a naming issue and sectors will be or current lap? Thanks!
Would it be easier to just have the most recent sector times for each car (including the player)? These are -1 at the start of the session but after that they get updated as the car crosses the relevant sector line. Perhaps they might get set to -1 if that sector was invalid. Then if client apps want to do stuff with sector deltas (delta self, delta leader, delta best lap, etc) it's up to the client app to maintain the required state and do the maths. It gets really messy if you're trying to second guess what the client apps might want to do with the sector data
Usually we need to compare Sector time from a lap to another Lap, mostly the best one. There you can have 2 differents way: Compare the sector time to the best sector time Compare the sector to the same sector on the best lap (sector time might not be the best overall, but it's the one done while doing the best lap time) I think we don't really need mote than current sector time and best sectore time (best sector or best lap sector). Maybe if you can have previous one it's also a good thing. From that, every app should be able to keep a record of all sector times.
I went with this change: typedef struct { r3e_driver_info driver_info; r3e_finish_status finish_status; r3e_int32 place; r3e_float32 lap_distance; r3e_vec3_f32 position; r3e_int32 track_sector; r3e_int32 completed_laps; r3e_int32 current_lap_valid; r3e_float32 lap_time_current_self; r3e_float32 sector_time_current_self[3]; r3e_float32 sector_time_previous_self[3]; r3e_float32 sector_time_best_self[3]; r3e_float32 time_delta_front; r3e_float32 time_delta_behind; r3e_pitstop_status pitstop_status; r3e_int32 in_pitlane; r3e_int32 num_pitstops; r3e_cut_track_penalties penalties; r3e_float32 car_speed; r3e_int32 tire_type; } r3e_driver_data_1; sector_time_current_self[2] will always be -1 though, since the instant you cross finishline it's not the current lap anymore from these you can calc deltas yourself. also added: // Sector times of fastest lap by anyone in session r3e_float32 session_best_lap_sector_times[3];
There is r3e_float32 sector_time_best_self[3] for every car, and there is r3e_float32 session_best_lap_sector_times[3] for the best lap set by any car. You miss something else?
[shame mode] Jeez, I searched a few pages back, but its only one post above mine.... [/shame mode] Anyway good to see a lot of stuff being added to the api. I can use the pit-limiter option for my Arduino sli dash.
Hello, I have two questions, 1- how can I get the track name the pilot's name and the car that the player is running. 2 is possible to use to get the Dedicaded Server data? Thank you so much!
1.) For all those id's we'll supply, we need to add look up tables for. Name will be a string. 2.) Not sure what you mean.
Added this as well for current vehicle (when applicable): typedef struct { r3e_int32 available; r3e_int32 engaged; r3e_int32 amount_left; r3e_float32 engaged_time_left; r3e_float32 wait_time_left; } r3e_push_to_pass;
WOW!, I wanted to thank you sincerely for the upcoming update of the API! The new API is an huge step and was really needed to increase the gaming experience and immersion of racers using simracing rig! Impatient to make the update of the plugin for SLIMax Manager. Cheers, Zappadoc
I think he would like to get the same datas from Dedicated server. Those who don't run the game, so don't have access to the live datas.
I've now added support for dedi to write to shared mem, but consider it unofficially. Much less data exists in dedi, so many entries will remain -1. But there is the important stuff, track/layout id's, tracklength, bestlaptime and then all data for each driver.
While you've got the shared memory stuff in bits, could you have a quick look at the oil and water temps? I think the problem is with the game, rather than the shared memory, but these values tend to be quite low for some cars (like, oil is about 50 Celsius after a few hard laps in the gt2 ruf).
I think you're right there, it's probably the values fed in the game that should be double checked. We will have a look at what can be done for that.