⚠ Forum Archived — The THSCC forums were discontinued (last post: 2024-05-18). This read-only archive preserves club history. Visit thscc.com →  |  Search this archive with Google: site:forums.thscc.com your search terms

THSCC Forums

Tarheel Sports Car Club Forums
It is currently Tue Apr 07, 2026 10:06 am

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 55 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 Post subject: Re: Programmer needed for simple project - autoread times
PostPosted: Tue Mar 08, 2005 11:26 am 
Offline
Retired Admin
User avatar

Joined: Tue Aug 19, 2003 1:34 pm
Posts: 3276
Location: Durham, NC
Graham Jagger wrote:
1. Michelle Pfeifer (I'd follow her voice anywhere!)
2. Mr. Rogers (nice and calm and neighbourly)
3. Drill Sargeant from Full Metal Jacket (that'll make you pay attention)
4. Whopper from War Games (might as well sound like a computer)


Ok, I would vote for #3 or #4. :) Am I the only one who wanted a computer with flashing lights and that "sound" just like Whopper?

I would also add the Star Trek computer voice from the episode "Tomorrow is Yesterday". This is the one in which the computer on Enterprise develops a bit of a ummm "personality"...

Computer: Computed and recorded, dear.
Kirk: Computer, you will not address me in that manner. Compute.
Computer: Computed... dear.

Kirk: I wouldn't mind so much if only it didn't get so... affectionate.
Spock: It also has an unfortunate tendency to giggle

:lol:

_________________
Richard Casto
1972 Porsche 914
2013 Honda Fit Sport
2015 Honda Fit EX
http://motorsport.zyyz.com
Money can't buy happiness, but somehow it's more comfortable to cry in a Porsche than a Kia.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 08, 2005 1:22 pm 
Offline
Got Powah?
User avatar

Joined: Wed Aug 20, 2003 9:15 pm
Posts: 4724
Vincent Keene wrote:
BTW, after you finish the bus project, and this one, how about getting started on bar coding cars. This "old" idea is now possible using AX Ware so why not look into it?


How about RFID tags instead?

_________________
Mike Whitney
whit32@gmail.com, 919-454-5445
V10, V8, V8t, I6, I6, V6, F4t, I4, I4, I4, I4, I2, 1, 1


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 17, 2005 5:34 pm 
Offline
I did stay at a Holiday Inn Express.
User avatar

Joined: Thu Aug 28, 2003 7:08 pm
Posts: 1524
Location: Raleigh NC
MikeWhitney wrote:
Vincent Keene wrote:
BTW, after you finish the bus project, and this one, how about getting started on bar coding cars. This "old" idea is now possible using AX Ware so why not look into it?


How about RFID tags instead?


Implanted? THAT would stop any potential ringer drivers! :wink:

Note: I'm all for cool too, I just think a live announcer is very useful in keeping the event moving and providing more current info than just reading times especially if we used AXware's remote announcer station capability to feed data to him/her.

My ASUS MB in my home computer has a very non computer sounding female voice that says "Computer self test sucessful, computer is now booting from operating system" It has an editor capability but I haven't played with it.

_________________
SPIN or WIN!
there's no glory for going slow.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 18, 2005 1:02 am 
Offline
Got Powah?
User avatar

Joined: Wed Aug 20, 2003 9:15 pm
Posts: 4724
MikeWhitney wrote:
Vincent Keene wrote:
BTW, after you finish the bus project, and this one, how about getting started on bar coding cars. This "old" idea is now possible using AX Ware so why not look into it?


How about RFID tags instead?


We'll set up an RFID scanner at the entrance to the site, which will capture your entry for registration. We can put up a sign to tune to 91.1 for further instructions. The computer can read out over the radio whether your Paypal payment has been received or if you need to come up to the bus to pay. It will also read you your car classification and number for your verification. The event chairs can record a WAV file with pertinent event information that will then be played.

Now at the start line, the RFID info can be processed by the computer to put you in the queue. While you're sitting in line, the computer can also tell you on the PA and FM what your previous best run is, what your competition has managed, and how much you need to improve to get into first place.

I got your bling right here, Vincent :)

_________________
Mike Whitney
whit32@gmail.com, 919-454-5445
V10, V8, V8t, I6, I6, V6, F4t, I4, I4, I4, I4, I2, 1, 1


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 18, 2005 8:30 am 
Offline

Joined: Sat Aug 30, 2003 11:30 am
Posts: 231
Location: Raleigh
Can you also program it to drive my car optimally?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 18, 2005 9:51 am 
Offline
You're just jealous

Joined: Thu Aug 28, 2003 6:14 pm
Posts: 2553
Location: Raleigh, NC
Rick Butters wrote:
Can you also program it to drive my car optimally?


Sure. It will require lots of data collection and testing runs first by "selected" experienced drivers. I'll be glad to volunteer to drive your car for that purpose. :roll:

_________________
Dick Rasmussen

FS 50 2018 Mustang GT


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 18, 2005 12:21 pm 
Offline

Joined: Sat Aug 30, 2003 11:30 am
Posts: 231
Location: Raleigh
I may take you up on that (if I can pry you out of Miles' car).


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 18, 2005 2:18 pm 
Offline
You're just jealous

Joined: Thu Aug 28, 2003 6:14 pm
Posts: 2553
Location: Raleigh, NC
Rick Butters wrote:
I may take you up on that (if I can pry you out of Miles' car).


You might want to wait to see if I'm actually still quick enough to beat anyone in the class . . . especially in a "real car" rather than a "race car". :wink:

_________________
Dick Rasmussen

FS 50 2018 Mustang GT


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 28, 2005 12:40 pm 
Offline
Got Powah?
User avatar

Joined: Wed Aug 20, 2003 9:15 pm
Posts: 4724
Making progress. Man, I'm rusty. But this is fun!

This just uses a sample input file and outputs to a messagebox temporarily. See the "to do" list in comments at the bottom for what I know I still have left to do.

Comments? I know it's not the most efficient piece of code, but it's so simple it doesn't matter.

(PS - for anyone who wants to tinker around with this - It's VBScript for Windows Scripting which is natively supported in Win2k and XP. Just copy the text and paste into Notepad, save the file as "TIMER.SCR", and double-click it. You'll see the output on a box.)

Code:



INFILE = "Run 5: DSP 150 160.567+1"
'PREV_INFILE=""

'BREAK INTO PARTS AT SPACES
PIECES = SPLIT(INFILE)

'IF IT HAS 4 PARTS IT'S PROBABLY A TIME
IF UBound(PIECES) = 4 THEN

   'ASSIGN THE RUN NUMBER
   RUN = LEFT (PIECES(1),INSTR(PIECES(1),":")-1)

   'SPLIT CAR NUMBER INTO AUDIO TRACKS
   NUM = PIECES(3)
   'UP TO 20, AND ANY MULTIPLE OF 10 GET ONE FILE
   NUMCMD = NUM & ", "
   '10S 2 FILE SPLIT
   IF NUM > 20 AND NUM < 100 AND NUM MOD 10 > 0 THEN      
      NUMCMD = INT (NUM/10)*10 & ", " & NUM MOD 10 & ", "
   END IF
   '100S 2 FILE SPLIT
   IF NUM > 100 AND NUM MOD 10 = 0 THEN               
      NUMCMD = INT (NUM/100)*100 & ", " & INT((NUM MOD 100)/10)*10 & ", "
   END IF   
   '100S 3 FILE SPLIT
   IF NUM > 100 AND NUM MOD 10 > 0 THEN
      NUMCMD = INT (NUM/100)*100 & ", " & INT((NUM MOD 100)/10)*10 & ", " & NUM MOD 10 & ", "
   END IF

   'SPLIT TIME UP INTO AUDIO TRACKS
   TIMEPLUS = SPLIT (PIECES(4), "+")                  'SEPARATE OUT CONE CALL, DNF, RERUN
   TIMENUM = SPLIT (TIMEPLUS(0), ".")                  'SEPARATE SECONDS AND FRACTIONS
   'UP TO 20, AND ANY MULTIPLE OF 100 GET ONE READING
   TIMECMD = TIMENUM(0) & ", "
   '10S 2 FILE SPLIT
   IF TIMENUM(0) > 20 AND TIMENUM(0) < 100 AND TIMENUM(0) MOD 10 > 0 THEN         
      TIMECMD = INT (TIMENUM(0)/10)*10 & ", " & TIMENUM(0) MOD 10 & ", "
   END IF
   '100S 2 FILE SPLIT
   IF TIMENUM(0) > 100 AND TIMENUM(0) MOD 10 = 0 THEN
      TIMECMD = INT (TIMENUM(0)/100)*100 & ", " & INT((TIMENUM(0) MOD 100)/10)*10 & ", "
   END IF   
   '100S 3 FILE SPLIT
   IF TIMENUM(0) > 100 AND TIMENUM(0) MOD 10 > 0 THEN                              
      TIMECMD = INT (TIMENUM(0)/100)*100 & ", " & INT((TIMENUM(0) MOD 100)/10)*10 & ", " & TIMENUM(0) MOD 10 & ", "
   END IF

   'CREATE THE TIME STRING WITH "POINT"
   TIMECMD = TIMECMD & "POINT" & ", " & LEFT(TIMENUM(1), 1) & ", " & MID(TIMENUM(1), 2, 1) & ", " & RIGHT (TIMENUM(1), 1) & ", "

   'ADD THE CONE (DNF, RERUN) COUNT OR "CLEAN"
   IF (UBOUND(TIMEPLUS) = 1) THEN
      TIMECMD = TIMECMD & "PLUS" & ", " & TIMEPLUS(1) & ", " & "CONE" & ", "
   ELSE
      TIMECMD = TIMECMD & "CLEAN" & ", "
   END IF

   'CREATE THE COMMAND (TEMPORARY, TO ADD WAV EXTENSIONS AND CALL PROGRAM
   COMMAND = PIECES(2) & ", " & NUMCMD & "RUN" & ", " & RUN & ", " & "TIME" & ", " & TIMECMD

   'TEMPORARY OUTPUT FOR DEBUG
   MSGBOX (COMMAND)

END IF

' NOTES - TO DO
' ADD FILE INPUT
' ADD LOOP FEATURE SCANNING OUTPUT FILE
' ADD ERROR HANDLING (DO NOTHING OR SAY "ERROR"?)
' CHANGE ALL ", " TO ".WAV "
' CHANGE COMMAND TO ADD WAV AND PROGRAM CALL
' ADD CAPACITY FOR MORE THAN 20 CONES!?!?
' REMOVE "PLUS" FOR DNF OR RERUN?
' ADD CAPACITY FOR MORE THAN 20 RUNS!?!?
' ADD PAUSES FOR MORE NATURAL SOUND




_________________
Mike Whitney
whit32@gmail.com, 919-454-5445
V10, V8, V8t, I6, I6, V6, F4t, I4, I4, I4, I4, I2, 1, 1


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 15, 2005 11:57 pm 
Offline
Got Powah?
User avatar

Joined: Wed Aug 20, 2003 9:15 pm
Posts: 4724
Latest. Still lots to do. I've been away from it for 8 weeks, and I already don't understand everything I was working on :)

Code:
FUNCTION NUMCRUNCH (NUM)
   
   'CLEAR EXISTING VALUES
   NUMCRUNCH = ""

   'START WITH 100 = "ONE HUNDRED" ETC
   IF NUM MOD 100 = 0 THEN
      NUMCRUNCH = NUM & SUFFIX
   END IF

   'NEXT READ 10x AS "ONE" ETC FOR NATURAL SOUND
   IF INT (NUM/100) > 0 AND NUM MOD 100 > 0 THEN
      NUMCRUNCH = (INT (NUM/100)) & SUFFIX
      'IF X01-X09 READ "OH"
      IF NUM MOD 100 > 0 AND NUM MOD 100 < 10 THEN
         NUMCRUNCH = NUMCRUNCH & "O" & SUFFIX
      END IF
   END IF

   'JUST ADD NUMBER IF 1-19 AND x01-x19
   IF NUM MOD 100 > 0 AND NUM MOD 100 < 20 THEN
      NUMCRUNCH = NUMCRUNCH & NUM MOD 100 & SUFFIX
   END IF

   'ADD 10'S IF x20-x99
   IF NUM MOD 100 >=20 THEN
      NUMCRUNCH = NUMCRUNCH & ( INT ( (NUM MOD 100) / 10 ) )*10 & SUFFIX
      'ADD 1'S IF NOT LAST PLACE NOT ZERO
      IF NUM MOD 10 > 0 THEN
         NUMCRUNCH = NUMCRUNCH & NUM MOD 10 & SUFFIX
      END IF
   END IF   
   
END FUNCTION



FUNCTION READIT (COMMAND)

   Set objShell = CreateObject("WScript.Shell")
   MSGBOX "Sndrec32 /play /close """ & COMMAND & """"
   'objShell.Run "Sndrec32 /play /close """ & COMMAND & """", 0, False

   'to do more work incl pause timing

END FUNCTION



FUNCTION BUILDSTRING (INFILE)

   'BREAK INTO PARTS AT SPACES
   PIECES = SPLIT(INFILE)

   'IF IT HAS 4 PARTS IT'S PROBABLY A TIME
   IF UBound(PIECES) = 4 THEN

      'CREATE THE CLASS STRING
      CLAS = PIECES(2)
      IF CLAS <> "LAD" AND CLAS <> "NOV" AND CLAS <> "TIR" THEN
         CLAS=""
         FOR I=1 TO LEN(PIECES(2))
            CLAS = CLAS & MID (PIECES(2), I, 1) & SUFFIX
         NEXT
      ELSE
         CLAS = CLAS & SUFFIX
      END IF

      'ASSIGN THE RUN NUMBER
      RUN = NUMCRUNCH ( LEFT (PIECES(1),INSTR(PIECES(1),":")-1) )

      'SPLIT CAR NUMBER INTO AUDIO TRACKS
      NUMCMD = NUMCRUNCH(PIECES(3))
      
      'SPLIT TIME UP INTO AUDIO TRACKS
      TIMEPLUS = SPLIT (PIECES(4), "+")                  'SEPARATE OUT CONE CALL, DNF, RERUN
      TIMENUM = SPLIT (TIMEPLUS(0), ".")                  'SEPARATE SECONDS AND FRACTIONS

      'CREATE THE TIME STRING WITH "POINT"
      TIMECMD = NUMCRUNCH( TIMENUM(0) ) & "POINT" & SUFFIX & LEFT(TIMENUM(1), 1) & SUFFIX & MID(TIMENUM(1), 2, 1) & SUFFIX & RIGHT (TIMENUM(1), 1) & SUFFIX

      'ADD THE CONE (DNF, RERUN) COUNT OR "CLEAN"
      IF (UBOUND(TIMEPLUS) = 1) THEN
         IF TIMEPLUS(1) = "DNF" OR TIMEPLUS(1) = "RERUN" THEN
            TIMECMD = TIMECMD & TIMEPLUS(1) & SUFFIX
         ELSE
            IF TIMEPLUS(1) = 1 THEN
               TIMECMD = TIMECMD & "PLUS" & SUFFIX & TIMEPLUS(1) & SUFFIX & "CONE" & SUFFIX
            END IF
            IF TIMEPLUS(1) > 1 THEN
               TIMECMD = TIMECMD & "PLUS" & SUFFIX & NUMCRUNCH( TIMEPLUS(1) ) & "CONES" & SUFFIX
            END IF
         END IF
      ELSE
         TIMECMD = TIMECMD & "CLEAN" & SUFFIX
      END IF

      'CREATE THE COMMAND
      BUILDSTRING = CLAS & NUMCMD & "RUN" & SUFFIX & RUN & "TIME" & SUFFIX & TIMECMD
   END IF
END FUNCTION


FUNCTION GETTIME

' MOST OF THE REMAINING WORK IS NEEDED HERE... THIS IS JUST SAMPLE CODE FROM HELP FILES

   Const ForReading = 1, ForWriting = 2
   Dim fso, MyFile
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set MyFile = fso.OpenTextFile("c:\testfile.txt", ForWriting, True)
   MyFile.WriteLine "Hello world!"
   MyFile.WriteLine "The quick brown fox"
   MyFile.Close
   Set MyFile = fso.OpenTextFile("c:\testfile.txt", ForReading)
   ReadLineTextFile = MyFile.ReadLine    ' Returns "Hello world!"

END FUNCTION

' ------------------ BEGIN MAIN PROGRAM ---------------------

' LOOP WHEN THE FILE HAS CHANGED?
'DO WHILE TRUE=TRUE

' ASSIGN ACTUAL SOUND FILE SUFFIX
SUFFIX = ".WAV "

' GET THE TIME FROM THE UPDATED FILE
'INFILE = GETTIME

' THIS IS A TEMPORARY INFILE THAT LOOKS LIKE WHAT AXWARE SPITS OUT
INFILE = "Run 5: TIR 0 0.567+11"

' PROCESS AND READ THE FILE
READIT (BUILDSTRING (INFILE) )

' CLOSE LOOP?
'LOOP


' ------------------ END MAIN PROGRAM ---------------------

' NOTES - TO DO

' WHAT'S THE BEST PROGRAM?  SNDREC32 HAS AN ANNOYING PAUSE
' ADD PAUSES FOR MORE NATURAL SOUND
' ADD FILE INPUT
' ADD LOOP FEATURE SCANNING OUTPUT FILE
' VERIFY NOMENCLATURE FOR DNF, RERUN
' FIND OTHER EXCEPTIONS FROM + CALLS
' ADD ERROR HANDLING (DO NOTHING OR SAY "ERROR"?)


'DONE

' CHANGE COMMAND TO ADD WAV AND PROGRAM CALL
' "ZERO" TO "OH"
' "ONE HUNDRED" TO "ONE", ADD CLAUSE FOR "OH" IN TENS
' ADD CAPACITY FOR MORE THAN 20 CONES!?!?
' ADD CAPACITY FOR MORE THAN 20 RUNS!?!?
' REMOVE "PLUS" FOR DNF OR RERUN?
' ** SPLIT CLASSES INTO LETTER FILES.
' CHANGE ALL ", " TO ".WAV "
' ** EXCEPTION FOR LAD NOV TIR

_________________
Mike Whitney
whit32@gmail.com, 919-454-5445
V10, V8, V8t, I6, I6, V6, F4t, I4, I4, I4, I4, I2, 1, 1


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 55 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group