GPS Navi with Odroid Go and Neo-6M

Post Reply
ripper121
Posts: 82
Joined: Mon Jan 28, 2019 7:00 pm
languages_spoken: english
Has thanked: 7 times
Been thanked: 9 times
Contact:

GPS Navi with Odroid Go and Neo-6M

Unread post by ripper121 » Wed Jan 30, 2019 11:24 pm

Hi :),
Odroid Go with connected Neo-6M GPS-Module.


Sources: https://github.com/ripper121/OdroidGoOSMGPSOffline

Download FW: https://github.com/ripper121/OdroidGoOS ... OSM_GPS.fw
JoyPad = Move around
A/B = Zoom in/out (Zoom Level goes from 5-16, depending on which tile zoom levels you have)
Select / Start = Brightness
Menu = Reset Movement



How to generate Tiles (offline Map) for your Area:

URL:
-URL TileServer

Zoom Level:
-z ZOOM

Bounding Box:
left bottom
-left >min-longitude
-bottom >min-latitude

right top
-right >max-longitude
-top >max-latitude

Example >>

Code: Select all

TileDownloader.exe -URL https://a.tile.openstreetmap.org/${z}/${x}/${y}.png -z 5 -left -0.489 -botton 51.28 -right 0.236 -top 51.686
Tile servers: https://wiki.openstreetmap.org/wiki/Tile_servers

If your arguments look like that

Code: Select all

 Arguments: -z 5 -left -489 -botton 0 -right 236 -top 51686
use a ',' instead of a '.' (depends on your region setting.)

Download TileDownloader: https://github.com/ripper121/OdroidGoOS ... loader.exe

Download TILES (sample set): https://drive.google.com/open?id=1ng5wp ... QsR8js7pFB
Last edited by ripper121 on Tue Feb 05, 2019 6:51 pm, edited 3 times in total.
These users thanked the author ripper121 for the post:
wtarreau (Sun Apr 21, 2019 6:16 am)

pichel
Posts: 1
Joined: Thu Jan 31, 2019 1:21 am
languages_spoken: english
ODROIDs: Odroid Go
Has thanked: 0
Been thanked: 0
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by pichel » Thu Jan 31, 2019 1:26 am

Hi,
looks very interesting for me.

Hope to see more information 😀

User avatar
mad_ady
Posts: 5830
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 67 times
Been thanked: 41 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by mad_ady » Thu Jan 31, 2019 1:46 am

Looks great, but now we know where you live :D Please do share the code. @crashoverride was interested in something similar. Using the dpad to look around would be nice. Also, didn't know OSM had satellite pictures.

crashoverride
Posts: 4397
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 35 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by crashoverride » Thu Jan 31, 2019 2:11 am

mad_ady wrote: ↑
Thu Jan 31, 2019 1:46 am
@crashoverride was interested in something similar.
I did a proof of concept a while back. I still think GPS would be a 'killer app' for ODROID-GO. However, 1) the maps need to be offline (on SD card) so someone would need to maintain a tile server for region dumps and 2) someone needs to make a GPS 'hat' for the GO.

User avatar
mad_ady
Posts: 5830
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 67 times
Been thanked: 41 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by mad_ady » Thu Jan 31, 2019 3:08 am

Since gps dongles talk serial would it be feasible to use the microusb port on the go with a custom (otg-like) cable to connect one?
But I don't think the go can provide +5V for the usb slave, so it would need to get its power externally.

Also, tiles could be pulled over wifi so you don't need to maintain them, though you'd need wifi then.

Back in the PDA era there were programs that could scrape tiles from various sources and provide them offline in a packed format. Nowadays everybody is expected to have wifi/mobile data.

crashoverride
Posts: 4397
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 35 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by crashoverride » Thu Jan 31, 2019 1:11 pm

The USB port on the GO is basically the same circuit as the console cable for any other ODROID. The only difference is its built onto the board. It has the same limitations as the regular console cable in that its only usable as a USB device.

The web API for map tiles is well defined. There is no need to scrape for them.

ripper121
Posts: 82
Joined: Mon Jan 28, 2019 7:00 pm
languages_spoken: english
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by ripper121 » Sun Feb 03, 2019 1:25 am

Little update.
Now with osm offline maps (saved jpg files 240x240px on SD card).

Zoom Leven from 5 to 14.
Position marker is the red circle.

https://www.youtube.com/watch?v=BQWwTZANGlE
Last edited by ripper121 on Sun Feb 03, 2019 5:52 am, edited 3 times in total.

User avatar
rooted
Posts: 6469
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 21 times
Been thanked: 10 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by rooted » Sun Feb 03, 2019 3:15 am

Very nice.

User avatar
mad_ady
Posts: 5830
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 67 times
Been thanked: 41 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by mad_ady » Sun Feb 03, 2019 3:54 am

It's nice that you can scroll around :) I'm guessing you can use it without gps as well (with a fixed start location).

ripper121
Posts: 82
Joined: Mon Jan 28, 2019 7:00 pm
languages_spoken: english
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by ripper121 » Sun Feb 03, 2019 5:48 am

This "scroll around" is a manipulation of the GPS Coordinates via the JoyStick ;).

How to generate Tiles (offline Map) for your Area:
1. Open Maperitive.exe (http://maperitive.net/)
2. Move the map to your favor position
3. MAP->Set Geometry Bounds
4. MAP->Set Printing Bounds
Now the area of the map you want to Export is set.
5. TOOLS-> Generate Tiles (this can take some time, depending on how high your Zoom Level is)
6. Now you can find some png files in the Maperitive /tiles folder
8. Open Flexxi.exe (https://sourceforge.net/projects/flexxi-image-resizer/)
9. Import the Tiles Folder
10. Resize the Image to 240x240 px (best Fit for GO Screen)
11. Convert to JPG Files
12. Start
13. Now you have your tiles in the correct size and format
14. Copy the "TILES" (all Uppercase) folder to the root directory of your SD card

Open Arduino IDE and Flash the Code to your GO.

JoyPad = Move around
A/B = Zoom in/out (Zoom Level goes from 5-16, depending on which tile zoom levels you have)
Select / Start = Brightness
Menu = Reset Movement

Todo: add GPS Neo-6M Module Code

Download Tools: https://drive.google.com/open?id=18JUOu ... 4cO6Xv8Wn8
Download TILES (sample set): https://drive.google.com/open?id=1ng5wp ... QsR8js7pFB

This is the Arduino Code:

Code: Select all

#include <odroid_go.h>

#define DISPLAY_WIDTH 320
#define DISPLAY_HEIGHT 240
#define TILE_SIZE 240

bool firstRun = true;
double zoom = 10;
double lat_rad = 50.8225313, lon_deg = 12.7508936;
double tileX = 0, tileY = 0;
double old_lat_rad = 0, old_lon_deg = 0;
double old_zoom = 0;
double old_tileY = 0, old_tileX = 0;
uint8_t brightness = 127;

void setup()
{
  // put your setup code here, to run once:
  Serial.begin(115200);
  GO.begin();
  GO.battery.setProtection(true);
  GO.lcd.clear();
  GO.lcd.setCursor(0, 0);

  if (!SD.begin()) {
    GO.lcd.println("Card Mount Failed");
    Serial.println("Card Mount Failed");
    return;
  }
  uint8_t cardType = SD.cardType();

  if (cardType == CARD_NONE) {
    GO.lcd.println("No SD card attached");
    Serial.println("No SD card attached");
    return;
  }

  Serial.print("SD Card Type: ");
  if (cardType == CARD_MMC) {
    GO.lcd.println("MMC");
    Serial.println("MMC");
  } else if (cardType == CARD_SD) {
    GO.lcd.println("SDSC");
    Serial.println("SDSC");
  } else if (cardType == CARD_SDHC) {
    GO.lcd.println("SDHC");
    Serial.println("SDHC");
  } else {
    GO.lcd.println("UNKNOWN");
    Serial.println("UNKNOWN");
  }

  uint64_t cardSize = SD.cardSize() / (1024 * 1024);
  Serial.printf("SD Card Size: %lluMB\n", cardSize);
  GO.lcd.printf("SD Card Size: %lluMB\n", cardSize);

  delay(3000);

  GO.lcd.clear();
  GO.lcd.setCursor(0, 0);
}

//setBrightness(uint8_t brightness),
void loop()
{
  GO.update();
  if (GO.JOY_X.isAxisPressed() == 1) {
    lon_deg += 0.0001;
    delay(10);
  }
  if (GO.JOY_X.isAxisPressed() == 2) {
    lon_deg -= 0.0001;
    delay(10);
  }
  if (GO.JOY_Y.isAxisPressed() == 2) {
    lat_rad += 0.0001;
    delay(10);
  }
  if (GO.JOY_Y.isAxisPressed() == 1) {
    lat_rad -= 0.0001;
    delay(10);
  }
  if (GO.BtnA.wasPressed() == 1) {
    zoom++;
  }
  if (GO.BtnB.wasPressed() == 1) {
    zoom--;
  }
  if (GO.BtnSelect.isPressed() == 1) {
    GO.lcd.setBrightness(brightness);
    brightness--;
  }
  if (GO.BtnStart.isPressed() == 1) {
    GO.lcd.setBrightness(brightness);
    brightness++;
  }


  if (lat_rad > 85.05112878)
    lat_rad = 85.05112878;
  if (lat_rad < -85.05112878)
    lat_rad = -85.05112878;
  if (lon_deg > 180)
    lon_deg = 180;
  if (lon_deg < -180)
    lon_deg = -180;
  if (zoom > 16)
    zoom = 16;
  if (zoom < 5)
    zoom = 5;
  if (brightness > 254)
    brightness = 254;
  if (brightness < 1)
    brightness = 1;

  //redraw only when something has changed
  if (old_lat_rad != lat_rad || old_lon_deg != lon_deg || old_zoom != zoom || firstRun) {
    double posX, posY, fractpart, intpart;
    //calculate from coordinates to tile numbers
    tileX = long2tilex(lon_deg, zoom);
    tileY = lat2tiley(lat_rad, zoom);
    //fractional part is the position of the your coordinats in the tile
    posX = modf(tileX , &intpart);
    posY = modf(tileY , &intpart);
    posX = (posX * TILE_SIZE) + (abs(DISPLAY_WIDTH - TILE_SIZE));
    posY = (posY * TILE_SIZE);

    //redraw only when something has changed
    if (uint16_t(old_tileX) != uint16_t(tileX) || uint16_t(old_tileY) != uint16_t(tileY)  || old_zoom != zoom  || firstRun) {
      String path = "/TILES/" + String(uint16_t(zoom)) + "/" + String(uint32_t(tileX)) + "/" + String(uint32_t(tileY)) + ".jpg";
      Serial.println(path);
      if (SD.exists(path)) {
        Serial.println("File found.");
        GO.lcd.clear();
        GO.lcd.setCursor(0, 0);
        //drawJpgFile(fs::FS &fs, const char *path, uint16_t x = 0, uint16_t y = 0, uint16_t maxWidth = 0, uint16_t maxHeight = 0, uint16_t offX = 0, uint16_t offY = 0, jpeg_div_t scale = JPEG_DIV_NONE),
        GO.lcd.drawJpgFile(SD, path.c_str(), (abs(DISPLAY_WIDTH - TILE_SIZE)));
      } else {
        GO.lcd.println("");
        GO.lcd.println("Debug:\nFile not found.");
        Serial.println("File not found.");
      }
      firstRun = false;
    }

    GO.lcd.drawRect(int32_t(posX), int32_t(posY), 4, 4, RED);
    GO.lcd.fillRect(0, 0, abs(DISPLAY_WIDTH - TILE_SIZE), DISPLAY_HEIGHT, BLACK);
    GO.lcd.setCursor(0, 0);
    GO.lcd.println("Battery:");
    GO.lcd.println(String(GO.battery.getPercentage()) + "%");
    GO.lcd.println("Lon_deg:");
    GO.lcd.println(String(lon_deg, 6));
    GO.lcd.println("Lat_rad:");
    GO.lcd.println(String(lat_rad, 6));
    GO.lcd.println("Zoom:");
    GO.lcd.println(String(zoom));

    Serial.println(String(tileX, 6));
    Serial.println(String(tileY, 6));
    Serial.println(String(posX));
    Serial.println(String(posY));
    Serial.println(zoom);
    Serial.println(String(lon_deg, 6));
    Serial.println(String(lat_rad, 6));

    old_tileX = tileX;
    old_tileY = tileY;
  }

  old_lat_rad = lat_rad;
  old_lon_deg = lon_deg;
  old_zoom = zoom;
}

double long2tilex(double lon, double z)
{
  return (double)((lon + 180.0) / 360.0 * pow(2.0, z));
}

double lat2tiley(double lat, double z)
{
  return (double)((1.0 - log( tan(lat * M_PI / 180.0) + 1.0 / cos(lat * M_PI / 180.0)) / M_PI) / 2.0 * pow(2.0, z));
}

double tilex2long(int x, int z)
{
  return x / pow(2.0, z) * 360.0 - 180;
}

double tiley2lat(int y, int z)
{
  double n = M_PI - 2.0 * M_PI * y / pow(2.0, z);
  return 180.0 / M_PI * atan(0.5 * (exp(n) - exp(-n)));
}
Last edited by ripper121 on Tue Feb 05, 2019 6:45 pm, edited 1 time in total.

ripper121
Posts: 82
Joined: Mon Jan 28, 2019 7:00 pm
languages_spoken: english
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by ripper121 » Mon Feb 04, 2019 3:43 am

For the Odroid Go Expansion Head, I would create a Adapter to connect the Neo-6M directly to the Head.
I like to sell it via https://www.tindie.com/ or if possible I can provide everything to Hardkernel and they can do it.

ripper121
Posts: 82
Joined: Mon Jan 28, 2019 7:00 pm
languages_spoken: english
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by ripper121 » Mon Feb 04, 2019 7:54 pm

Now the FW is ready to use with the Odroid Launcher.

Download FW: https://github.com/ripper121/OdroidGoOS ... OSM_GPS.fw
Download TILES (sample set): https://drive.google.com/open?id=1ng5wp ... QsR8js7pFB

Todo: add the Tile downloader into the FW (for full standalone)


Sources + Tutorial: https://github.com/ripper121/OdroidGoOSMGPSOffline

[youtube]https://www.youtube.com/watch?v=-4kA_KhIvus[/youtube]

User avatar
mad_ady
Posts: 5830
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 67 times
Been thanked: 41 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by mad_ady » Mon Feb 04, 2019 8:31 pm

You should PM @robroy and publish the instructions in Odroid Magazine, since it's a great project. I'm guessing the gps interface is over serial and it talks NMEA, right? Most serial GPS modules should work with it.
One more thing - does gps require 5V? So you need to keep the go plugged in?

ripper121
Posts: 82
Joined: Mon Jan 28, 2019 7:00 pm
languages_spoken: english
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by ripper121 » Mon Feb 04, 2019 9:16 pm

"should PM @robroy"
Yes will do it when its ready for Public

" it talks NMEA, right? "
Yes it decodes NMEA packages

"does gps require 5V?"
Depends on which module you have, the Neo-6M works also with 3.3V


I need some help now for the Tile Downloader:
Tiles are in PNG format and size 256x256.
We can create a function which can load PNG and stretch it to 240x240
or
We need a webservice (api) which can resize and convert the files before download
but that would create much traffic on that webserivce because of the many Tiles which are needed for a high Zoom and big area.

https://a.tile.openstreetmap.org/16/35082/21998.png
https://a.tile.openstreetmap.org/zoom/tilex/tiley.png

User avatar
mad_ady
Posts: 5830
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 67 times
Been thanked: 41 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by mad_ady » Tue Feb 05, 2019 12:41 am

Why not leave them in 256x256 and display them centered (so some edges get slightly cut off). Do you always display a full tile and never composite 2 or more tiles on screen?

ripper121
Posts: 82
Joined: Mon Jan 28, 2019 7:00 pm
languages_spoken: english
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by ripper121 » Tue Feb 05, 2019 5:21 am

Because when the marker for your position is moving out of the screen and something is missing you are not able to see that area. This was the easiest way to implement it functional. I don't think that's possible to hold more than one tile in the sram, to be able to center the position marker and only to move the map.
But if you have a great idea to implement it, the code is in git and you could push your code there.

ripper121
Posts: 82
Joined: Mon Jan 28, 2019 7:00 pm
languages_spoken: english
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by ripper121 » Tue Feb 05, 2019 6:41 pm

I have created a Tile Downloader which convert to jpg 240x240px ready to use with the Odroid Go Navi:

How to generate Tiles (offline Map) for your Area:

URL:
-URL TileServer

Zoom Leve:
-z ZOOM

Bounding Box:
left bottom
-left >min-longitude
-bottom >min-latitude

right top
-right >max-longitude
-top >max-latitude

Example >>
`TileDownloader.exe -URL https://a.tile.openstreetmap.org/${z}/${x}/${y}.png -z 5 -left -0.489 -botton 51.28 -right 0.236 -top 51.686`
Tile servers: https://wiki.openstreetmap.org/wiki/Tile_servers

If your arguments look like that `Arguments: -z 5 -left -489 -botton 0 -right 236 -top 51686` use a ',' instead of a '.' (depends on your region setting.)

Download: https://github.com/ripper121/OdroidGoOS ... loader.exe

User avatar
mad_ady
Posts: 5830
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 67 times
Been thanked: 41 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by mad_ady » Tue Feb 05, 2019 8:24 pm

Yeah, I figured it would cause more complexity. One quick workaround would be either to "zoom in/out" automatically when in a dead area, or to color the non-visible side with red, to signity an out-of bounds situation.

wtarreau
Posts: 29
Joined: Thu Jan 21, 2016 1:22 am
languages_spoken: english, french
ODROIDs: C2, GO, MC1
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by wtarreau » Sun Apr 21, 2019 2:58 am

This really is an awesome project, entirely made possible by opensource, open maps and the open design that the Odroid GO is, so congrats on this!

I got it to work on first attempt with FriendlyARM's GPS module which I bought a while ago and never had the opportunity to use, it's based on a NEO-7M module. It is supposed to run off 5V as it incudes its own LDO converter but it happens to work fine when powered by the Odroid's 3V3 output on pin6. Also I love that the program displays the battery state, the time, and the raw data.

I made a quick script to download the tiles around my home, feel free to adapt it to your location :

Code: Select all

#!/bin/bash

X=({33136..33157})
Y=({22562..22583})
Z=(16)

for z in ${Z[@]}; do
  for y in ${Y[@]}; do
    for x in ${X[@]}; do
      echo http://a.tile.openstreetmap.fr/osmfr/$z/$x/$y.png
    done
  done
done | xargs wget -U "Mozilla/5.0" -x 

mkdir -p TILES
mv a.tile.openstreetmap.fr/osmfr/* TILES/
rmdir -p a.tile.openstreetmap.fr/osmfr
I'm figuring that it would be nice to be able to move by half maps up and down because when the point is in a corner it's not easy to navigate. I understand the device's limitations though. I think that one approach could be that we write a tool to rebuild intermediary maps map out of 4 adjacent ones. It would also address the concern regarding the resizing. This way we'd store 4 times the number of map files,each starting either at the +0 or +0.5 position, so that the position would always be in the half screen at the center.

Anyway these are ideas of improvements. As it is, it already is awesome. I already plan to put bring this with me when I'm going out with my bike!

I would not be surprised if someone wanted to implement the ability to log all visited places and to just press a button to record a point of interest in order to revisit them later.

I noticed a small issue, I'm hearing a hiss from the speaker, I suspect it was not turned off. But this is really a minor detail!
These users thanked the author wtarreau for the post:
mad_ady (Sun Apr 21, 2019 4:53 am)

ripper121
Posts: 82
Joined: Mon Jan 28, 2019 7:00 pm
languages_spoken: english
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by ripper121 » Sun Apr 21, 2019 3:10 am

Nice to hear that everything is working out of the box also with other GPS modules :).
Also a big thank you to the Odroid Go Makers, got a voucher for that post, I invest it in 2 more Odroid Go's (maybe for a Multiplayer game :D or to gift it to good friends).

If you have time feel free to edit the source :). Yes the noise from the Speaker comes from a not seted Pin.

wtarreau
Posts: 29
Joined: Thu Jan 21, 2016 1:22 am
languages_spoken: english, french
ODROIDs: C2, GO, MC1
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by wtarreau » Mon Apr 22, 2019 5:48 pm

Well, I spent some time looking at the sources but there's no makefile nor any instructions to rebuild. Given the ".ino" suffix on the source I suspect it's based on one of the myriad of arduino forks (but which one?). I had ideas on how to deal with sliding tiles and displaying the computed ground speed, but I'm not willing to spend a full week-end trying to just figure how to build, likely to end up in a succession of failures; I already spent one hour looking for info on how to build .fw files for the launcher instead of doing anything productive :-/ I find it sad that development tools are fragmenting so much these days, we've reached a point where compiling has become way harder than developing. I may have another look at it later.
Update: after upgrading my arduino environment, the esp32 stuff and the toolchain I finally managed to see Odroid-GO listed in the menu and to build your code. I don't know if my other arduino projects still work anymore though. I'll try to perform some updates to the code later and will send them to you.

crashoverride
Posts: 4397
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 35 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by crashoverride » Mon Apr 22, 2019 7:25 pm

wtarreau wrote: ↑
Mon Apr 22, 2019 5:48 pm
Given the ".ino" suffix on the source I suspect it's based on one of the myriad of arduino forks (but which one?).
https://wiki.odroid.com/odroid_go/ardui ... uino_setup
wtarreau wrote: ↑
Mon Apr 22, 2019 5:48 pm
I already spent one hour looking for info on how to build .fw files for the launcher instead of doing anything productive
https://wiki.odroid.com/odroid_go/arduino_app

wtarreau
Posts: 29
Joined: Thu Jan 21, 2016 1:22 am
languages_spoken: english, french
ODROIDs: C2, GO, MC1
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by wtarreau » Mon Apr 22, 2019 10:56 pm

OK I just sent an update to turn the speaker off and display the ground speed. Playing with multiple tiles is for another day now.
These users thanked the author wtarreau for the post:
ripper121 (Tue Apr 23, 2019 12:26 am)

wtarreau
Posts: 29
Joined: Thu Jan 21, 2016 1:22 am
languages_spoken: english, french
ODROIDs: C2, GO, MC1
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by wtarreau » Tue Apr 23, 2019 1:39 pm

Another PR to allow to use original size tiles (256x256) and to slide them by half a tile at once. It tries to maintain the pointer close to the center of the screen (quarter surface, half size). Also the pointer is still drawn when sliding the map as long as the pointer remains on-screen.

I've had lots of trouble with the crappy arduino environment. It takes ages to build tons of useless stuff, and the output binary is huge (450 kB), linked with unused stuff despite being stripped and build with -Os. In addition to this, regularly the resulting image hangs before calling setup(). Sometimes adding random serial.printf() there is enough to unblock it, or reorganizing the code is enough. I suspect something wrong with the checksums that depend on code contents but cannot be sure. At first it appeared it happened more in QIO mode and less in DIO mode but I'm not that sure anymore. I couldn't try with arduino 1.6 as the updated esp32 stuff doesn't build anymore in this version.

At least now I have my maps pre-loaded and it seems to work fine. The next step should be to try to load PNG images instead of JPG ones so that we don't have to convert them anymore. I have not found png display code though.
These users thanked the author wtarreau for the post (total 2):
mad_ady (Tue Apr 23, 2019 1:58 pm) • odroid (Tue Apr 23, 2019 2:20 pm)

ripper121
Posts: 82
Joined: Mon Jan 28, 2019 7:00 pm
languages_spoken: english
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by ripper121 » Tue Apr 23, 2019 3:43 pm

Very cool to see how this project grows with you guys :).
Everything is committed and I can't wait to try it. I will crate a new release and update the main post asap.

wtarreau
Posts: 29
Joined: Thu Jan 21, 2016 1:22 am
languages_spoken: english, french
ODROIDs: C2, GO, MC1
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: GPS Navi with Odroid Go and Neo-6M

Unread post by wtarreau » Wed Apr 24, 2019 6:25 am

I tried it in my car this morning. The speed was correct but the point is on an incorrect location every other block, I did something wrong when deciding what block to start from. I suspect that I computed only from the point location without figuring if it belongs to the left or the right part, resulting in points on the right causing this tile to be shown on the left. I'll have a look this week-end (no more time until then).
However I tried to load the same area at zoom 17, it's awesomely detailed and pleasant to read. I think zooms 15 or 16 are fine for car, 16-17 are fine for a bike, and 17 is fine for a person walking.

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 0 guests