Forums

Full Version: torque curve tracer
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
just got this little application to a useful state.
would love to get some feedback on it.

name an image curve.jpg and it will let you position it and trace it with your mouse. then it'll spit out a torque curve that vdrift can use. and handle unit conversions (hopefully correctly).

currently linux/amd64 only.
depends on opengl, sdl, and freetype
http://sites.google.com/site/zimluuraprojects/code
That's pretty cool, and would come in quite handy. I always hated trying to look at the graphs and figure it out the hard way. The binary ran fine for me on Ubuntu 10.10 and didn't crash or anything funky.

Did you intend for the values in torque_curve.txt to always be integers? It outputs floating point values on the terminal.

Where's the source? Smile
i thought i wanted ints in the file. the floats in the console window were for debugging math errors (was multiplying once when i should have divided).

should i output float for vdrift?

(edit) i was hoping to get a few more features in it before i posted the source. trying to adapt it so it will insert values into the middle of the line (no more drawing stars and stuff) but it will help when revising a section. also something where you can enter the quoted torque and power maximums at their rpm. and then have it use those points in the curve.
A simple Online-Editor:
http://aikx.de/aikxcar/index.html
new version. better add and delete.
zimluura Wrote:i thought i wanted ints in the file. the floats in the console window were for debugging math errors (was multiplying once when i should have divided).

should i output float for vdrift?
I think you should just make sure that the correct number of significant digits are preserved. With the resolution of the graphs imported, 2 or 3 should be accurate enough, so ints are probably fine. It's your call, I don't think it was an error, just something I noticed which was inconsistent.

zimluura Wrote:(edit) i was hoping to get a few more features in it before i posted the source. trying to adapt it so it will insert values into the middle of the line (no more drawing stars and stuff) but it will help when revising a section. also something where you can enter the quoted torque and power maximums at their rpm. and then have it use those points in the curve.
If you would like, we could add this to the tools/ dir the VDrift-art repository. Do you have write access to that repo already?

I suggest getting your code out there whenever possible. You never know, someone might want to help get it working on Windows/OS X, or something like that. Again, it's your call. Publishing your source means you need to choose a license, start thinking about documenting code, etc. (more work). Smile

I have a few feature suggestions if you are interested.
on precision: theres another fprintf line that does floats in there. if vdrift can read in floats for torque curves that then it might be best to leave it at max precision.

on svn-art commit access: i think i got that during the great wheel remodel. where should i put it in the art repo? maybe near the blender scripts?

on license: i was thinking probably gpl but maybe public domain. there's nothing too special in it. but i guess public domain would potentially (more easily??) let a marketing jerk start selling a modifier version and trying to stop me from distributing it for free with injunction or something.

on feature suggestions: i'd love to hear them.
No, you can't assume ownership of public domain works once it's been assigned as such. It's a bad idea for software for different reasons though (basically, public domain is fine to publish finished works, which software never is).
well, it's not legal to assume ownership of it. but that's assuming everything is above board. gpl is probably best for this little thing. though as a utility can only think of 1 more big thing to add to it: type in a kW/bhp/Nm/ftlb @ rpm.

though i might want to do some code refactoring, it's fairly messy as it is, was just trying to get things up and running fast. maybe make an ini file so you can tweak the resolution. high-res fullscreen would offer more precise tracing.
ok new version. i think i got the text entering parameters done and error checked. also can load video mode from an ini file

should i put it in the vdrift art repo? if so, should i include any compiled binaries, or just source and media?


[edit] was pondering a formula 1 mode (a friend suggested press F1) to double all the rpm marks (0-24k). but a quick google image search didn't leave me any curves going any higher than 12k. would anybody have a use for it going higher than 12k?
zimluura Wrote:should i put it in the vdrift art repo? if so, should i include any compiled binaries, or just source and media?

Yeah the art repo (maybe under tools) sounds like a good place to put it. Just put the source and media there.
done. i then worked on an att curve (got it all the way into the game data) and learned that vdrift likes leading zeros. so, patched as well.