Using GPS with RISC OS
Chris Hall (132) 3554 posts |
Problems: The serial block drivers do not work on the Pi 3. The serial module in ROM currently causes a freeze unless it is unplugged if you have a GPS Hat connected (on any model of Pi). There is therefore no solution at present to use SatNav on a model 3 with a GPS module – it works in simulation mode (with no GPS module present) of course as it is written in BASIC. How easy is it to set the baud rate to 9600 in RISC OS?
|
Raik (463) 2059 posts |
Have you changed in SatNav062 or a side effect with MapView and other… |
Chris Hall (132) 3554 posts |
Just a coincidence surely? You did comment that with no grid ref it did odd things… The next version will be back to Midford. |
Raik (463) 2059 posts |
Please not change, I like it ;-) I’m not at home but I have try any things (my wife was not amused)… Play around with the shield… works. Check the metadata from a photo with rRAW and export the GPS data to MapView… nearly the same. Very nice work. |
Chris Hall (132) 3554 posts |
A new ROM was not working With the GPS hat fitted, you need to unplug the Serial module (present in roms after 10 Oct 2016) for it to start up at present. Then you need to use the serial block drivers as RMReInit Serial causes the Pi to hang (with the GPS Hat connected). |
Raik (463) 2059 posts |
Thanks for the info. Is what I would try if I back at home. Is the “build in” RTC supported? |
Chris Hall (132) 3554 posts |
Is the “build in” RTC supported? On the one hand, I’m not sure how to read it but it seems to receive partial messages, containing the time (but not date?) before any satellites come into view, so I suspect it is a blank message apart from time. On the other I don’t know how to tell RISC OS that I have a time client (like NetTime or RTC). |
Raik (463) 2059 posts |
I understand, I think. Is not a “normally” I2C RTC. So for me it is the easier way to look at why my RTC is discharged and try to solve this problem. Maybe the BatteryMan Problem of my Pi-Top is also a “shield” problem. |
Chris Hall (132) 3554 posts |
Yes I’m sure there is a way: whether it is IIC or via the serial port I don’t know. Version 0.75 uploaded (small improvement to clock error and to message protocols). If neither SerialDeviceSupport nor PiSerial modules are present it just simulates GPS. If RXDATA line is not connected it resumes GPS once it is connected again (overcomes freeze with Serial module). It uses messaging protocol in preference (to URI_Dispatch) but if not acknowledged it falls back to existing method (URI_Dispatch). If message to stop is received, it stops. Also works with the Serial module, now present in Pi ROMs, tested on model A+ and model 3, but requires pin 10 (RXD) to be disconnected until the Pi has started up and baud rate and serial protocol set. No doubt this issue will be corrected in due course. Also works with PiSerial block drivers (which do not work on model 3). |
Raik (463) 2059 posts |
Back at home I have “remount” the parts of my Pi-Top. I use only the needed 6 wire for the GPS shield. Power for the shield (3,3V) I can switch. Now a new ROM is working if I power off the shield until the Pi has started up. |
Chris Hall (132) 3554 posts |
The Pi 3 works. Haven’t tried the Pi 2. I unplug pin 10 (RXDATA) and don’t reconnect until SatNav has run. This is with just pins 1 (3.3V), 4 (5V), 6 (GND) and 10 (RXDATA) connected via flying leads. |
Raik (463) 2059 posts |
Mmm, I have connected pin 1(3.3V), 6(GND), 8(TXD), 10(RXD), 27 (EEDATA), 28 (EECLK). Is what I read in the adafruit manual… GPIO#4 I ignore because I not need a “pulse per second”… Works with my B+. I power on (pin1) before SatNav is running. |
Clive Semmens (2335) 3276 posts |
I’ve not been following this thread, but I opened it, and saw the photo & map – and recognized the spot instantly! Saw that scene (& photographed it) from the train going from Dresden to Prague a couple of years ago! Used Googlemaps later to identify where all the photos were of. |
Raik (463) 2059 posts |
Thats right. Well recognized ;-) I spent a few days with my family in Bad Schandau to go hiking. The Dresden-Prague railway is placed behind “our apartment”. I try the GPS stuff in my Pi-Top… my wife was not amused ;-) Now you can use !rRaw to identify the places but you need a picture with GPS data inside. The most Smartphones do this… ;-) |
Clive Semmens (2335) 3276 posts |
I don’t have (or want) a smartphone ;-) – I have a camera with a long zoom, which doesn’t have GPS. Easy enough to find places using the map, when you know exactly where you went. The camera records the date and time of the shot, so I can pin down roughly where I was, and I’m good at relating pictures and memory to satellite views and maps. |
Raik (463) 2059 posts |
… as I say normally… SM-Art-Phone … SM means sadomaso ;-) |
Clive Semmens (2335) 3276 posts |
8~) We do have a mobile phone. I’m not sure how old it is, but quite a few years. We put £10 on it so we could talk to our children when we left them at home (they were 22 and 20 years old) while we went on a trip eight years ago, and we haven’t run out of the £10 yet. It’s normally off, just kept charged and taken with us in case of emergencies. |
Raik (463) 2059 posts |
I give up with my Pi2. Have pluged PIN 1, 6, 10 via the Pi-Top Hub. Works with my B+ but not with my Pi2. Same ROM other Pi-firmware. The same modules are loaded. |
Chris Hall (132) 3554 posts |
Having unplugged and plugged I am going to put a switch in the 3.3V line to sort out the problem with the Serial module (but having just looked at the recent additions to the CVS I think I may not need to). With a switch on the 3.3V line but the other lines connected, it seems to need a power on/off/on to start up from cold can’t quite read the line it stops at (about ten or so modules from the top) as I am using a 800×480 screen. Am also trying a different brand of GPS receiver but encountering teething problems as it sends slightly different messages. |
Raik (463) 2059 posts |
Looks like my ROM was to old (13-10-2016). Starts with a plugged GPS but works only with B+, not with Pi2 and 3. At the evening I will try the Pi2 and with PiTab (A+ and DSI display). Maybe I find the place to “build in” the GPS in my PiTab. |
Chris Hall (132) 3554 posts |
If I switch on the GPS without SatNav is running, it freeze my Pi-Top. That has been fixed in the 26 Oct 2016 ROM (not yet tested it though). If I use the AEF option it reports zeros.Yes the Anquet Export Format ‘.aef’, RISC OS filetype &A6F, is only defined for the OSGB national grid – useful in Great Britain but not elsewhere. as long as I have not a iconYou will only have an icon for filetype GPX (&1E3) if the Filer has seen an app that defines it, such as !RiscOSM. You can still drag it to save, notwithstanding that it is invisible. Version 0.81 runs on Pi model A+, 0, 1, 2 and 3 with the latest (26-Oct-2016) ROM. |
Raik (463) 2059 posts |
I will try the latest ROM at the evening.
Is it possible to implement a comparable grid for “elsewhere” or is it GB only?
Is what I mean as I wrote “drag the ghost” ;-) |
Chris Hall (132) 3554 posts |
Is it possible to implement a comparable grid for “elsewhere” or is it GB only? There is a similar grid defined for Ireland. Look at the code to translate a latitude and longitude from WGS84 lat/long to OSGB lat/long and grid:
it is not simple and any grid system can only apply over a localised area (such as GB) as it maps the earth’s surface to a rectangular grid where distance in any direction is the same. change to AEF and back to GPX gives the GPX ghost Curses – another bug! |
Wouter Rademaker (458) 197 posts |
The German Gauß-Krüger, the “NATO” UTM, ITM (the “new Irish grid”) and other grid system based on Transverse Mercator are similar as OSGB and the “old” Irish Grid but calculates with a different shape of the earth. Fortunately, most use of the same shape of the earth as WGS84, which makes it somewhat easier. Not too difficult are the Lambert grid systems such as those of Belgium and France. Tricky are the grid systems used in the Netherlands and Switzerland. My attempt in php: https://github.com/WouterRademaker/mediawiki-coorconv |
Raik (463) 2059 posts |
Thanks for the info. I know Thomas has play around with Gauß-Krüger but not sure if MapView can handle… Back to SatNav… After Jeffreys answer in the Pandora-thread I could not resist… Have solder a serial cable for my Pandora… … and connected to the RPi GPS … … works… Edit: I forgot…
Latest ROM (compiled “zpp free” last night) works fine. Can start my Pi-Top with plugged GPS. |