Some time ago, Biker gave me the solution to draw the tracks from points. Now i have a tool to make the drawing in C# reading from the AIW file, but although i have give a thousand of thinkings over this file, dont know how to get the initial point (start position). Can anyone help me please?
thx for reply Lazza. What i want to know is if there is something to remark what is the start point. I have made a routine in C# that draws tracks from wp_pos but cant find how the AIW says what is the initial point or start do you know what i mean? thx again!
Ah lol As far as bringing it back to proper timing (sectors etc) use wp_score - it specifies the sector and the total lap distance to that point. You may also use WP_PTRS as a reference (first 2 values are previous and next waypoint, which gives a pretty good clue what the current one is ) but in rF1 at least there were a LOT of variations that sometimes made it tricky to draw a map if you relied on it. Unfortunately when a platform like rFactor allows people to experiment and still make it work, people feel a need to ditch the ISI examples and go their own way. But starting with those, and looking at the values in a couple of tracks, you should be able to cater for pretty much anything you find.
check this link lazza: http://93.93.65.218:8080/durin/hotlapsrf1/live.php?id_campeonato=4# and on this url click on "Vista circuito" and you will see how i get the track drawed... thax for reply mate ;-)
Cool I did similar for a live timing page, had to wrestle with a few AIWs in rF1 especially with the pitlane (I've got dots representing all the cars), but can get it good enough. Must admit I haven't bothered with rF2, don't want to go there until the AIW is always available.
Hi Lazza Do you share some code to read the aiw structure file, because I would like to draw the inner and outler track line . I would like draw the center line and extrapole the external line with the track width. Thanks
https://www.dropbox.com/s/kwenmic4oj9dpt5/AIW_reader.png Aiw decrypted Enviado desde mi GT-I9505 mediante Tapatalk
@DuRiN Start to found "[Waypoint]" In the main loop read "wp_pos" //world Position (x,y,z) ; y is the Height! "wp_perp" // perpendicular vector (x,y,z) "wp_width" //width of track (road_left, road_right, far_left, far_right) read only road_left and road_right "WP_PTRS" //to control waypoints (prev_wp, next_wp, branch_id, pathbranch_wp) if pathbranch == 0 --> main path(track) Read Next waypoint the same way The vector calcs (in C# need to know how to use vectors) Road_left_pos= wp_pos + (-wp_perp*road_left) Road_right_pos= wp_pos + (wp_perp*road_right) With this points can create a shape.
thanks a lot mario and spaskis...i have developed an app for draw but not in your way to draw (i think yours is better...i will give a chance and try to get it)
didnt know about the existence of that class...i read the aiw looking for wp_pos and then painting circles to get a track...i will take a look to that class mate...thx!
Hi SPASKIS, I've shown your work! I'm sure that you've wrote a script for this purpose, can you please post it?? The language of your code will not be a problem, I've some experience with different languages. Just for info I will to write a script like yours (using Matlab), but I'm not confident with .aiw files. Thanks
I didn't write any script. I made an excel file. Some posts before you can see the formulas that were used. enviado mediante tapatalk