Announcement

Collapse
No announcement yet.

My Traffic Program Source Code

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • My Traffic Program Source Code

    Here is what I had working.... It does GPS tracking, reverse geocoding, weather for current location, and can update traffic data for CA... You will notice in the SetLocation function you can un-comment the hard coded NMEA line and the Thread.Sleep line and then comment out the two that are currently there (this will make since when you see the code)... This will allow you to be hardcoded in CA and not read the NMEA line from the serial port so that you can see how the traffic section works... Currently in the code it is hard coded to COM1 and North America... I haven't had time to work on it in a while so I thought I would just put it out there for everyone.. Its in C#, written in Visual Studio .NET...

    Also the bin/Debug/Traffic/Tools folder is not needed for the program to run, but is a bunch of data files and vbs scripts that I used to geocode all the intersections and create the ca.xml file that has all the lat/longs and makes it possible to retrieve the traffic data...

    http://mirkwood.gotdns.com/downloads/carconnection.zip
    __________________
    CENTRAFUSE http://www.centrafuse.com
    01 Jeep Cherokee Sport 4x4 Installed
    M10000/512Mb/20GB, Lilliput 7", Holux GM-210

  • #2
    Thanks a bunch man!

    I've already integrated it into my .net app!

    Comment


    • #3
      Let me know when you get something going... My ca.xml files needs to be updated... They actually fixed some streets on the site I get my information from.... Mainly the San Francisco area... It will make my geocoding more accurate and add more locations to the map.
      __________________
      CENTRAFUSE http://www.centrafuse.com
      01 Jeep Cherokee Sport 4x4 Installed
      M10000/512Mb/20GB, Lilliput 7", Holux GM-210

      Comment


      • #4
        Hi Veetid, sorry be a bother you.

        When I try to start either carconnection or the ca_set version, I get windows showing an exception error, and a second window saying mappoint needs to close. I have mappoint '02 and .NET 1.1 installed.

        Does carconnection needs to be copied to a particular directory?
        Guess I'll have to install visual studio to really see what's wrong.

        Comment


        • #5
          What is the exception? It should work fine with 1.1 framework and Mappoint 2004... I have never tested with Mappoint 02..
          __________________
          CENTRAFUSE http://www.centrafuse.com
          01 Jeep Cherokee Sport 4x4 Installed
          M10000/512Mb/20GB, Lilliput 7", Holux GM-210

          Comment


          • #6
            VisualStudio .Net 2003 or 2005?

            I'll install whichever you suggest...
            .//Daren
            (Epia M10000/C134) (C137/MII 10000) Liliput /Opus 150W/DVD/512MB/80GB/Hummer H1
            MediaCar/CoPilot7/Routis

            Comment


            • #7
              BTW Veetid are you N. CA? SF Area?
              .//Daren
              (Epia M10000/C134) (C137/MII 10000) Liliput /Opus 150W/DVD/512MB/80GB/Hummer H1
              MediaCar/CoPilot7/Routis

              Comment


              • #8
                North County San Diego and I haven't installed 2005 yet.. I just use 2003...
                __________________
                CENTRAFUSE http://www.centrafuse.com
                01 Jeep Cherokee Sport 4x4 Installed
                M10000/512Mb/20GB, Lilliput 7", Holux GM-210

                Comment


                • #9
                  OK, im downloading both, so I'll give it a try tonight. Have already updates the XML file of geo-data?

                  We are also thinking of moving down to the La Jolla area.
                  .//Daren
                  (Epia M10000/C134) (C137/MII 10000) Liliput /Opus 150W/DVD/512MB/80GB/Hummer H1
                  MediaCar/CoPilot7/Routis

                  Comment


                  • #10
                    I meant to say, have you already updated the xml file, but my toddler was tugging at my arm...

                    A good enhancement request would be to predict the traffic and weather, because when there is an accident ahead of me, I never have internet access. If you could use the reality-look-ahead buffer - this is only available in .Net2005 that would be great...

                    Are you aware of any trickle fed radio based traffic systems in CA. The UK has something like this, I think it was called RDS. The UK has been really far ahead in these things.
                    .//Daren
                    (Epia M10000/C134) (C137/MII 10000) Liliput /Opus 150W/DVD/512MB/80GB/Hummer H1
                    MediaCar/CoPilot7/Routis

                    Comment


                    • #11
                      I have heard of the RDS, but don't know too much about it... I actually haven't had a chance to work on this in a long time... The only area that needs to really be updated is the San Francisco seciton of the xml file... I need to actually try and hook back up a guy in the threads that is trying to setup a traffic database.. That way I would be submitting the ca data and how to get it and he already has UK and some others loaded... Then other people could follow and there would be a global traffic database Wouldn't that be awesome I will post a new ca.xml file when I get a chance... Been busy at work.. I also sent a copy of my code to SA and hopefully we can work some kind of implementation into VOICES GPS Navigation... That way I don't have too write what he already has
                      __________________
                      CENTRAFUSE http://www.centrafuse.com
                      01 Jeep Cherokee Sport 4x4 Installed
                      M10000/512Mb/20GB, Lilliput 7", Holux GM-210

                      Comment


                      • #12
                        Hi Veetid

                        I've been tinkering with the app this evening. I made some mods to it, to make it more touchscreen friendly, larger font, slightly larger buttons, etc. Find the GPS port etc, Nothing much.

                        I can see how the weather data is being fetched down by reverse geo-encoding the lat/lon to postcode and submitting off to MSN, but I dont understand a couple of things. I dont have the GPS plugged into the machine with VS2003, so I hardcoded the NMEA data to my location; however, why does it ask me for the region for traffic data? I would assume it would pick the location im in? Also, I couldnt see where it actually gets the traffic data from? It appears that the ca.xml takes the location and can return the uri to fetch for data right?

                        Anyway, im tired and bleary eyed, so I'll go to bed and look again tomorrow.

                        I like it, by the way, its the most interesting thing to come up for a while.
                        .//Daren
                        (Epia M10000/C134) (C137/MII 10000) Liliput /Opus 150W/DVD/512MB/80GB/Hummer H1
                        MediaCar/CoPilot7/Routis

                        Comment


                        • #13
                          Basically the URL that it uses to fetch each subsection is in the XML.. You basically will see a URL for each road, such as I5 North and all data comes from www.sigalert.com... The reason I made it ask you is because you can't be sure which data you would want to show... For example I live in North County San Diego... My postal code would show up as Carlsbad... I would have had to code something in the program to go through a huge lookup list of every single postal code in CA and then map them down to the handful of cities I can retrieve traffic data for... This would have worked and is still a possible good idea, but wouldn't always be correct... For example... I get up in the morning and it would have a Carlsbad postal code and I hit traffic data.. Well I am in San Diego County, so most likely my program would choose and show San Diego traffic, but what if I was driving to LA? I would want to see Orange County / LA County traffic data to my north... The reason I made it ask is because my GPRS data plan cost money and I never wanted it to make an assumption... If I was in LA and wanted to see San Diego traffic to the South and I hit traffic and didn't think about it, it would automatically download LA traffic data, which is a lot of kilobytes... Since every state will only have a handful of options I figured leaving it at the state level would be fine.... I actually planned on a bunch of things, but have been really busy at work.. Let me know when you get done, I would love to see the changes you make...
                          __________________
                          CENTRAFUSE http://www.centrafuse.com
                          01 Jeep Cherokee Sport 4x4 Installed
                          M10000/512Mb/20GB, Lilliput 7", Holux GM-210

                          Comment


                          • #14
                            Originally posted by veetid
                            I have heard of the RDS, but don't know too much about it...
                            RDS (Radio Data System) is a service provided by radio stations. In addition to conventional analog FM radio signals, the stations also transmit additional information in the form of encoded digital signals that can be analysed by the car radio.

                            The following RDS services are currently available.

                            AF (Alternate Frequency): The car radio automatically selects the frequency with the best reception for the current programme.

                            EON: In the event that a traffic announcement (TA) is transmitted on any station in the station network, the car radio will automatically switch to that station for the duration of the message if you are currently listening to a station that does not transmit traffic information.

                            Music/Speech (M/S): In future, a number of radio stations will differentiate between music and speech programmes. It is possible (with DSC) to select a separate setting (bass and treble cuts) for speech programmes.

                            PI code: With the help of the PI code, the car radio can identify the station you have tuned into.

                            PS (Program Service): makes it possible to display the radio station name.

                            PTY (Program Type): a function supported to an increasing extent by the radio stations that enables the car radio to select radio stations by their genre (i.e. news, rock, pop, sport, etc.).

                            RT (Radiotext): additional information transmitted by the radio station (i.e. the title of the programme, the name of the artist, the name of the song, commercials etc.).

                            Tom
                            VIA EPIA M9000/120 GB/Xenarc 700TSV/Opus 90W DC-DC
                            Haicom GPS/3Com 11g Wi-Fi/D-Link BT
                            WinXP/myHTPC/InfoMap Navigator Eu/PhoneControl w/T68i
                            Blaupunkt HU & speakers/Velocity active subs/Alpine amps

                            Progress: removed while waiting for nano-itx

                            Comment


                            • #15
                              Thanks TommieG

                              I was looking around for something that would have an antenna and USB/serial connectors, it would simply output some form of XML corresponding to traffic it found. Or, if our US radios would do this then maybe the out-of-band data could be fed to a serial/USB port... A pipe dream I presume.
                              .//Daren
                              (Epia M10000/C134) (C137/MII 10000) Liliput /Opus 150W/DVD/512MB/80GB/Hummer H1
                              MediaCar/CoPilot7/Routis

                              Comment

                              Working...
                              X