PDA

View Full Version : X-Y plot using Map gauge?


skeewbob
02-08-2010, 01:27 PM
Is it possible to plot generic X-Y data using the Map gauge? In addition to drawing a conventional latitude/longitude map, I'd like to draw an elevation profile with a moving dot (altitude vs distance) and the only way I can think to do this is to fool the map gauge into thinking altitude and distance are latitude and longitude. Can I reprogram the map gauge to use inputs other than latitude and longitude. I've tried it but it doesn't seem to work.

RandallNoll
02-08-2010, 05:55 PM
Not sure if you can do it using the map function. Why wouldn't you just plot altitude in the Analysis by Position tab? That should give you altitude vs. position.

skeewbob
02-09-2010, 04:54 AM
Thanks for the quick reply. The Analysis plots don't overlay the video the way a map gauge does. I'd like to figure out a way to have one map with a moving dot show normal latitude and longitude and another "map" show altitude vs distance (with the moving dot). I thought I might be able to fool it by feeding in a scaled version of altitude and distance but it looks like DashWare may only support one set of lat/long coordinates for maps. In other words, you can't have two different lat/long maps gauges display two different maps at the same time. Is that correct? If so, it would be great if a future version allowed a more generic X-Y plot that could overlay the video.
-Bob

Rolf
02-09-2010, 11:50 AM
Hi skeewbob,

Yeah, the map component ends up basically ignoring what you tell it to use for X and Y and it uses what you have mapped to X/Y in your data profile.

I have a workaround you can try out:
-Create a copy of your data file to use for this special map
-Make a clone of the data profile you are using (Data Profile Editor can be brought up via File > Edit Data Profiles...)
-->In your new data profile clone, have a look at the column mappings (bottom right area)
-->Locate where we are mapping the longitude data column to the longitude data type and change this to use your distance column
-->Locate where we are mapping the latitude data column to the latitude data type and change this to use your altitude column
-->Click OK to save your changes and exit the Data Profile Editor
-In your project, add the new copy of your data file to the project using your new data profile clone
-Add your special 2nd map gauge to your project
-In the project tab, double click on that gage name in the Project Gauges list to bring up the Gauge Input Mapper
-->Make this 2nd map gauge take both of it's inputs from your 2nd data file and click OK
-That map should now use distance for X and Altitude for Y

Let me know how that goes.

Thanks,
Rolf

skeewbob
02-09-2010, 02:47 PM
Thanks a ton Rolf, your work-around did the job! I can get both types of maps now. There is something not quite right with the altitude vs distance "map" though where some spikes of "noise" are introduced in the altitude direction whenever the vehicle stops (meaning distance doesn't change for several seconds). It looks a bit like a quantization error because the spikes are all the same size (I've attempted to attach a screen shot showing the noise). I'll try rescaling the altitude and distance numbers to more closely resemble latitude and longitude. Perhaps the software doesn't use double precision floating point for these variables and I'm getting some round off or truncation problems.

skeewbob
02-10-2010, 06:06 AM
I tried rescaling altitude and distance but still get the "noise" spikes in altitude whenever the vehicle stops (see attached screenshot). Altitude and distance are floating point values scaled between 0-90, each having 8 digits to right of decimal point. Here are the first few lines of my data file. What do you think could cause the noise spikes? The actual altitude data don't vary nearly as much as plotted by the map gauge.

Time,Latitude,Longitude,Altitude(m),Distance(m),Al titude(ft),Distance(mi),Latitude_alt,Longitude_alt
1,38.436051,-122.719651,72.805,0,238.9,0.00,1.34649805,0.000000 00
2,38.436051,-122.719651,72.633,0,238.3,0.00,1.34331698,0.000000 00
3,38.436051,-122.719651,72.633,0.076,238.3,0.00,1.34331698,0.00 006492
4,38.436049,-122.71965,72.633,0.151,238.3,0.00,1.34331698,0.000 12898
5,38.436044,-122.719653,73.127,0.914,239.9,0.00,1.35245331,0.00 078074
6,38.43604,-122.719658,73.359,1.588,240.7,0.00,1.35674405,0.00 135646
7,38.436035,-122.719666,73.438,2.541,240.9,0.00,1.35820512,0.00 217051
8,38.43603,-122.71968,73.413,3.83,240.9,0.00,1.35774276,0.0032 7157
9,38.436027,-122.719698,73.576,5.508,241.4,0.00,1.36075737,0.00 470492
10,38.436028,-122.71972,73.642,7.309,241.6,0.00,1.36197802,0.006 24333
11,38.436031,-122.719743,73.803,9.443,242.1,0.01,1.36495564,0.00 806618

skeewbob
02-10-2010, 06:19 AM
I forgot to mention on the last post, I'm using "Latitude_alt" for altitude and "Longitude_alt" for distance on the elevation profile map.