Click here to Skip to main content
Click here to Skip to main content

A C# Track Editor

, 2 Nov 2008
Rate this:
Please Sign up or sign in to vote.
This application is designed to put way points on a track map picture and to set the height of the track points in order to produce a TXT or XML file which resumes the track information.

Introduction

This application is designed to put way points on a track map picture and to set the height of the track points in order to produce a *.txt or *.xml file which resumes the track information. The application uses the ZedGraph library for the plots features and the SharpGL library for the 3D view. 

Description 

TrackEd is a tool to build track files for an upper level software called SimVE. SimVE is Matlab/Simulink based application which is used for vehicle simulations in energy races like the Shell ecoMarathon. SimVE was developed in 2006 by four students of the ESTACA  for the PV3e team. SimVE needs a track file as an input of the simulator and until now, the track files were hand made. So the purpose of the SimVE TrackEd is to build track files in an easy way.

This article deals with the presentation of key points and the main features of the application.

Define Track Map

The definition of the track is divided in two parts. First the track map, I mean the X,Y coordinates of the track points. In order to get the X,Y points, we use a picture of the track seen from upside, then we define the scale and compute the ratio between the length on the picture and the length in reality.  After that, the user marks points on the track picture to figure the track path; each point is then converted in the real coordinate system.

To performs those operations, we use two levels of C# components. First level is a control which just displays the track picture and includes view functions such as zoom in and out; move the picture and key functions such as draw a path, add a point to the path, etc. The second layer is a UserControl which includes the previous user control,  some control buttons like open the track picture, mode selection (scale or track path) and some callback.

Tracking_Nogaro.jpg

Define Track Profile

The second part consists of defining the height of the track points. To set up the height of the points, we use a table (linear distance since the start, height of the point). Once the table is defined, the height of the track points defined on the map are computed by an interpolation of the height table also called the track profile.

To allow the user to define the track profile, we use a C# UserControl with a datagridview to edit the table and a ZedGraph to plot the table.

Profiling_Nogaro.jpg

View Track File      

Once the track is built, the third part of the application consists in viewing that track.  There is a tabControl with one tab for the 2-D plots and a tab for the 3D view. The 3D view uses the ShapGL library and a special class inherited from SceneObject has been created for 3D track objects. Plots_Nogaro.jpg

3D_Nogaro.jpg

History

  • 2nd November, 2008: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Chootair
Engineer
France France
No Biography provided

Comments and Discussions

 
GeneralExample Map PinmemberMember 46003372-Nov-08 22:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140718.1 | Last Updated 2 Nov 2008
Article Copyright 2008 by Chootair
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid