- Mon Apr 09, 2018 3:13 am
#198895
I'm in a bit of a bind with something I'm working on. I wanted to try creating my own implementation of measuring the distance covered by a moving vehicle along highways and roads and that assigning fares for passengers based on the distance covered by each passenger. The route used by the vehicle is never fixed so use of maps wouldn't have helped. That meant I had to use GPS to calculate the distance.
I broke down the process to some steps but I haven't been able to combine them to a working program.
I'm using arduino by the way. These are the steps
I've also been able to get a working code to calculate distance every 1.5seconds and add that distance to a distance total
I however am unable to combine the above codes to create the larger program
How may I proceed for my project? My background is in electrical engineering but I don't have any coding experience - any guidance will be appreciated
Thank you
Chintan
I broke down the process to some steps but I haven't been able to combine them to a working program.
I'm using arduino by the way. These are the steps
- Passenger enters the vehicle
- Passengers swipes a card, NFC or RFID
- Program registers the passengers card and assigns zero distance to that card
- as the vehicle moves, the distance is calculated every second or every 2 seconds and the distance is added onto the value for that passenger
- While the distance is being added, the program checks to see if the passenger is still there
- If the passenger swipes their card the second time, it signifies they are alighting and the program should stopp adding the distance and return the accumulated total distance and fare calculated on that distance
- The program should be able to do this for any number of passengers
I've also been able to get a working code to calculate distance every 1.5seconds and add that distance to a distance total
I however am unable to combine the above codes to create the larger program
How may I proceed for my project? My background is in electrical engineering but I don't have any coding experience - any guidance will be appreciated
Thank you
Chintan