LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GPS map has outputs to control the indicators, the brake lights, speedometer and rev counter of a car

Hi,
 
I'm basically trying to design a GPS that goes around a map which is selected by the mouse (which i've done , see the attached vi) and now what i want to do is when the car (i.e. the circles) go around the set path i want an output to be produced whereby for example when the car turns right the right indicator comes on, the brake light comes on the speedometer also reduces the speed etc.Im a bit stuck on that. Please see the attached vi.
 
 
Thanks
 
Hombre
_____________________________________________________________________________________________
Dude LabView rocks.
Message 1 of 9
(4,354 Views)

Hi Hombre,

      I like the map!  ... liked it so much I got a "bit" carried-away implementing your idea for steering-wheel orientation.  It also seemed like the route-drawing could use mouse events, and the driving/plotting-function could be run as a parallel-task.

There's probably a simpler way to get steering-wheel orientation, but this way produced the "segment" lengths which are convenient for guessing about "braking".

Cheers!   Smiley Happy

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Message 2 of 9
(4,334 Views)

Hi tbd

can i just say wow, what you've done is amazing, could i ask if you can add me to your msn list may be cause i need someone to bounce ideas off and if your available i'd like you to help me out with some bits. cheers

 

 

hombre

_____________________________________________________________________________________________
Dude LabView rocks.
Message 3 of 9
(4,283 Views)

Hi Hombre!

      Let me return the "wow!" - those are the best kudos I ever got. Smiley Happy

No "msn list" here - had to google to see what you meant! Smiley Tongue  If you have new LabVIEW-related ideas to bounce, you'll discover some incredibly smart people here, willing to share their thoughts - I'm certainly not the only soul who's caught the programming bug!  If you have questions related to this program (or even non-LabVIEW general-programming questions,) just keep replying to this thread!

Cheers!

Message Edited by tbd on 03-27-2007 10:46 PM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Message 4 of 9
(4,267 Views)
hey tbd
 
just been working on the code and i need some further help with the following :
 
1) i can't seem to get the a little picture of a car to follow the route set
2) I can't seem to work out how to add indicators to the vi, so that when wants to turn left, FIRSTLY the indicators come on then the brakes come on then the car slows down.
 
i really appreciate it if you can give me a few pointers on how to do that.
 
thanks tbd appreciate it!!!!
_____________________________________________________________________________________________
Dude LabView rocks.
0 Kudos
Message 5 of 9
(4,234 Views)


1) i can't seem to get the a little picture of a car to follow the route set
2) I can't seem to work out how to add indicators to the vi, so that when wants to turn left, FIRSTLY the indicators come on then the brakes come on then the car slows down.
1) I can't see the "car" without the [new] code, but it sounds like a car-icon has entered-the-picture. ;^)
    Since you were already plotting circles that followed the route, it should be pretty easy to paint a picture at different locations along the route, or, maybe, position an icon over the picture along the route.  Did you have a method in mind?
(It might be good to start zipping this project if we're going to pass it back and forth.)

 2) It sounds like, as the car is being placed, you want to indicate what the car is going to do next.  To place the car, you're using a set of coordinates from an array.  To know what the car will do next, just look-ahead at the next set of coordinates!  Play-around with some array examples.

Re: Brakes: There's a concept that I'm not sure about yet: Does the position-data represent the cars position at regular time-intervals?  If so, then you can use the distance the car travels between samples to infer whether it's speed has changed from one sample to the next(?)  You can anticipate brake activity the same as turn-signals - by looking ahead.

I think it would make life easier to pre-process all the position-data and synthesize the turn-signal/brake states, then supply this info to the loop that plots the car.  Why don't you work on building a sub-VI that takes the array of positions as an input parameter, and outputs an array of clusters, where each cluster indicates what the car is doing? (see attached).  You should be able to "cannibalize" the existing code to get you started.

Cheers!

 

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 6 of 9
(4,229 Views)
hey tbd
 
had a look at your pointers, tried them out but to no avail. I had a play with the vi and i am a bit stuck to be honest with you
 
but i am currently connecting a seperate steering wheel vi and trying to connect it upto the main GPS vi but i can't seem to get it to work. which i've attached both vis.
 
your guidance is needed tbd :Smiley Wink lol
 
_____________________________________________________________________________________________
Dude LabView rocks.
0 Kudos
Message 7 of 9
(4,189 Views)
the steering wheel vi. i couldn't get files to zip, it was still too large so email me at somalipranos@hotmail.com and i will send you the steering wheel vi. sorry about that.
 
cheers tbd
 
_____________________________________________________________________________________________
Dude LabView rocks.
0 Kudos
Message 8 of 9
(4,187 Views)

Hey Hombre,

The code would have seemed a bit overwhelming for a beginning LabVIEWer - was hoping you'd dig-in, study related examples that ship with LabVIEW - and feel free to ask questions.  If it's any encouragement, the program uses basic constructs that are worth learning.  The top loop is a very simple "State Machine" (search this Forum) - all it does is wait for a mouse or button "event", jump to a Case for handling the event, then return to a wait-state.  Rather than spell it all-out here,  I added much comments.Smiley Happy

I don't know how you're going to use the GPS data to control the visual-effects you have in mind, and there's a big section of code that needs your attention, but it's been roughed-out and returns values.  To now the approach has been: update the GUI once for every GPS point - do you think that will still work?

I appreciate your interest in emailing stuff, though, I hope we can keep working through this board (email at home is not convenient!)  Try saving without diagram graphics - if necessary, maybe attach graphics seperately.  I just resaved your program this way and its size dropped from 2.3 Mb G to 0.2Mb!Smiley Surprised

Cheers!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 9 of 9
(4,169 Views)