GPS sensor

Development & General Chat for the superb openxvario project.

Moderator: rainer

User avatar
Wene001
Posts: 47
Joined: Wed Feb 01, 2012 11:05 pm
Country: -

Re: GPS sensor

Post by Wene001 »

I opened the gps yesterday (antenna is about 20x20mm) desoldered the rf shield and resoldered the antenna. No difference.
In the moment the cheap ublox lays powered up in the garden, while im @ work :-)
Hoping it catches some data and store it...

User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: GPS sensor

Post by kalle123 »

Wene001 wrote: CRIUS CN-06 or GY-GPS6MV2
Both ok. They have a bigger antenna. ....

I am using one with that project here http://www.rc-network.de/forum/showthre ... IY-Projekt

Learned a lot with that GPS logger :)
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GPS sensor

Post by mstrens »

Selecting other GPS, take care that oXs support only Neo6 and Neo7 because it uses the specific Ublox protocol.
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: GPS sensor

Post by nigelsheffield »

Just heads up , I just recieved another ublox7 GPS and wires were different, white and yellow for RX tx lines, and stiffer cheap feeling, also the antenna is smaller but it still got a lock in couple of minutes , I wonder if this is some refurbished item?
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: GPS sensor

Post by kalle123 »

nigelsheffield wrote:I wonder if this is some refurbished item?
Where did you order that module?

nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: GPS sensor

Post by nigelsheffield »

Aliexpress. Seller westerrc
User avatar
Wene001
Posts: 47
Joined: Wed Feb 01, 2012 11:05 pm
Country: -

Re: GPS sensor

Post by Wene001 »

Shame on me, found out that my pro mini doesnt provide 5V on VCC pin on the front side.
Is the VCC pin on the programming pins only useable for programming the arduino?
i`m a arduino noob
The other VCC pin on the arduino gives 5V...

Connected GPS to raw i works....

edit: found out that there is a reverse polarity protction diode on VCC @ the programming header, so this pin is not useable for driving sensors....
Had much to learn :-)
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: GPS sensor

Post by jhsa »

Be careful when connecting things to "Raw" as it is normally battery voltage. If your GPS works with 5V, then better to connect it to VCC?

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Wene001
Posts: 47
Joined: Wed Feb 01, 2012 11:05 pm
Country: -

Re: GPS sensor

Post by Wene001 »

i have bridged the diode
Looks like the genuine Arduino pro mini doesnt have this diode
Now using GPS on VCC,GND,RX at Programming header and Pin6 via 10k resistor.
Looks good now
Bosshawg
Posts: 19
Joined: Mon Apr 28, 2014 12:38 pm
Country: -

GPS Freezes OpenXsensor

Post by Bosshawg »

On a Taranis Plus running OpenTx 2.1.8
Using Arduino 1.6.5-r5 & most recent Master from GitHub.
I have two GY-GPS6MV2 Modules both set to default config in U-center outputting
$GPGSV
$GPGLL
$GPRMC
$GPVTG
$GPGGA
$GPGSA
Strings @ 9600 baudrate,getting Gps Lock(Led Flashing)and location in Google Earth.
Gps Tx to Arduino Rx
Gps Rx to Arduino D6 via 10k Resistor

Have attached my config page and the debug output from the serial monitor.
No matter how long i leave the GPS in clear view of the sky I never get the flashing LED for GPS lock.
All Sensor Fields on the telemetry page12 apart from RxBt,SWR & RSSI are vacant.
The Telemetry screen fields also are empty for all non functioning sensor outputs.If i disconnect the
Gps all comes good and the sensors start outputting again.

Plugging Gps back in All Sensor Fields on the telemetry page12 apart from RxBt,SWR & RSSI appear
inside [SqBrackets].The Telemetry screen displays a flashing black block around all non functioning sensor outputs.Again
if i disconnect the Gps all comes good and the sensors start outputting again.

Also i have LM35 temp sensor which works in a battery charger giving valid temperatures and also in a
arduino sketch but i dont know how to configure it in openxsensor to give accurate readings.
Have connected a RPM (RPR-220) Optical sensor which works fine!,is it possible to have more than one
RPM sensors connected to OpenXsensor?.

Code: Select all

// OpenXsensor https://github.com/openXsensor/
// started by Rainer Schlosshan

//******************************************************************************************************************************************************* //
//                                                                                                                                                        //
// ! IMPORTANT NOTE !!!!!!!!!!   Another file in this project (see oXs_config_description.h) provides detailed explanations on how to set up this file.   //
//                                                                                                                                                        //
//******************************************************************************************************************************************************* //
//  Note: the oXs_config.h file present on the GitHub site is not always meaningful.
//       It could be that the combination of active/non active parameters is not consistent.
//       This is just the result of many updates and tests in this document.
//       So take always care to set up the oXs_config.h file according to your needs and check carefully all options.
//       You can also use the oXs configurator in order to generate automatically a valid file.


#ifndef OXS_CONFIG_h
#define OXS_CONFIG_h


// --------- 1 - Telemetry protocol ---------
#define PROTOCOL  FRSKY_SPORT  // select between FRSKY_SPORT , FRSKY_HUB , FRSKY_SPORT_HUB , MULTIPLEX , HOTT

// --------- 2 - Serial data pin choice ---------
#define PIN_SERIALTX      4    // The pin which transmits the serial data to the telemetry receiver, Usually pin 4

// --------- 3 - PPM settings ---------
//#define PIN_PPM           3       // default is 2 but my own device use 3
#define PPM_MIN_100       980     // default 1500 - 512 ; // pulse width (usec) when TX sends a channel = -100
#define PPM_PLUS_100      1990    // default 1500 + 512 ; // pulse width (usec) when TX sends a channel = +100

// --------- 4 - Vario settings ---------

// ***** 4.1 - Connecting 1 or 2 MS5611 barometric sensor *****
#define VARIO // set as comment if there is no vario
//#define SENSOR_IS_BMP180 // set as comment if baro sensor is MS5611
//#define VARIO2 // set as comment if there is no second vario

// ***** 4.2 - Sensitivity predefined by program *****
#define SENSITIVITY_MIN 50
#define SENSITIVITY_MAX 300
#define SENSITIVITY_MIN_AT 100
#define SENSITIVITY_MAX_AT 1000

// ***** 4.3 - Sensitivity adjusted from the TX *****
#define SENSITIVITY_MIN_AT_PPM 10    // sensitivity will be changed by OXS only when PPM signal is between the specified range enlarged by -5 / +5
#define SENSITIVITY_MAX_AT_PPM 40
#define SENSITIVITY_PPM_MIN  20      // common value for vario is 20
#define SENSITIVITY_PPM_MAX 100      // common value for vario is 100

// ***** 4.4 - Hysteresis parameter & Alt compensation based on sensor temp *****
#define VARIOHYSTERESIS 5
//#define ALT_TEMP_COMPENSATION 800

// ***** 4.5 - Vertical speeds calculations *****
#define VARIO_PRIMARY       FIRST_BARO        // select between FIRST_BARO, SECOND_BARO , AVERAGE_FIRST_SECOND, AIRSPEED_COMPENSATED , BARO_AND_IMU
//#define VARIO_SECONDARY     SECOND_BARO          // select between FIRST_BARO, SECOND_BARO , AVERAGE_FIRST_SECOND, AIRSPEED_COMPENSATED , BARO_AND_IMU
#define SWITCH_VARIO_MIN_AT_PPM 10
#define SWITCH_VARIO_MAX_AT_PPM 90

// ***** 4.6 - Analog vertical speed *****
//#define PIN_ANALOG_VSPEED 3
#define ANALOG_VSPEED_MIN -3
#define ANALOG_VSPEED_MAX  3

// ***** 4.7  - Calculating glider ratio, average sink/climb rate ******************************
//#define GLIDER_RATIO_CALCULATED_AFTER_X_SEC 1  // value must be higher or equal to 1, set line as comment if no calculation must be performed
#define SPEED_TOLERANCE   5              // in % of speed
#define VSPEED_MIN_TOLERANCE -200        // out of tolerance when Vspeed is lower than this value  (cm/sec)
#define VSPEED_MAX_TOLERANCE  -10        // out of tolerance when Vspeed is upper than this value  (cm/sec)

// --------- 5 - Airspeed settings ---------
//#define AIRSPEED    MS4525
#define AIRSPEED_AT_SEA_LEVEL_AND_15C // if this line is commented, airspeed is calculated using baro pressure and temperature (so being "true" airspeed instead of normalised airspeed)      
#define AIRSPEED_IN_KMH  // uncomment this line if airspeed has to be in km/h instead of knot/h (openTx 2.0 expect knot/h while openTx 2.1 expect km/h) 

#define AIRSPEED_RESET_AT_PPM   100

#define COMPENSATION_MIN_AT_PPM 60
#define COMPENSATION_MAX_AT_PPM 90
#define COMPENSATION_PPM_MIN  80
#define COMPENSATION_PPM_MAX 140

// --------- 6 - Voltages & Current sensor settings ---------

// ***** 6.1 - Voltage Reference to measure voltages and current *****
//#define USE_INTERNAL_REFERENCE  // uncomment this line if you use 1.1 volt internal reference instead of Vcc
//#define USE_EXTERNAL_REFERENCE  // uncomment this line if you use an external reference instead of Vcc
#define REFERENCE_VOLTAGE 5060    // set value in milliVolt; if commented, oXs will use or 1100 (if internal ref is used) or 5000 (if internal ref is not used) 

// ***** 6.2 - Voltage parameters *****
#define PIN_VOLTAGE         0    , 1   , 2   , 6  , 7   , 8              // set this line as comment if no one voltage have to be measured, set a value to 8 for the voltage(s) not to be measured.
#define RESISTOR_TO_GROUND  10.02,10.02,10.03, 0  , 0   , 0              // set value to 0 when no divider is used for a voltage, can contains decimals 
#define RESISTOR_TO_VOLTAGE 0.99 ,8.23 ,16.04, 0  , 0   , 0              // set value to 0 when no divider is used for a voltage, can contains decimals 
#define OFFSET_VOLTAGE      0    , 0   , 0   , 0  , 0   , 0              // optionnal, can be negative, must be integer
#define SCALE_VOLTAGE       1    , 1   , 1   , 1  , 1   , 1              // optionnal, can be negative, can have decimals

// ***** 6.3 - Max number of Lipo cells to measure (and transmit to Tx) *****
#define NUMBEROFCELLS 3   // Put this line as comment or set value to 0 (zero) if you do not want to transmit cell voltages.

// ***** 6.4 - Current parameters  *****
#define PIN_CURRENTSENSOR   3
#define MVOLT_AT_ZERO_AMP              2530    // in millivolt
#define MVOLT_PER_AMP                  66      // in milliVolt per Amp
//#define RESISTOR_TO_GROUND_FOR_CURRENT  0    // put as comment or set to 0 if no divider is used
//#define RESISTOR_TO_CURRENT_SENSOR      0    // put as comment or set to 0 if no divider is used

// --------- 7 - RPM (rotations per minute) settings ---------
#define MEASURE_RPM

// --------- 8 - Persistent memory settings ---------
//#define SAVE_TO_EEPROM
//#define PIN_PUSHBUTTON    2   // default is 10 but my own device is 2

// --------- 9 - Data to transmit ---------
#define VSPEED_SOURCE  FIRST_BARO       // select between FIRST_BARO, SECOND_BARO , AVERAGE_FIRST_SECOND, AIRSPEED_COMPENSATED , BARO_AND_IMU or PPM_SELECTION
// ***** 9.1 - Frsky data *****
//#define VFAS_SOURCE   VOLT_1                 // select between VOLT_1, VOLT_2, VOLT_3 , VOLT_4, VOLT_5 , VOLT_6
//#define FUEL_SOURCE   VOLT_1                 // select between VOLT_1, VOLT_2, VOLT_3 , VOLT_4, VOLT_5 , VOLT_6
//#define A3_SOURCE     VOLT_1                 // select between VOLT_1, VOLT_2, VOLT_3 , VOLT_4, VOLT_5 , VOLT_6
//#define A4_SOURCE     VOLT_1                 // select between VOLT_1, VOLT_2, VOLT_3 , VOLT_4, VOLT_5 , VOLT_6
//#define ACCX_SOURCE     PITCH                   //  select between TEST_1, TEST_2, TEST_3, GLIDER_RATIO , SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, PITCH, ROLL , YAW 
//#define ACCY_SOURCE     ROLL                 //  select between TEST_1, TEST_2, TEST_3, GLIDER_RATIO , SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, PITCH, ROLL , YAW
//#define ACCZ_SOURCE     YAW                 //  select between TEST_1, TEST_2, TEST_3, GLIDER_RATIO , SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, PITCH, ROLL , YAW
#define T1_SOURCE       VOLT_4                   //  select between TEST_1, TEST_2, TEST_3 , GLIDER_RATIO , SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , SENSITIVITY, PPM, VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6
#define T2_SOURCE       VOLT_5                      //  select between TEST_1, TEST_2, TEST_3, , GLIDER_RATIO, SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , SENSITIVITY, PPM, VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6

// ***** 9.2 - Hott data *****
//#define BATTERY_1_SOURCE          VOLT_4                 // select between VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6
//#define BATTERY_2_SOURCE          VOLT_2                 // select between VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6
//#define MAIN_BATTERY_SOURCE       VOLT_5                 // select between VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6
//#define TEMPERATURE_1_SOURCE      TEST_1          //  select between TEST_1, TEST_2, TEST_3 , GLIDER_RATIO , SENSITIVITY , PPM
//#define TEMPERATURE_2_SOURCE      PPM             //  select between TEST_1, TEST_2, TEST_3 , GLIDER_RATIO , SENSITIVITY, PPM


// ***** 9.3 - Multiplex data *****
#define SETUP_MULTIPLEX_DATA_TO_SEND    \
                        5 , REL_ALTIMETER , 1 , 1 , 0 , -16384 , 16383 , \
                        7 , ALTIMETER_MAX , 1 , 1 , 0 , -16384 , 16383 , \
                        6 , VERTICAL_SPEED , 1 , 1 , 0, -500 , 500 
                        
                        // 7 , CELL_TOT , 1 , 1 , 0 , -16384 , 16383 , \
                        // 4 , VOLT_4 , 1 , 1 , 0 , -16384 , 16383 , \
                        // 9 , PPM , 1 , 1 , 0 , -16384 , 16383 
                        // 3 , ALTIMETER , 1 , 1 , 0 , -16384 , 16383 , \

// --------- 10 - Sequencer ---------
//#define SEQUENCE_OUTPUTS 0b100000  
#define SEQUENCE_UNIT 100
#define SEQUENCE_m100    1 , 0b100000 , 1 , 0b000000 , 1 , 0b100000 , 1 , 0b000000 
#define SEQUENCE_m75     1 , 0b100000 , 1 , 0b000000 , 2 , 0b100000 , 2 , 0b000000
#define SEQUENCE_m50     5 , 0b100000 , 5 , 0b000000
#define SEQUENCE_m25     5 , 0b100000 , 5 , 0b000000 , 0 , 0b100000
#define SEQUENCE_0       3 , 0b100000 , 1 , 0b000000
#define SEQUENCE_25      2 , 0b100000 , 2 , 0b000000
#define SEQUENCE_50      5 , 0b100000 , 5 , 0b000000
#define SEQUENCE_75      7 , 0b100000 , 7 , 0b000000
#define SEQUENCE_100     8 , 0b100000 , 8 , 0b000000
#define SEQUENCE_LOW    10 , 0b100000 ,10 , 0b000000   // sequence for Low voltage
//#define SEQUENCE_MIN_VOLT_6 4000 // sequence_100 will be activated if voltage 6 is lower that the value.
#define SEQUENCE_MIN_CELL   3000 // sequence_100 will be activated if lowest cell is lower that the value.

// --------- 11 - GPS ------------------------------------------------------------------------------------------------
#define GPS_INSTALLED     // uncomment this line if a GPS is connected
#define GPS_SPEED_IN_KMH  // uncomment this line if GPS speed has to be sent in km/h instead of knot/h (only for Frsky protocol)
//#define GPS_SPEED_3D      // uncomment this line if GPS speed has to be the 3d speed instead of the 2d speed (note: 3d is probably less accurate - to test) 

// --------- 12 - IMU 6050 --- (accelerometer + gyro -----------------------------------------------------------------
//#define USE_6050 // uncomment this line if a IMU 6050 is connected
#define PIN_INT_6050 3   // Interrupt from 6050 has to be connected to Arduino pin 2 or pin 3 (do not use here the same pin as PPM)
#define ACC_OFFSET_X -160 // fill here the first value reported when DISPLAY_ACC_OFFSET is activated (eg. -160)
#define ACC_OFFSET_Y -150 // fill here the second value reported when DISPLAY_ACC_OFFSET is activated (eg. -150)
#define ACC_OFFSET_Z -1100 // fill here the third value reported when DISPLAY_ACC_OFFSET is activated (eg. -1100)
//#define DISPLAY_ACC_OFFSET // used ONLY in order to display the acceleration offset on pc terminal; KEEP AS COMMENT once offsets have been setup 

// --------- xx - Reserved for developer. DEBUG must be activated here when we want to debug one or several functions in some other files. ---------
//#define DEBUG
//#define DEBUG_BLINK   // use by developper in order to blink the led without using uart for debugging


#define BASED_ON_AIRSPEED 0
#define BASED_ON_GPS_SPEED 1
#define AVERAGING_DELAY_MILLISEC  AVERAGING_TOLERANCE * 100  
#if defined( DISPLAY_ACC_OFFSET ) && defined( USE_6050 )
  #define DEBUG
#endif

#define FIRST_BARO 1
#define SECOND_BARO 2
#define AVERAGE_FIRST_SECOND 4
#define AIRSPEED_COMPENSATED 3
#define BARO_AND_IMU 5
#define PPM_SELECTION 6

#include <Arduino.h>
struct ONE_MEASUREMENT {
  uint8_t available ;
  int32_t value ;
} ;

#define FRSKY_SPORT      1
#define FRSKY_HUB        2
#define FRSKY_SPORT_HUB  3
#define MULTIPLEX        4
#define HOTT             5

#define SECONDS_SINCE_T0        32
#define AVERAGE_VSPEED_SINCE_TO 33 



#ifdef DEBUG
//#include "HardwareSerial.h"
#endif

#ifdef GPS_INSTALLED
//#include "HardwareSerial.h"
#endif

#endif// End define OXS_CONFIG_h

Code: Select all

þopenXsensor starting.®openXsensor startingîopenXsensor starting..
úopenXsensor starting..
openXsensor 

starting.openXsensor starting..ýopenXsensor starting®openXsensor startingþopenXsensor 

starting..�openXsensor startinÿopenXsensor startingopenXsensor startingþopenXsensor 

startingÿopenXsensor startinçopenXsensor starting.îopenXsensor starting.þopenXsensor 

startingþopenXsensor starting.openXsensor startinÿopenXsensor startingîopenXsensor 

starting..ÿopenXsensor starting..ÿopenXsensor starting..ýopenXsensor starting.þopenXsensor 

starting.þopenXsensor starting.ÿopenXsensor startinçopenXsensor startinçopenXsensor 

startinÿopenXsensor startinÿopenXsensor startingîopenXsensor startiopenXsensor starting.þopenXsensor 

startiîopenXsensor startingþopenXsensor startingopenXsensor starting.îopenXsensor startingþopenXsensor 

staþopenXsensor starting.ÿopenXsensor startiopenXsensor startiîopenXsensor starting.þopenXsensor 

staopenXsensor startingÿopenXsensor startinÿopenXsensor startiîopenXsensor starüopenXsensor 

startingopenXsensor startingÿopenXsensor startinopenXsensor startingÿopenXsensor starting.openXsensor 

startiopenXsensor startingþopenXsensor startiþopenXsensor startiîopenXsensor startiþopenXsensor 

startéopenXsensor startùopenXsensor startingîopenXsensor startingþopenXsensor stñopenXsensor 

startingþopenXsensor starôopenXsensor startéopenXsensor startiÿopenXsensor startiÿopenXsensor 

startinçopenXsensor startéopenXsensor startinopenXsensor startingþopenXsensor startinÿopenXsensor 

startÿopenXsensor startùopenXsensor startinÿopenXsensor startingopenXsensor startinçopenXsensor 

sôopenXsensor startinÿopenXsensor startiþopenXsensor stáopenXsensor startiopenXsensor 

startùopenXsensor startinçopenXsensor startùopenXsensor startùopenXsensor startingopenXsensor 

startingþopenXsensor startinÿopenXsensor starþopenXsensor startiîopenXsensor staòopenXsensor 

starôopenXsensor startéopenXsensor startingþopenXsensor startéopenXsensor startÿopenXsensor 

startingþopenXsensor stýopenXsensor startinÿopenXsensor startinopenXsensor startinçopenXsensor 

stÿopenXsensor staopenXsensor staropenXsensor starôopenXsensor staòopenXsensor sôopenXsensor 

startiîopenXsensor startinÿopenXsensor startinopenXsensor startinÿopenXsensor starüopenXsensor 

süopenXsensor stÿopenXsensor sôopenXsensor starüopenXsensor startÿopenXsensor staòopenXsensor 

staropenXsensor staþopenXsensor startiþopenXsensor starôopenXsensor stopenXsensor startinçopenXsensor 

stáopenXsensor startopenXsensor startéopenXsensor staòopenXsensor süopenXsensor sôopenXsensor 

stopenXsensor stÿopenXsensor startinçopenXsensor sopenXsensor staropenXsensor sôopenXsensor 

stýopenXsensor staòopenXsensor starôopenXsensor sopenXsensor stopenXsensor stñopenXsensor 

sôopenXsensor sopenXsensor süopenXsensor starôopenXsensor stáopenXsensor sopenXsensor staopenXsensor 

starôopenXsensor startinÿopenXsensor starþopenXsensor startopenXsensor startinçopenXsensor 

óopenXsensor startinÿopenXsensor staòopenXsensor startiþopenXsensor süopenXsensor sôopenXsensor 

sopenXsensor óopenXsensor startopenXsensor stopenXsensor starþopenXsensor süopenXsensor 

starüopenXsensor startýopenXsensor stáopenXsensor starÿopenXsensor óopenXsensor ÿopenXsensor 

starüopenXsensor staòopenXsensor startÿopenXsensor staÿopenXsensor staòopenXsensor staòopenXsensor 

óopenXsensor óopenXsensor sôopenXsensor óopenXsensor ÿopenXsensor stùopenXsensor staòopenXsensor 

staòopenXsensor starôopenXsensor ÿopenXsensor sopenXsensor óopenXsensor stáopenXsensor sopenXsensor 

starôopenXsensor startiopenXsensor sopenXsensor starting..{Unplug Gps Here}
 milli=0
freeRam=586
Enter setup voltage
Reference voltage:5060
Voltage:1 , pin=0 , offset=0  , mVoltPerStep=5.43
Voltage:2 , pin=1 , offset=0  , mVoltPerStep=9.01
Voltage:3 , pin=2 , offset=0  , mVoltPerStep=12.86
Voltage:4 , pin=6 , offset=0  , mVoltPerStep=4.95
Voltage:5 , pin=7 , offset=0  , mVoltPerStep=4.95
Voltage:6 , pin=8 , offset=0  , mVoltPerStep=4.95
vario setting up..
vario is up..
Current sensor on pin:3
Reference voltage:5060
Offset for current:511.50
mAmp per step:74.94
 milli=2105
End of GPS setup
FRSky Output Module: TX Pin=4
Sport protocol= 1
End of general set up
Thanks 4 all Replys :oops:
A common mistake people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools!... Douglas Adams: "Mostly Harmless"
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GPS sensor

Post by mstrens »

Your config seems OK (even if there are perhaps some parameters activated that are not used - some Pin Voltage, number of cells, pin_Currentsensor)

It looks like the arduino continously restarts when GPS is plugged in.
Perhaps that vcc voltage on arduino drops down when GPS is connected.
How did you connected GPS Vcc. If you connected GPS Vcc to Arduino Vcc it means that GPS is powered via the Arduino Voltage regulator.
It could be that the Arduino Voltage regulator is not able to provide enough current for both (Arduino + GPS) devices.
If you have a voltmeter can you measure the Arduino Vcc voltage and check if it remains on 5 volt when GPS is connected.

If the voltage that you apply on Aruino Raw pin does not exceed the max input voltage of GPS you could power up the GPS using the "raw" voltage (provided by receiver/battery) instead of the Arduino Vcc.
Bosshawg
Posts: 19
Joined: Mon Apr 28, 2014 12:38 pm
Country: -

Re:GPS Freezes OpenXsensor{Solved}

Post by Bosshawg »

mstrens wrote: If you connected GPS Vcc to Arduino Vcc it means that GPS is powered via the Arduino Voltage regulator.
It could be that the Arduino Voltage regulator is not able to provide enough current for both (Arduino + GPS) devices.
If the voltage that you apply on Aruino Raw pin does not exceed the max input voltage of GPS you could power up the GPS using the "raw" voltage (provided by receiver/battery) instead of the Arduino Vcc.
Thanks Mstens, :D
Supplying Gps Vcc & Gnd from Rx did the trick!..Neglected to say in previous post that i have a Current Sensor & voltage dividers for 3cell monitoring & RPM sensor which all work.The LM35 temp gauge is still wrong any ideas on that?...Also is there a limit on the number of RPM sensors that OpenXsensor can handle?.

Changed telemetry protocol to FRSKY_SPORT_HUB and tested with X8R & D8R-II plus both work perfectly.
{Only mentioned as i got a compilation error in Arduino 1.6.4 if i enabled the RPM option with FRSKY_SPORT_HUB protocol selected}.

Code: Select all

// OpenXsensor https://github.com/openXsensor/
// started by Rainer Schlosshan

//******************************************************************************************************************************************************* //
//                                                                                                                                                        //
// ! IMPORTANT NOTE !!!!!!!!!!   Another file in this project (see oXs_config_description.h) provides detailed explanations on how to set up this file.   //
//                                                                                                                                                        //
//******************************************************************************************************************************************************* //
//  Note: the oXs_config.h file present on the GitHub site is not always meaningful.
//       It could be that the combination of active/non active parameters is not consistent.
//       This is just the result of many updates and tests in this document.
//       So take always care to set up the oXs_config.h file according to your needs and check carefully all options.
//       You can also use the oXs configurator in order to generate automatically a valid file.


#ifndef OXS_CONFIG_h
#define OXS_CONFIG_h


// --------- 1 - Telemetry protocol ---------
#define PROTOCOL  FRSKY_SPORT_HUB  // select between FRSKY_SPORT , FRSKY_HUB , FRSKY_SPORT_HUB , MULTIPLEX , HOTT

// --------- 2 - Serial data pin choice ---------
#define PIN_SERIALTX      4    // The pin which transmits the serial data to the telemetry receiver, Usually pin 4

// --------- 3 - PPM settings ---------
//#define PIN_PPM           3       // default is 2 but my own device use 3
#define PPM_MIN_100       980     // default 1500 - 512 ; // pulse width (usec) when TX sends a channel = -100
#define PPM_PLUS_100      1990    // default 1500 + 512 ; // pulse width (usec) when TX sends a channel = +100

// --------- 4 - Vario settings ---------

// ***** 4.1 - Connecting 1 or 2 MS5611 barometric sensor *****
#define VARIO // set as comment if there is no vario
//#define SENSOR_IS_BMP180 // set as comment if baro sensor is MS5611
//#define VARIO2 // set as comment if there is no second vario

// ***** 4.2 - Sensitivity predefined by program *****
#define SENSITIVITY_MIN 50
#define SENSITIVITY_MAX 300
#define SENSITIVITY_MIN_AT 100
#define SENSITIVITY_MAX_AT 1000

// ***** 4.3 - Sensitivity adjusted from the TX *****
#define SENSITIVITY_MIN_AT_PPM 10    // sensitivity will be changed by OXS only when PPM signal is between the specified range enlarged by -5 / +5
#define SENSITIVITY_MAX_AT_PPM 40
#define SENSITIVITY_PPM_MIN  20      // common value for vario is 20
#define SENSITIVITY_PPM_MAX 100      // common value for vario is 100

// ***** 4.4 - Hysteresis parameter & Alt compensation based on sensor temp *****
#define VARIOHYSTERESIS 5
//#define ALT_TEMP_COMPENSATION 800

// ***** 4.5 - Vertical speeds calculations *****
#define VARIO_PRIMARY       FIRST_BARO        // select between FIRST_BARO, SECOND_BARO , AVERAGE_FIRST_SECOND, AIRSPEED_COMPENSATED , BARO_AND_IMU
//#define VARIO_SECONDARY     SECOND_BARO          // select between FIRST_BARO, SECOND_BARO , AVERAGE_FIRST_SECOND, AIRSPEED_COMPENSATED , BARO_AND_IMU
#define SWITCH_VARIO_MIN_AT_PPM 10
#define SWITCH_VARIO_MAX_AT_PPM 90

// ***** 4.6 - Analog vertical speed *****
//#define PIN_ANALOG_VSPEED 3
#define ANALOG_VSPEED_MIN -3
#define ANALOG_VSPEED_MAX  3

// ***** 4.7  - Calculating glider ratio, average sink/climb rate ******************************
//#define GLIDER_RATIO_CALCULATED_AFTER_X_SEC 1  // value must be higher or equal to 1, set line as comment if no calculation must be performed
#define SPEED_TOLERANCE   5              // in % of speed
#define VSPEED_MIN_TOLERANCE -200        // out of tolerance when Vspeed is lower than this value  (cm/sec)
#define VSPEED_MAX_TOLERANCE  -10        // out of tolerance when Vspeed is upper than this value  (cm/sec)

// --------- 5 - Airspeed settings ---------
//#define AIRSPEED    MS4525
#define AIRSPEED_AT_SEA_LEVEL_AND_15C // if this line is commented, airspeed is calculated using baro pressure and temperature (so being "true" airspeed instead of normalised airspeed)      
#define AIRSPEED_IN_KMH  // uncomment this line if airspeed has to be in km/h instead of knot/h (openTx 2.0 expect knot/h while openTx 2.1 expect km/h) 

#define AIRSPEED_RESET_AT_PPM   100

#define COMPENSATION_MIN_AT_PPM 60
#define COMPENSATION_MAX_AT_PPM 90
#define COMPENSATION_PPM_MIN  80
#define COMPENSATION_PPM_MAX 140

// --------- 6 - Voltages & Current sensor settings ---------

// ***** 6.1 - Voltage Reference to measure voltages and current *****
//#define USE_INTERNAL_REFERENCE  // uncomment this line if you use 1.1 volt internal reference instead of Vcc
//#define USE_EXTERNAL_REFERENCE  // uncomment this line if you use an external reference instead of Vcc
#define REFERENCE_VOLTAGE 5060    // set value in milliVolt; if commented, oXs will use or 1100 (if internal ref is used) or 5000 (if internal ref is not used) 

// ***** 6.2 - Voltage parameters *****
#define PIN_VOLTAGE         0    , 1   , 2   , 6  , 7   , 8              // set this line as comment if no one voltage have to be measured, set a value to 8 for the voltage(s) not to be measured.
#define RESISTOR_TO_GROUND  10.02,10.02,10.03, 0  , 0   , 0              // set value to 0 when no divider is used for a voltage, can contains decimals 
#define RESISTOR_TO_VOLTAGE 0.99 ,8.23 ,16.04, 0  , 0   , 0              // set value to 0 when no divider is used for a voltage, can contains decimals 
#define OFFSET_VOLTAGE      0    , 0   , 0   , 0  , 0   , 0              // optionnal, can be negative, must be integer
#define SCALE_VOLTAGE       1    , 1   , 1   , 1  , 1   , 1              // optionnal, can be negative, can have decimals

// ***** 6.3 - Max number of Lipo cells to measure (and transmit to Tx) *****
#define NUMBEROFCELLS 3   // Put this line as comment or set value to 0 (zero) if you do not want to transmit cell voltages.

// ***** 6.4 - Current parameters  *****
#define PIN_CURRENTSENSOR   3
#define MVOLT_AT_ZERO_AMP              2530    // in millivolt
#define MVOLT_PER_AMP                  66      // in milliVolt per Amp
//#define RESISTOR_TO_GROUND_FOR_CURRENT  0    // put as comment or set to 0 if no divider is used
//#define RESISTOR_TO_CURRENT_SENSOR      0    // put as comment or set to 0 if no divider is used

// --------- 7 - RPM (rotations per minute) settings ---------
#define MEASURE_RPM

// --------- 8 - Persistent memory settings ---------
//#define SAVE_TO_EEPROM
//#define PIN_PUSHBUTTON    2   // default is 10 but my own device is 2

// --------- 9 - Data to transmit ---------
#define VSPEED_SOURCE  FIRST_BARO       // select between FIRST_BARO, SECOND_BARO , AVERAGE_FIRST_SECOND, AIRSPEED_COMPENSATED , BARO_AND_IMU or PPM_SELECTION
// ***** 9.1 - Frsky data *****
//#define VFAS_SOURCE   VOLT_1                 // select between VOLT_1, VOLT_2, VOLT_3 , VOLT_4, VOLT_5 , VOLT_6
//#define FUEL_SOURCE   VOLT_1                 // select between VOLT_1, VOLT_2, VOLT_3 , VOLT_4, VOLT_5 , VOLT_6
//#define A3_SOURCE     VOLT_1                 // select between VOLT_1, VOLT_2, VOLT_3 , VOLT_4, VOLT_5 , VOLT_6
//#define A4_SOURCE     VOLT_1                 // select between VOLT_1, VOLT_2, VOLT_3 , VOLT_4, VOLT_5 , VOLT_6
//#define ACCX_SOURCE     PITCH                   //  select between TEST_1, TEST_2, TEST_3, GLIDER_RATIO , SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, PITCH, ROLL , YAW 
//#define ACCY_SOURCE     ROLL                 //  select between TEST_1, TEST_2, TEST_3, GLIDER_RATIO , SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, PITCH, ROLL , YAW
//#define ACCZ_SOURCE     YAW                 //  select between TEST_1, TEST_2, TEST_3, GLIDER_RATIO , SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, PITCH, ROLL , YAW
#define T1_SOURCE       VOLT_4                   //  select between TEST_1, TEST_2, TEST_3 , GLIDER_RATIO , SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , SENSITIVITY, PPM, VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6
//#define T2_SOURCE       VOLT_5                      //  select between TEST_1, TEST_2, TEST_3, , GLIDER_RATIO, SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , SENSITIVITY, PPM, VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6

// ***** 9.2 - Hott data *****
//#define BATTERY_1_SOURCE          VOLT_4                 // select between VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6
//#define BATTERY_2_SOURCE          VOLT_2                 // select between VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6
//#define MAIN_BATTERY_SOURCE       VOLT_5                 // select between VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6
//#define TEMPERATURE_1_SOURCE      TEST_1          //  select between TEST_1, TEST_2, TEST_3 , GLIDER_RATIO , SENSITIVITY , PPM
//#define TEMPERATURE_2_SOURCE      PPM             //  select between TEST_1, TEST_2, TEST_3 , GLIDER_RATIO , SENSITIVITY, PPM


// ***** 9.3 - Multiplex data *****
#define SETUP_MULTIPLEX_DATA_TO_SEND    \
                        5 , REL_ALTIMETER , 1 , 1 , 0 , -16384 , 16383 , \
                        7 , ALTIMETER_MAX , 1 , 1 , 0 , -16384 , 16383 , \
                        6 , VERTICAL_SPEED , 1 , 1 , 0, -500 , 500 
                        
                        // 7 , CELL_TOT , 1 , 1 , 0 , -16384 , 16383 , \
                        // 4 , VOLT_4 , 1 , 1 , 0 , -16384 , 16383 , \
                        // 9 , PPM , 1 , 1 , 0 , -16384 , 16383 
                        // 3 , ALTIMETER , 1 , 1 , 0 , -16384 , 16383 , \

// --------- 10 - Sequencer ---------
//#define SEQUENCE_OUTPUTS 0b100000  
#define SEQUENCE_UNIT 100
#define SEQUENCE_m100    1 , 0b100000 , 1 , 0b000000 , 1 , 0b100000 , 1 , 0b000000 
#define SEQUENCE_m75     1 , 0b100000 , 1 , 0b000000 , 2 , 0b100000 , 2 , 0b000000
#define SEQUENCE_m50     5 , 0b100000 , 5 , 0b000000
#define SEQUENCE_m25     5 , 0b100000 , 5 , 0b000000 , 0 , 0b100000
#define SEQUENCE_0       3 , 0b100000 , 1 , 0b000000
#define SEQUENCE_25      2 , 0b100000 , 2 , 0b000000
#define SEQUENCE_50      5 , 0b100000 , 5 , 0b000000
#define SEQUENCE_75      7 , 0b100000 , 7 , 0b000000
#define SEQUENCE_100     8 , 0b100000 , 8 , 0b000000
#define SEQUENCE_LOW    10 , 0b100000 ,10 , 0b000000   // sequence for Low voltage
//#define SEQUENCE_MIN_VOLT_6 4000 // sequence_100 will be activated if voltage 6 is lower that the value.
#define SEQUENCE_MIN_CELL   3000 // sequence_100 will be activated if lowest cell is lower that the value.

// --------- 11 - GPS ------------------------------------------------------------------------------------------------
#define GPS_INSTALLED     // uncomment this line if a GPS is connected
//#define GPS_SPEED_IN_KMH  // uncomment this line if GPS speed has to be sent in km/h instead of knot/h (only for Frsky protocol)
//#define GPS_SPEED_3D      // uncomment this line if GPS speed has to be the 3d speed instead of the 2d speed (note: 3d is probably less accurate - to test) 

// --------- 12 - IMU 6050 --- (accelerometer + gyro -----------------------------------------------------------------
//#define USE_6050 // uncomment this line if a IMU 6050 is connected
#define PIN_INT_6050 3   // Interrupt from 6050 has to be connected to Arduino pin 2 or pin 3 (do not use here the same pin as PPM)
#define ACC_OFFSET_X -160 // fill here the first value reported when DISPLAY_ACC_OFFSET is activated (eg. -160)
#define ACC_OFFSET_Y -150 // fill here the second value reported when DISPLAY_ACC_OFFSET is activated (eg. -150)
#define ACC_OFFSET_Z -1100 // fill here the third value reported when DISPLAY_ACC_OFFSET is activated (eg. -1100)
//#define DISPLAY_ACC_OFFSET // used ONLY in order to display the acceleration offset on pc terminal; KEEP AS COMMENT once offsets have been setup 

// --------- xx - Reserved for developer. DEBUG must be activated here when we want to debug one or several functions in some other files. ---------
//#define DEBUG
//#define DEBUG_BLINK   // use by developper in order to blink the led without using uart for debugging


#define BASED_ON_AIRSPEED 0
#define BASED_ON_GPS_SPEED 1
#define AVERAGING_DELAY_MILLISEC  AVERAGING_TOLERANCE * 100  
#if defined( DISPLAY_ACC_OFFSET ) && defined( USE_6050 )
  #define DEBUG
#endif

#define FIRST_BARO 1
#define SECOND_BARO 2
#define AVERAGE_FIRST_SECOND 4
#define AIRSPEED_COMPENSATED 3
#define BARO_AND_IMU 5
#define PPM_SELECTION 6

#include <Arduino.h>
struct ONE_MEASUREMENT {
  uint8_t available ;
  int32_t value ;
} ;

#define FRSKY_SPORT      1
#define FRSKY_HUB        2
#define FRSKY_SPORT_HUB  3
#define MULTIPLEX        4
#define HOTT             5

#define SECONDS_SINCE_T0        32
#define AVERAGE_VSPEED_SINCE_TO 33 



#ifdef DEBUG
//#include "HardwareSerial.h"
#endif

#ifdef GPS_INSTALLED
//#include "HardwareSerial.h"
#endif

#endif// End define OXS_CONFIG_h

mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GPS sensor

Post by mstrens »

Fine that GPS works.

About LM35: this IC deliver a voltage that is proportional to the temperature.
I presume that you connected the LM35 output to the Arduino pin A6 (based on your set up).
Did you check with a voltmeter if you really have a voltage on pin A6? Does this voltage change when temperature of LM35 changes?
If not you have an issue with your LM35.

If you have a voltage, than you should get as Temp1 a value equal to the voltage on A6 / 5 * 1023 (because a voltage of 5 volt would give 1023 in Arduino ADC)
If this is not the case it means that there would be a bug in oXs. Let me know.
Please note that in order to convert the Arduino ADC value in meaningful Temperature, you have to set up the parameters OFFSET_VOLTAGE and SCALE_VOLTAGE. I hope that documentation is clear enough about this. If not let me know..

Could you try to compile with Arduino IDE 1.6.5.
I use this version and do not get a compilation error.
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: GPS sensor

Post by kalle123 »

Just assembled a oXs ver. 7.0 Multiplex GPS.

Works fine, but it seems, there is a small issue ...
Bildschirmfoto5.jpeg
Bildschirmfoto6.jpeg
Bildschirmfoto7.jpeg
The sensor is here on the window sill, so this 0.7 km seems a little strange. :mrgreen:

Opened a new issue in git hub.

Here the MPX data part from xOs_config.h

// ***** 9.3 - Multiplex data *****
#define SETUP_MULTIPLEX_DATA_TO_SEND \
4 , GPS_COURSE , 1 , 1 , 0 , -16384 , 16383 , \
5 , GPS_SPEED , 1 , 1 , 0 , -16384 , 16383 , \
6 , GPS_ALTITUDE , 1 , 1 , 0 , -16384 , 16383 , \
7 , GPS_DISTANCE , 1 , 1 , 0 , -16384 , 16383 , \
8 , GPS_BEARING , 1 , 1 , 0 , -16384 , 16383

br and keep on the excellent work.

KH
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: GPS sensor

Post by Carbo »

Maybe it is getting a better fix. In the beginning, when only a few sats are received, the GPS seems to move. Just reset after a few minutes and the effect is gone (hopefully).
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: GPS sensor

Post by kalle123 »

Carbo, don't think so. I guess, it is a little bug. Just mixing the unit (m <> km), when transmitting.

Let us see, what mstrens says ...
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: GPS sensor

Post by kalle123 »

Maybe those 0.7 km are ok. But than the mistake could be in oXs_config_description.h

* GPS_DISTANCE 0.1 m Distance from home

Maybe it should read

* GPS_DISTANCE 0.1 km Distance from home

instead ??
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GPS sensor

Post by mstrens »

I had a look at oXs code.
It seems to me that the GPS distance is calculated in meter.
oXs_config_description.h said it is 0.1 m but I do not think so.

Please note that the distance is calculated taking into account the first longitude and latitude given by the GPS.
Could it be that the first values (longitude and latitude) returned by the GPS are not accurate and that I have to add a delay in the program.

Perhaps can you make a test.
Start oXs and Tx. Do not move oXs and wait for a first longitude and latitude to be displayed on TX screen.
Do not move oXs for 1 or 2 minutes and look at the distance. Does it change or remain 0?
If then you move oXs 100 or 200 m away, which distance is displayed?
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: GPS sensor

Post by kalle123 »

Thank you for having your advice!
mstrens wrote: Start oXs and Tx. Do not move oXs and wait for a first longitude and latitude to be displayed on TX screen.
... but this is on MPX M-Link, so I have those on display, not LONG and LAT

// ***** 9.3 - Multiplex data *****
#define SETUP_MULTIPLEX_DATA_TO_SEND \
4 , GPS_COURSE , 1 , 1 , 0 , -16384 , 16383 , \
5 , GPS_SPEED , 1 , 1 , 0 , -16384 , 16383 , \
6 , GPS_ALTITUDE , 1 , 1 , 0 , -16384 , 16383 , \
7 , GPS_DISTANCE , 1 , 1 , 0 , -16384 , 16383 , \
8 , GPS_BEARING , 1 , 1 , 0 , -16384 , 16383

Please rethink.

br KH
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GPS sensor

Post by mstrens »

Sorry,
I forgot that longitude and latitude are not available in Multiplex telemetry.

In this case I suggest to look only at the distance from home.
Does this value change when GPS got a fix (led on GPS becomes blinking) while oXs does not move?
After 1 or 2 min, if oXs moves 100 or 200 m away, which distance do you get?
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: GPS sensor

Post by kalle123 »

OK. It is getting dark now. Will give it a try tomorrow and come back.

br KH
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GPS sensor

Post by mstrens »

I have found an inconsistency in oXs.
As said before, the distance transmitted by oXs is in meter.
But when I send it, oXs associates it with a unit that is 0.1 km.

So when you see 0.7 km on your display, it is in fact 7m.

I can solve this in 2 ways.
Multiplex protocol allows only 2 units : m and 0.1km

I propose to keep the value in m because it is more accurate.
So in order to display the rigth information ( 7m instead of 0,7km) you have to make a minor change in file oXs_out_multiplex.h
In line 54, change "MU_DIST" by "MU_ALT"
So replace
MU_VOLT , MU_CURR , MU_MAH , MU_DIR , MU_ASPD , MU_ALT , MU_RPM , MU_DIST , MU_DIR , MU_LEVEL ,\
with
MU_VOLT , MU_CURR , MU_MAH , MU_DIR , MU_ASPD , MU_ALT , MU_RPM , MU_ALT , MU_DIR , MU_LEVEL ,\
I will change it in the next version of oXs
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: GPS sensor

Post by kalle123 »

You make my day :D

Was thinking, how to do the test proposed by you. I am alone this week, wife is visiting friends :mrgreen:
Place MPX Pro on desk, put a webcam to record display. Walk around with Arduino uno, MPX receiver, GPS and battery ...

(By the way, this is my gps selection here. You mentioned the status led. Those two on the left CRIUS CN-06 have a power, but no status led. So, not all gps modules have a status led ...)
Bildschirmfoto14.jpeg
Please allow one more my question.

I have those values on display (pics in previous post)

// ***** 9.3 - Multiplex data *****
#define SETUP_MULTIPLEX_DATA_TO_SEND \
4 , GPS_COURSE , 1 , 1 , 0 , -16384 , 16383 , \
5 , GPS_SPEED , 1 , 1 , 0 , -16384 , 16383 , \
6 , GPS_ALTITUDE , 1 , 1 , 0 , -16384 , 16383 , \
7 , GPS_DISTANCE , 1 , 1 , 0 , -16384 , 16383 , \
8 , GPS_BEARING , 1 , 1 , 0 , -16384 , 16383

with those two lines uncommented
#define GPS_SPEED_IN_KMH
#define GPS_SPEED_3D

Took that pic from the MPX GPS manual
Bildschirmfoto15.jpeg
Here is (are) the question(s)

GPS_COURSE is Heading in pic. Please confirm.
GPS_SPEED is 3_D and in km/h
GPS_ALTITUDE is clear.
GPS_DISTANCE - MPX manual (attached) mentions a 2D and a 3D spatial distance. Distance between pilot and aircraft.
WHAT is GPS_DISTANCE here?? Is that SPATIAL DISTANCE, as MPX calls it?
GPS_BEARING - MPX azimuth?? Please confirm.

br KH
Attachments
85417-bedienungsanleitung-gps-v2-sensor--de-en-fr-it-es-1.pdf
(675.81 KiB) Downloaded 245 times
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: GPS sensor

Post by kalle123 »

Did as proposed.

Looks much better now
Attachments
Bildschirmfoto16.jpeg
Bildschirmfoto16.jpeg (14.12 KiB) Viewed 19986 times
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GPS sensor

Post by mstrens »

Course is Heading in the pic; it is provided by the GPS it self.
GPS_Speed is 2D or 3D depending on your config; it is provided by the GPS it self.
GPS_DISTANCE is calculated by oXS (based on long and lat); it is 2D because it does not take care of Altitude
GPS_Bearing is Azimuth in the pic; it is calculated by oXs (based on long and lat)
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: GPS sensor

Post by kalle123 »

mstrens. Thank you!!!!!!
RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: GPS sensor

Post by RightRudder »

Any chance we could get support for the ublox NEO-M8P GPS with openXsensor? I have been looking at the data sheet and this one has a RTK engine onboard! It also supports high baud rates or can go on the I2C interface. Expensive today, but in time the price will drop. I would like to put a pair of these on the SPORT, one at the transmitter and one in the model and use the telemetry link to let them stream the RTCM data over the telemetry link. Will it work? Some data sheets are attached.
Attachments
NEO-M8P_HardwareIntegrationManual_(UBX-15028081).pdf
(1.02 MiB) Downloaded 323 times
NEO-M8P_DataSheet_(UBX-15016656).pdf
(1.27 MiB) Downloaded 358 times
u-blox8-M8_ReceiverDescrProtSpec_(UBX-13003221)_Public.pdf
(7.14 MiB) Downloaded 275 times
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: GPS sensor

Post by kalle123 »

RightRudder wrote:Expensive today, but in time the price will drop.
Searched for those GPS modules and saw some prices ... :roll:

Think, we are not in a hurry.
RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: GPS sensor

Post by RightRudder »

When you consider that differential GPS used to cost $10k each, a development board for $250 is already cheap! But I expect these will be $10 GPS in a couple of years, if not sooner. Even at today's price it has applications that can easily justify the cost.
RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: GPS sensor

Post by RightRudder »

Actually I got a little excited when I heard about this tech, but now that I have read a little deeper and seen the reports of early adopters of this receiver it seems the claims made by the folks at ublox about cm level accuracy are a little optimistic. Under ideal sky conditions and with very good (read large and expensive) antennas deployed in an optimal configuration maybe, but in real world conditions and average antennas we are not really there yet. Add an application such as a fast moving aircraft where the antenna is a compromise and the orientation of the antenna is not ideal and is constantly changing and it gets much worse.

Post Reply

Return to “OpenXVario - an open source vario supported by the open source firmwares!!”