[phpBB Debug] PHP Notice: in file /viewtopic.php on line 969: Use of undefined constant gu - assumed 'gu' (this will throw an Error in a future version of PHP)
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 969: Use of undefined constant personal_album_id - assumed 'personal_album_id' (this will throw an Error in a future version of PHP)
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 969: Use of undefined constant gu - assumed 'gu' (this will throw an Error in a future version of PHP)
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 969: Use of undefined constant user_images - assumed 'user_images' (this will throw an Error in a future version of PHP)
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4519: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3716)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4521: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3716)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4522: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3716)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4523: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3716)
Speed Dreams Community • View topic - workflow/tool to extract data from xml..?

workflow/tool to extract data from xml..?

Discuss or share your track-related work here

Moderator: kilo

workflow/tool to extract data from xml..?

Postby simon-2 » Wed Feb 11, 2015 2:52 pm

simon-2
 
Posts: 90
Joined: Thu Jan 29, 2015 3:01 pm

Re: workflow/tool to extract data from xml..?

Postby MiniJoe » Wed Feb 11, 2015 4:16 pm

I am working on something similar for my trackdesigner. Should not be too hard to add "export to csv" function. Do you need info for the sides/curbs/barriers ?
MiniJoe
 
Posts: 100
Joined: Fri Mar 16, 2012 1:32 am

Re: workflow/tool to extract data from xml..?

Postby simon-2 » Wed Feb 11, 2015 5:16 pm

you are working on a new trackdesigner :o ? very cool. this java trackeditor is a nice tool indeed, but it has some issues being really annoying, and as it is not continued, these will never be corrected...

i don't need other info than lenght (as for curves, this is only implicit, arc and start/end-radius are needed). But as unused columns can easily be deleted (or just remain unused), it might be wise to export z values, profil tangents (and/or grade) and banking as well, as they could also be useful... but i don't think, side/curb/barrier will be needed..?

But maybe you could also implement this height-stuff directly;
tangent creation (or smoothing):
set profil end tangent to the average of current and subsequent segment's grade (personally, i don't use grade, but it can be calculated from length and z values)

z end modification (for short segments only; so it might be better to do this for single segments than for a whole track):
set z end so that current and subsequent segment have the same grade

another idea is to fit a track to a given heightmap; i tried it myself and i think it should not be a big thing for experienced programmers, as nessecary functions are already available (GetElevation in elevation.cpp for heightmap processing and something inside track4.cpp to get x and y of segments) , but it's a difficulty for me to cope with such large object oriented projects, so i failed :oops:
simon-2
 
Posts: 90
Joined: Thu Jan 29, 2015 3:01 pm

Re: workflow/tool to extract data from xml..?

Postby simon-2 » Wed Feb 11, 2015 7:47 pm

simon-2
 
Posts: 90
Joined: Thu Jan 29, 2015 3:01 pm

Re: workflow/tool to extract data from xml..?

Postby MiniJoe » Wed Feb 11, 2015 10:26 pm

Just don't call print if the name starts with "Left" or "Right".
Are you using an existing track xml or is this a brand new track?
One thing to look out for: measurements don't have to be in meters or degrees. I have not seen it in a track xml yet, but the code that reads the files supports radians and kilometers, etc. (I think even feet and miles). You are likely to see some elevation as absolute meters AND some as grade percentage in the same track.xml
MiniJoe
 
Posts: 100
Joined: Fri Mar 16, 2012 1:32 am

Re: workflow/tool to extract data from xml..?

Postby simon-2 » Thu Feb 12, 2015 12:35 am

it is derived from Nordschleife, but i completely reworked alignment to fit google's satellite image, so you could call it a brand new track...

one thing makes me really dizzy; when compiling the track with trackgen, it says 20944m length (this is ok; original is 20832 which is about half a percent). But if i calculate it with openoffice from the cvs, it says 22454m!?
For the straights, there is nothing to calculate, for curves i used (radius+endRadius)/2*arc (in radians, of course), as i thought speed dreams would do so as well (as in track4.cpp)!?
i checked if something with the python script could be wrong; e.g. takes values from one of the inner sections, but there are no attributes with the same name in sides/borders...
i did not check the whole file, but according to spot checks, the cvs has the same content as the xml.

there are no feet, yards, cm or whatever in the file, and the angles give 360° when cumulated (negative for left segments), although you are right, this could be an issue. But it is just a quick'n'dirty solution..
simon-2
 
Posts: 90
Joined: Thu Jan 29, 2015 3:01 pm

Re: workflow/tool to extract data from xml..?

Postby MiniJoe » Thu Feb 12, 2015 2:49 am

MiniJoe
 
Posts: 100
Joined: Fri Mar 16, 2012 1:32 am

Re: workflow/tool to extract data from xml..?

Postby simon-2 » Thu Feb 12, 2015 12:32 pm

nope, for length calculation, i used the arcs as positive, just for angle check i made them negative.
simon-2
 
Posts: 90
Joined: Thu Jan 29, 2015 3:01 pm


Return to SD Tracks

Who is online

Users browsing this forum: No registered users and 13 guests