larus-breeze / sw_sensor

Firmware for Larus sensor MK1 and MK2
3 stars 4 forks source link

output AHRS and other Serial Data for XCSOAR #17

Closed MaxBaex closed 1 year ago

MaxBaex commented 3 years ago
MaxBaex commented 3 years ago

https://github.com/jukart/XCSoar/blob/master/src/Device/Driver/LevilAHRS_G.cppforum.pilotaware.com/index.php?topic=659.0

// $RPYL,Roll,Pitch,MagnHeading,SideSlip,YawRate,G,errorcode, // $APENV1,IAS,Altitude,0,0,0,VerticalSpeed,

$RPYL, Roll, Pitch, Yaw (Magnetic heading), Inclination, Yaw Rate (turn coordinator), G force, $RPYL,82,69,2021,83,14,1013,0,

$APENV1, Airspeed, Altitude, 0,0,0,Vertical Speed $APENV1,124,179,0,0,0,500,

TestDriver.cpp  // All angles in tenth of degrees   ok1(device->ParseNMEA("$RPYL,127,729,3215,99,88,1376,0,", nmea_info));   ok1(nmea_info.attitude.bank_angle_available);   ok1(equals(nmea_info.attitude.bank_angle, 12.7));   ok1(nmea_info.attitude.pitch_angle_available);   ok1(equals(nmea_info.attitude.pitch_angle, 72.9));   ok1(nmea_info.attitude.heading_available);   ok1(equals(nmea_info.attitude.heading, 321.5));   ok1(nmea_info.acceleration.available);   ok1(nmea_info.acceleration.real);   ok1(equals(nmea_info.acceleration.g_load, 1.376));

  // speed in kn, alt in ft, vs in ft/min   ok1(device->ParseNMEA("$APENV1,94,1500,0,0,0,0,", nmea_info));   ok1(nmea_info.airspeed_available);   ok1(equals(nmea_info.indicated_airspeed, 48.357777777));   ok1(nmea_info.pressure_altitude_available);   ok1(equals(nmea_info.pressure_altitude, 457.2));   // vertical speed not implemented

MaxBaex commented 3 years ago

ok1(device->ParseNMEA("$PLXVF,,1.00,0.87,-0.12,-0.25,90.2,244.3,*64", basic)); ok1(basic.netto_vario_available); ok1(equals(basic.netto_vario, -0.25)); ok1(basic.airspeed_available); ok1(equals(basic.indicated_airspeed, 90.2)); ok1(basic.pressure_altitude_available); ok1(equals(basic.pressure_altitude, 244.3));

ok1(lx_device.IsV7()); lx_device.ResetDeviceDetection();

ok1(device->ParseNMEA("$PLXVS,23.1,0,12.3,*71", basic)); ok1(basic.temperature_available); ok1(equals(basic.temperature.ToKelvin(), 296.25)); ok1(basic.switch_state.flight_mode == SwitchState::FlightMode::CIRCLING); ok1(basic.voltage_available); ok1(equals(basic.voltage, 12.3));

MaxBaex commented 3 years ago
MaxBaex commented 3 years ago

https://freevario.de/freevario-kommunikations-interface/

MaxBaex commented 3 years ago

Test and understand if different dialects can be understood by XCSOAR via one bluetooth interface.

MaxBaex commented 2 years ago

Yes this works. LeviAHRS shall be added to the NMEA output data.

realtimepeople commented 1 year ago

The NMEA output has been reworked.

-> DONE