New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hdg value only sent whilst 3d GPS fix #59
Comments
Hi Paul, as I remember currently we will not sent new GPS Data if ap_fixtype is lower than 3.
But in FrSkySPortTelemetry.ino (lines you posted) no new data will be sent when ap_fixtype < 3 I think cause of resending "old"/ last know position where ap_fixtype>=3 this is not needed anymore. I currently cannot test it, cause I have no working copter. |
Jochen, I will do some testing tomorrow to find out. The weather here is not kind to flying, but I believe it is to improve this week so hopefully I can find time and conditions to go outside!! Thanks again, Paul |
Hey Jochen, I will merge the change shortly. The teensy code changes will include also the new Airspeed ("ASpd") sensor and the updated plane217.lua file containing the Airspeed and the reformatted power panel - I have NOT made these changes in the copter217.lua yet and will only do this in the future if @wolkstein is OK with this change. Haven't managed to speak to him yet about this. Cheers, Paul |
The changes are now merged. Will advise the OP that this has happened and shortly close this issue. |
Issue resolved |
Even though the Hdg sensor is sourced from the HUD mag data (which is constantly available), because this is sent to smart-port inside the GPS sensor, this is only sent when there is a 3d fix. This is set by the code (in FrSkySPortTelemetry.ino - from line 389):
void FrSkySportTelemetry_GPS() { if(ap_fixtype>=3) { gps.setData(ap_latitude / 1E7, ap_longitude / 1E7, // Latitude and longitude in degrees decimal (positive for N/E, negative for S/W) ap_gps_altitude / 10.0, // Altitude (AMSL, NOT WGS84), in meters * 1000 (positive for up). Note that virtually all GPS modules provide the AMSL altitude in addition to the WGS84 altitude. ap_gps_speed * 10.0,// / 100.0, // GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX ap_heading , // Heading, in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX ap_gps_hdop);
The suggestion is to send the GPS data even when there is no 3d fix, but always include the ap_heading value as this will always be available.
My original thought was that if ap_fixtype<3 then we would want to do the gps.setData but just including the ap_heading value, with all other values being set as null, but I think this could cause another issue:
At present, once we have a 3d fix, we see this GPS data updating our telemetry, but if that fix is dropped, then the telemetry feed will retain the last known GPS - this is a feature I am sure we would like to keep. If my original idea of sending null values if ap_fixtype<3 would cause those GPS values to be zeroed when we lose the fix - so this is not what we need. Instead, we need that if we lose the fix (I.e. if if ap_fixtype>=3 then it goes to <3) then I would think we need to send the data with last known values rather than null values, such that the telemetry sensor retains its last known GPS info, but it will always have current Heading information updated.
Jochen, would you be willing to look at this suggestion please - its a bit beyond my programming abilities ;-)
The text was updated successfully, but these errors were encountered: