You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement the $DTS command in order to remotely set some data fields before computation #63
With the $DTS string we could set some useful data, like the external temperature.
The firmware could use the status matrix to choose between two behaviors (in acquisition phase):
Read the sensor and write the value into the appropriate field
Put the last value (received by the $DTS string) into the appropriate field
Implementation started (commit 315e132).
Now it is possible to disable the external temperature sensor (using $STS,-1,-1,-1,0,-1,-1,-1,-1,-1) and then force the External Temperature value (using $DTS,0,0,0,0,0,0,0,0,300,0 to force 300 [K] for example).
The implementation now includes the absolute and the differential pressure, with their relative temperatures (commit 0255e11).
The overall character to leave fields as is is changed, now is the =.
Thus, we can use $DTS,=,=,=,=,=,=,=,=,300 to force the external temperature to 300 [K].
When the temperature sensor is not present, the value can be regularly updated via the $DTS command. But the assignment can also be a one-time operation, in case there are no devices that can keep updated the value.
In the second case we could compensate with the altitude drop considering the standard ISA Environmental lapse rate of 6.49 [K/km]?
Maybe it will be a better approximation (in a good range and with a given initial value) than leave the temperature constant.
Right, and the possibility of transfer data between the ADC and the attached devices is useful.
ISA altitude(with standard troposphere temperature lapse) can be calculated using AirDC::ISAAltitude(int mode=1). That calculation, as standard, does not use temperature as input data. This attitude is considered as a baseline.
On the other hand, ground pressure and ground temperature can be used to obtain a better altitude measurement.
The idea to handle temporary or permanent measurements unavailability is good too. We can also think of cope with basic sensor failure detection and reconfiguration. However, I rather postpone that kind of task until implementation and test of basic features are completed.
It would be a great task to implement more sophisticated and accurate way to calculate the altitude using the temperature and the pressure too.
However, I would now to bring the focus on the temperature in input:
The external temperature could be measured by the ADC using the external temperature sensor.
As alternative it could be set by the $DTS command, as yet implemented.
In the second case, the temperature should be kept updated at a good rate, but this is not always possible. In the extreme case, the user could set the external temperature once at the start (let me say, once every flight).
Thus, if we consider the following known data:
_Tinput = The last temperature [K] received by the $DTS command;
ISAAltitude_old = The ISA altitude [m], stored at _Tinput time;
ISAAltitude = The current ISA altitude [m];
I wondered if it could be a good idea (in case the sensor is not present) to compensate the external temperature in input this way (when a new value is not available):
Of course that can be implemented into the main sketch
Within the standardized troposphere the temperature lapse rate is -6.5°K/1000 m. You formula will provide a way to get a verosimile value of temperature when there is no available a local measurement temperature.
Activity
GrazianoCapelli commentedon Jan 13, 2018
Implementation started (commit 315e132).
Now it is possible to disable the external temperature sensor (using
$STS,-1,-1,-1,0,-1,-1,-1,-1,-1) and then force the External Temperature value (using$DTS,0,0,0,0,0,0,0,0,300,0to force 300 [K] for example).GrazianoCapelli commentedon Jan 14, 2018
The implementation now includes the absolute and the differential pressure, with their relative temperatures (commit 0255e11).
The overall character to leave fields as is is changed, now is the
=.Thus, we can use
$DTS,=,=,=,=,=,=,=,=,300to force the external temperature to 300 [K].GrazianoCapelli commentedon Jan 16, 2018
One observation about the external temperature:
When the temperature sensor is not present, the value can be regularly updated via the
$DTScommand. But the assignment can also be a one-time operation, in case there are no devices that can keep updated the value.In the second case we could compensate with the altitude drop considering the standard ISA Environmental lapse rate of 6.49 [K/km]?
Maybe it will be a better approximation (in a good range and with a given initial value) than leave the temperature constant.
JLJu commentedon Jan 16, 2018
Right, and the possibility of transfer data between the ADC and the attached devices is useful.
ISA altitude(with standard troposphere temperature lapse) can be calculated using AirDC::ISAAltitude(int mode=1). That calculation, as standard, does not use temperature as input data. This attitude is considered as a baseline.
On the other hand, ground pressure and ground temperature can be used to obtain a better altitude measurement.
ISAAltitude(int mode=2) uses ground pressure(#60) to get better altitude readings. See https://www.basicairdata.eu/projects/barometric-altimeter/ (Altitude compensated by pressure at sea level). This method is used on full-size aircraft.
Mode=3 includes temperature and pressure correction; I will paste the method into the code as soon as possible
The use of outside temperature impacts directly on the calculation of the true airspeed
JLJu commentedon Jan 17, 2018
The idea to handle temporary or permanent measurements unavailability is good too. We can also think of cope with basic sensor failure detection and reconfiguration. However, I rather postpone that kind of task until implementation and test of basic features are completed.
GrazianoCapelli commentedon Jan 17, 2018
It would be a great task to implement more sophisticated and accurate way to calculate the altitude using the temperature and the pressure too.
However, I would now to bring the focus on the temperature in input:
The external temperature could be measured by the ADC using the external temperature sensor.
As alternative it could be set by the
$DTScommand, as yet implemented.In the second case, the temperature should be kept updated at a good rate, but this is not always possible. In the extreme case, the user could set the external temperature once at the start (let me say, once every flight).
Thus, if we consider the following known data:
$DTScommand;I wondered if it could be a good idea (in case the sensor is not present) to compensate the external temperature in input this way (when a new value is not available):
_TAT = _Tinput - (ISAAltitude - ISAAltitude_old) * 6.49e-3This could be a very easy job to do for the main sketch before every computation.
JLJu commentedon Jan 17, 2018
Of course that can be implemented into the main sketch
Within the standardized troposphere the temperature lapse rate is -6.5°K/1000 m. You formula will provide a way to get a verosimile value of temperature when there is no available a local measurement temperature.