WGS84 Gravity Model C++ Code Generation Error
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am using Matlab R2015a Simulink. I have a model with Aerospace Blockset’s WGS84 Gravity Model block, with WGS84 Close Approximation setting selected. When I generate C++ code, I get type cast errors like “error C2440: 'type cast' : cannot convert from 'real_T' to 'MonthIdx'”. The reason for the error is that the code is ok for C but not C++. Interestingly, correct C++ code is generated when I select the WGS84 Taylor Series Approximation setting in gravity block. For now, I manually modify the generated code with the following type conversion workaround , I hope it will be fixed soon:
void InitCalcAtmosProfile310(real_T ppercentReal, real_T pvarReal, real_T paltReal, real_T *altitude, real_T *temperature310, real_T *density310, real_T *minmax) {
int_T ppercent = ppercentReal;
int_T pvar = pvarReal;
int_T palt = paltReal;
....
real_T calc_Julian_date(real_T uDataMonthReal, real_T uDataDay, real_T uDataYear) {
int_T uDataMonth = uDataMonthReal;
...
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Reference Applications en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!