custom gauges

For discussion of Phil Tobin's Tuner Studio software (Only about the tuning software itself, not about how to tune or firmware features)

Moderator: LT401Vette

Post Reply
vinister
Experienced MS/Extra'er
Posts: 159
Joined: Sat Jul 19, 2008 11:04 pm

custom gauges

Post by vinister »

I'd like to create a couple of custom gauges.

1. A clock. Based on gps time or windows time, whichever works. Preferrably in 24hr time, the gps format is perfect, just have to drop a few decimals.

2. GPS speedo.

My gps program writes to a .csv file every 3 seconds, with the Time, Streetname, heading, and Speed, among other things. Could we grab info from this file live and show it on the dashboard?

This would be the last step to a complete dash replacement. Having the street I'm on indicated on the dashboard would just be the icing on the cake!

Here's what my dash is looking like. Tunerstudio rocks, I've discovered the gauge designer and I love it. I had no idea it was this configurable, this easily.
LT401Vette
Super MS/Extra'er
Posts: 12729
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: custom gauges

Post by LT401Vette »

Currently all the OutputChannels available for a gauge are defined by the firmware ini. However, I have been wanting to add system or outputchannels that are available with all configurations. The Clock is a good example of that, other things are online. That is on the todo list and isn't very hard, I will try to slip that into the next release in March.

The GPS is something I have been wanting to look into also. I don't think using it as a speedo it is responsive enough to use for performance data, but even a speedo would be nice. For this, rather than read a file, I plan to have it as a second controller. Sort of like you can add a CAN device now, the idea is is to be able to connect to a second serial/usb device also. So you can connect to:
- a second MegaSquirt
- OBDII to piggyback off the stock one.
- additional WB controllers
- GPS devices.

You can see the ground work is there for multiple devices as all outputchannel selection are first to a controller. If you have any specific gps dongles in mind, I can look at them. I'm a bit backlogged so I can't promise too fast a return, but I am heading there :).
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
vinister
Experienced MS/Extra'er
Posts: 159
Joined: Sat Jul 19, 2008 11:04 pm

Re: custom gauges

Post by vinister »

Ok I see your point. Not everyone will have the software I have setup and you want it to work for everyone.

GPS dongles are all the same, they put out NMEA data. Many have Sirf (a new standard), but it offers no advantages for this application, and all the sirf receivers typically are setup for NMEA out of the box. The nav message from the satellites themselves is only 50bps and includes many many sentences, so you'll never have a real-time speedo. The software I'm using updates it about once per second, which is perfectly useful as a speedo. The GPS receivers themselves generate the 'velocity' sentence, using a calculation of longitude and lattitude changing over time. On several occasions I have been right next to a new honda civic on the highway, you can see the spead readout on their dashboard and it is always exactly what the GPS is showing me.

GPS receiers are either usb or serial, either way it will always be a com port with NMEA data. This means no matter which one you buy, it will be compatible with any software written for NMEA.

this is the sentence you will be interested in, and it should pop up about every 2 or 3 seconds:

$GPRMC,<1>,<2>,<3>,<4>,<5>,<6>,<7>,<8>,<9>,<10>,<11><CR><LF>

1) UTC time of position fix, hhmmss.sss format.
2) Status, A = data valid, V = data not valid.
3) Latitude, ddmm.mmmm format.
4) Latitude hemisphere, N or S.
5) Longitude, dddmmm.mmmm format.
6) Longitude hemisphere, E or W.
7) Speed over ground, 0.0 to 1851.8 knots.
8) Course over ground, 000.0 to 359.9 degrees, true.
9) Date, ddmmyy format.
10) Magnetic variation, 000.0 to 180.O.
11) Degrees
12) Checksum

This contains everything we need. I think with this data it would be quite easy to create fields to drive gauges. Of course we need to convert knots to km/hr and mph(000.0 * 1.151) , and heading from degrees to a compass-style reading.

Here is a typical nmea dump from terminal: http://www.tma.dk/gps/nmeadump.html

I also found a dot net gps library http://www.tma.dk/gps/library.asp

Another advantage of all this is that it will be easy to create a small map window, that will plot the race track. You can overlay the lap data and analyze your cornering line, accel and braking zones, etc. I imagine this would be very useful with datalogging. You could incorporate it into both tunerstudio and megalogviewer. The speed itself will be useful in the log since currently there isn't much of a way to tell if you're tuning a 20mph section or a 100mph section, both of which typically have different fuel/spark requirements (to an extent).
vinister
Experienced MS/Extra'er
Posts: 159
Joined: Sat Jul 19, 2008 11:04 pm

Re: custom gauges

Post by vinister »

Let me know if you want me to send you a gps receiver for testing. I have been wanting to upgrade from my usb dongle to an OEM-style chipset with an external antenna, and could donate my usb receiver to you to help move things along.
65looter
Experienced MS/Extra'er
Posts: 371
Joined: Mon Mar 27, 2006 6:56 am
Location: London
Contact:

Re: custom gauges

Post by 65looter »

vinister could you please share you gauge layout?
Ford 342 stroker | 4inj.TBI
MS2/Extra beta RC3 2.1.0 20090611
Rhdhybrid
Helpful MS/Extra'er
Posts: 52
Joined: Sun May 11, 2008 5:12 am

Re: custom gauges

Post by Rhdhybrid »

How did you make the yellow and red warnings on the gauges??? Can't seem to get it to work.....

Thanks Ken
93 Skyline GTR
2001 NUR Spec Powertrain Swap
Way to many upgrades to list.

2.0 CR/Vtec - Long Gone..... Great Learning Experience.
B20Z Block, B16a Head(Big Valves- Ported)
Supercharged
Megasquirt 2 V3.0 With 4 Bip 373s running Wasted Spark.
01 CBR 929RR Coil Sticks
vinister
Experienced MS/Extra'er
Posts: 159
Joined: Sat Jul 19, 2008 11:04 pm

Re: custom gauges

Post by vinister »

The zones set themselves up when you specify the warning values in the gauge properties.

email me for a copy of the .dash

vinistois at gmail
65looter
Experienced MS/Extra'er
Posts: 371
Joined: Mon Mar 27, 2006 6:56 am
Location: London
Contact:

Re: custom gauges

Post by 65looter »

vinister wrote:The zones set themselves up when you specify the warning values in the gauge properties.

email me for a copy of the .dash

vinistois at gmail

You got mail, thanks a lot :)
Ford 342 stroker | 4inj.TBI
MS2/Extra beta RC3 2.1.0 20090611
vinister
Experienced MS/Extra'er
Posts: 159
Joined: Sat Jul 19, 2008 11:04 pm

Re: custom gauges

Post by vinister »

sent. The background is not included in the .dash file. I just google searched textures and the carbon fiber and diamond plate is quite common so I dld a bunch of them.
LT401Vette
Super MS/Extra'er
Posts: 12729
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: custom gauges

Post by LT401Vette »

How did you make the yellow and red warnings on the gauges???
Only some gauge styles have the warning bars, namely the "Circle Analog Gauge"

I plan to go back and put it in some others too, and add more gauge styles.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
LT401Vette
Super MS/Extra'er
Posts: 12729
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: custom gauges

Post by LT401Vette »

Good info on the GPS... I want to get to this one :)
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
vinister
Experienced MS/Extra'er
Posts: 159
Joined: Sat Jul 19, 2008 11:04 pm

Re: custom gauges

Post by vinister »

Ya! it will be so cool. Again let me know if I can be of any assistance in getting it going.
Post Reply