Previously:
Sci Fi Your Pi - Prince Dakkar's patent log taking chart compass
Sci Fi Your Pi - Prince Dakkar's patent log taking chart compass - Functional Design
Sci Fi Your Pi - Prince Dakkar's patent log taking chart compass - Route selection and indication
First it is time for an apology; life got in the way and Ii forgot all about this project until nearly too late. With the deadline looming I am unlikely to fully complete the product as I had hoped but I do intend to try and get as much detail as possible onto the blog before then and will try and update progress to completion even if that is a little after the competition deadline.
Direction of Travel Indicator 1 - Setting current and destination positions
An adventurer embarking on a Journey will need to know which way to go so the second part of the functionality I envisioned included a set of arrows on the device that would show which way the traveler needs to move to reach the destination.
To make this work I need to take the current position of the device (from the micro-stack GPS module) and then compare this with the intended destination. The Raspberry Pi will be used to achieve this task. Once the current GPS position is received it will be split into latitude and longitude figures. these are then compared in turn with the desired destination latitude and longitude.
The comparisons are then used to make a decision on which LED(s) to illuminate indicating the direction to travel.
Getting Current Position
To get the current position I was planning to use the Microstack GPS module and the Microstack Baseboard. The datasheets for these are here - Baseboard and GPS Module.
This is where I encountered my first big problem. I hadn't really checked the contents of the kit and this means that I was not aware that I did not have a Microstack baseboard. As i had left this discovery till rather late in the day it left me with a dilemma. I could not realistically get a Baseboard in time so I needed a solution.
A little head scratching (and maybe a few choice words) later i came across this post on the Microstack GPS for Geochaching by callum smith. As well as a great explaination of how to use the Microstack GPS module to get current position there is also mention (in the comments) that it can be used without the baseboard.
So the plan changed and the GPS module will be used without the Baseboard. This can be done by connecting the appropriate pins on the module to the correct pins on the RPi.
The Microstack GPS module uses a python library available from Github. The libraries can be installed using apt-get:
General microstack node library:
sudo apt-get install python3microstacknode
GPS specific tools:
sudo apt-get install gpsd gpsdclients pythongps
Once done the GPS module can then be used to get position information required.
With the GPS Module connected up and the python libraries installed the current position can be obtained (using gps.gpgll).
This can then be used to pull out latitude and longitude numbers and the NS and EW indicators.
Getting Destination Position
The destination position is a little more tricky as I have set up a challenge for my self in the way destination is selected (I do not intend to use a screen or buttons as it would not fit with the aesthetic).
I have planned to use a selector system to indicate start and end positions on the device for route setting (described in my earlier blog - Sci Fi Your Pi - Prince Dakkar's patent log taking chart compass - Route selection and indication).
This is used to connect strings of LEDs to indicate the route depending on the position of the connections. I am intending to also use this to set the desired destination as well.
The plan is to use the connections on the wheel to connect a pin or combination of pins on the Raspberry Pi to set them High or low. Obviously the pins needed limits the number of destinations but using a combination of pins I can get a usable number of destinations from a relatively small number of pins. 4 or 5 pins which will give me 8 or 16 destinations (depending on how many destinations I can find LEDs for and fit on the scroll wheels).
The pin connections will use the same idea as the LED strings supplying a current to set pins high or not to set it low. The pin pattern will give a binary number that corresponds with the destination. Each destination will have a variable set with the longdtude, latitude and EW / NS indicators.
Comparison of Positions
The current and desired positions are the compared and the the difference used to set which LED to light.
If the desired position is south of the desired position the north LED will light if the current position is south and west of the desired position the north and east LEDs will light and so on. I am hoping I will have enough pins left to add the ordinal points and improve this (in the above example the North east LED would light rather than the north and east).