which GPS data do you want to see on LCD/OLED?

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

which GPS data do you want to see on LCD/OLED?

Post by Hamburger »

Hi,
we are getting closer to a v2.2 and I am cleaning up parts of the display code. So question is for you GPS users,which data you want to see on the various displays? We currently have 2 generally different screen sizes
- 2 line displays
- multiline displays, like OLED and smartphones.

Please keep in mind that with some setups the display is wired directly to the MWC and can only be seen while stationary. With other setups the display is linked wirelessly and can be used during flight.

Time is getting close to Santa, so fire away.

User avatar
diyboy
Posts: 28
Joined: Sun Sep 30, 2012 7:12 pm

Re: which GPS data do you want to see on LCD/OLED?

Post by diyboy »

Hi Hamburger,

Glad to hear getting closer to a v2.2.
I am using serial port GPS and OLED. I want to see the GPS connection status and number of Satellite received on the display.
Thanks!

Diyboy

vpb
Posts: 231
Joined: Mon Jul 23, 2012 4:09 pm

Re: which GPS data do you want to see on LCD/OLED?

Post by vpb »

Hi Hamburger, GPS coordinate, number of satellite will be nice.

v2.2 - Christmas's gift for multiwii community, can it be? :D

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: which GPS data do you want to see on LCD/OLED?

Post by Hamburger »

I am using serial port GPS and OLED. I want to see the GPS connection status and number of Satellite received on the display.

as I have no GPS and never looked closely at the code, could you provide the variables which hold that info please?
I would implement it without any way of testing myself, so I would like to reduce the number of dev cycles.

Also, OLED has more than 2 lines, so the new GPS page could provide more info if required. You can have automatic toggle between different pages at a 2second intervall with the lcd.telemetry.auto feature.

Mis
Posts: 203
Joined: Fri Apr 01, 2011 12:23 am

Re: which GPS data do you want to see on LCD/OLED?

Post by Mis »

Maybe some status screen like this:
Image

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: which GPS data do you want to see on LCD/OLED?

Post by Hamburger »

vpb wrote:Hi Hamburger, GPS coordinate, number of satellite will be nice.

v2.2 - Christmas's gift for multiwii community, can it be? :D


in the code I found the following variables. Please provide info what/how those hold the data representation

Code: Select all

  static int32_t  GPS_coord[2];
  static int32_t  GPS_home[2];
  static int32_t  GPS_hold[2];
  static uint8_t  GPS_numSat;
  static uint16_t GPS_distanceToHome;                          // distance to home in meters
  static int16_t  GPS_directionToHome;                         // direction to home in degrees
  static uint16_t GPS_altitude,GPS_speed;                      // altitude in 0.1m and speed in 0.1m/s
  static uint8_t  GPS_update = 0;                              // it's a binary toogle to distinct a GPS position update
  static int16_t  GPS_angle[2] = { 0, 0};                      // it's the angles that must be applied for GPS correction
  static uint16_t GPS_ground_course = 0;                       // degrees*10
  static uint8_t  GPS_Present = 0;                             // Checksum from Gps serial
  static uint8_t  GPS_Enable  = 0;

  static int16_t  nav[2];
  static int16_t  nav_rated[2];    //Adding a rate controller to the navigation to make it smoother

  // Serial GPS only variables
  //navigation mode
  static uint8_t nav_mode = NAV_MODE_NONE;            //Navigation mode


As always the v2.2 will be ready when it is deamed ready - no explcit time frame set yet to my knowledge.

vpb
Posts: 231
Joined: Mon Jul 23, 2012 4:09 pm

Re: which GPS data do you want to see on LCD/OLED?

Post by vpb »

HI Hamburger, according to frskytelemetry
GPS data:

Code: Select all

Datas_Longitude_bp = abs(GPS_coord[LON]) / 100000; //before period character
Datas_Longitude_ap = abs((GPS_coord[LON])/10)  % 10000; //after period character

Datas_Latitude_bp = abs(GPS_coord[LAT]) / 100000;
Datas_Latitude_ap = abs((GPS_coord[LAT])/10) % 10000;


GPS_numSat is actually the number of satellites

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: which GPS data do you want to see on LCD/OLED?

Post by Hamburger »

ok.
How many digits would you like to see for each? Less is better wrt. both computation time and readability.

User avatar
diyboy
Posts: 28
Joined: Sun Sep 30, 2012 7:12 pm

Re: which GPS data do you want to see on LCD/OLED?

Post by diyboy »

Hamburger wrote:
I am using serial port GPS and OLED. I want to see the GPS connection status and number of Satellite received on the display.

as I have no GPS and never looked closely at the code, could you provide the variables which hold that info please?
I would implement it without any way of testing myself, so I would like to reduce the number of dev cycles.

Also, OLED has more than 2 lines, so the new GPS page could provide more info if required. You can have automatic toggle between different pages at a 2second intervall with the lcd.telemetry.auto feature.


Hi, Hamburger

I think following variables represent to number of satellite received and GPS serial data status.
static uint8_t GPS_numSat; //number of satellite received
static uint8_t GPS_Present = 0; //when GPS Serial data correct GPS_Present =1

Diyboy

Code: Select all

// **********************
// GPS common variables
// **********************
  static int32_t  GPS_coord[2];
  static int32_t  GPS_home[2];
  static int32_t  GPS_hold[2];
  static uint8_t  GPS_numSat;
  static uint16_t GPS_distanceToHome;                          // distance to home in meters
  static int16_t  GPS_directionToHome;                         // direction to home in degrees
  static uint16_t GPS_altitude,GPS_speed;                      // altitude in 0.1m and speed in 0.1m/s
  static uint8_t  GPS_update = 0;                              // it's a binary toogle to distinct a GPS position update
  static int16_t  GPS_angle[2] = { 0, 0};                      // it's the angles that must be applied for GPS correction
  static uint16_t GPS_ground_course = 0;                       // degrees*10
  static uint8_t  GPS_Present = 0;                             // Checksum from Gps serial
  static uint8_t  GPS_Enable  = 0;


Code: Select all

 case 8:
        _step = 0;
        if (_ck_b != data)  break;  // bad checksum
        GPS_Present = 1;

vpb
Posts: 231
Joined: Mon Jul 23, 2012 4:09 pm

Re: which GPS data do you want to see on LCD/OLED?

Post by vpb »

Hamburger wrote:ok.
How many digits would you like to see for each? Less is better wrt. both computation time and readability.


Sth like this will be nice, but ofcourse it depends on LCD characters limit

E10668.4004
N1071.5075

Code: Select all

             Datas_Longitude_bp = abs(GPS_coord[LON]) / 100000;
             Datas_Longitude_ap = abs((GPS_coord[LON])/10)  % 10000;
             Datas_E_W = GPS_coord[LON] < 0 ? 'W' : 'E';
             Datas_Latitude_bp = abs(GPS_coord[LAT]) / 100000;
             Datas_Latitude_ap = abs((GPS_coord[LAT])/10) % 10000;
             Datas_N_S = GPS_coord[LAT] < 0 ? 'S' : 'N';


Thank you!

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: which GPS data do you want to see on LCD/OLED?

Post by Hamburger »

all displays currently supported have at least 2 rows * 16 chars, so could be done in two rows.
In your example there is a 5 digits value 10668. What is max. value for such a fragment?

how about this layout:

Code: Select all

123456789.123456
E-----.----- #--
N-----.----- u p

every '-' represents a digit for displaying values.
line 1 holds
- gps.lon and
- number of satellites
line 2 holds
- gps.lat and
- at place of the 'u' either '.' or 'U' to notify of gps.update
- at place of the 'p' either '.' or 'P' to notify of gps.present

on another page or when more than 2 lines available like with oled, it would be possible to add GPS_distanceToHome and GPS_directionToHome - not sure if that is of interest to anyone using GPS but not an OSD?

vpb
Posts: 231
Joined: Mon Jul 23, 2012 4:09 pm

Re: which GPS data do you want to see on LCD/OLED?

Post by vpb »

Max value (I refer on frsky display lcd) is 10 characters including the period.

I dont think we need GPS_distanceToHome, GPS_directionToHome with LCD mounted on the flying machine. But if it can transfer wirelessly to ground (bluetooth), it'll be nice. In that case, I think you can consider show the GPS speed :D

Code: Select all

Datas_GPS_speed_bp = GPS_speed * 0.036;
Datas_GPS_speed_ap = 0;

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: which GPS data do you want to see on LCD/OLED?

Post by Hamburger »

submitted to svn repo as r1290 - test away with your GPS, please (because I can only do compile test).
For both 2line and multiline displays (like oled) it is telemetry page 7.

If automatic display after power up is requested, use something like
#define LCD_TELEMETRY_STEP "710" <- requires user interaction to step to next page
or for automatic stepping through several pages
#define LCD_TELEMETRY_AUTO "71" <- rquires user interaction to start/stop

Sebbi
Posts: 478
Joined: Sun Jul 08, 2012 1:08 am
Location: Germany
Contact:

Re: which GPS data do you want to see on LCD/OLED?

Post by Sebbi »

Just a quick reply. GPS lon and lat are limited to 0-180 degree, so 3 digits perfore the decimal point is enough ;-)

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: which GPS data do you want to see on LCD/OLED?

Post by Hamburger »

Sebbi wrote:Just a quick reply. GPS lon and lat are limited to 0-180 degree, so 3 digits perfore the decimal point is enough ;-)

ok, first thing to change.
And how many digits behind the decimal point would be sane to display? 4 digits would equal a resolution of about 10m?

Sebbi
Posts: 478
Joined: Sun Jul 08, 2012 1:08 am
Location: Germany
Contact:

Re: which GPS data do you want to see on LCD/OLED?

Post by Sebbi »

A change at the fourth digit behind the decimal point equals to around 14 meters on earths surface ... the fifth digit gives 1-meter accuracy. Geocaching coordinates are usually given with 5 to 6-digit accuracy (they use minutes instead of decimals). I think that will be fine for copter-displays as well ;-)

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: which GPS data do you want to see on LCD/OLED?

Post by Hamburger »

We do not have any more lower digits.
Maybe the decimal point currently is at wrong position?

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: which GPS data do you want to see on LCD/OLED?

Post by Hamburger »

comparing with other gps code seems to indicate the lon/lat data should be formatted as 3.5 . done.

Post Reply