jontio / JAERO

Demodulate and decode Aero signals. These signals contain SatCom ACARS messages as used by planes beyond VHF ACARS range
https://jontio.zapto.org/hda1/jaero.html
MIT License
224 stars 39 forks source link

Compilers MSVC + Qt-5.4 #14

Closed IvanKor closed 5 years ago

IvanKor commented 8 years ago

Add in DSP.h

ifdef _MSC_VER

define M_E 2.7182818284590452354 / e /

define M_LOG2E 1.4426950408889634074 / log_2 e /

define M_LOG10E 0.43429448190325182765 / log_10 e /

define M_LN2 0.69314718055994530942 / log_e 2 /

define M_LN10 2.30258509299404568402 / log_e 10 /

define M_PI 3.14159265358979323846 / pi /

define M_PI_2 1.57079632679489661923 / pi/2 /

define M_PI_4 0.78539816339744830962 / pi/4 /

define M_1_PI 0.31830988618379067154 / 1/pi /

define M_2_PI 0.63661977236758134308 / 2/pi /

define M_2_SQRTPI 1.12837916709551257390 / 2/sqrt(pi) /

define M_SQRT2 1.41421356237309504880 / sqrt(2) /

define M_SQRT1_2 0.70710678118654752440 / 1/sqrt(2) /**

endif // _MSC_VER

In aerol.h modifi typedef enum ReturnResult { OK_Packet= 0x01,// 0b00000001, OK_R_Packet= 0x03,// 0b00000011, OK_T_Packet= 0x05,// 0b00000101, Bad_Packet= 0x00,// 0b00000000, Test_Failed= 0x20,// 0b00100000, Nothing= 0x08,// 0b00001000, FULL= 0x10,// 0b00010000 } ReturnResult;

jontio commented 8 years ago

Are these the only remaining things that need to be addressed for compiling with MSVC?

have you tried the following lines in DSP.h instead of all the defines?

define _USE_MATH_DEFINES

include

IvanKor commented 8 years ago

Yes, only it is necessary to compile with MSVC.

In DSP.h can be used :

undef _MATH_DEFINES_DEFINED

define _USE_MATH_DEFINES

include