Comments (4)
I would like to know if it's possible to port JSBSim on Android?
Don't see any reason it can't be. JSBSim doesn't make use of any esoteric OS APIs/features, mostly plain old C++.
from jsbsim.
Hello,
i think the cmake file have to be updated to call the NDK (Android Native development kit) to produce a libJSBSim.a.
from jsbsim.
Hello, i think the cmake file have to be updated to call the NDK (Android Native development kit) to produce a libJSBSim.a.
According to the Android developer docs, I understand that our CMake files can be used unchanged provided that you pass some requested arguments
$ cmake \
-DCMAKE_TOOLCHAIN_FILE=$NDK/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=$ABI \
-DANDROID_PLATFORM=android-$MINSDKVERSION \
$OTHER_ARGS
It does not seem that the CMake files for JSBSim need to be modified, do they ?
from jsbsim.
Hello,
Thank you for the command line, I tried it and it's promising but generates some errors.
Here is the command line
cmake .. \
-DCMAKE_TOOLCHAIN_FILE=/Users/yann/Library/Android/sdk/ndk/23.2.8568313/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=arm64-v8a \
-DANDROID_PLATFORM=android-16
And the errors
21%] Building CXX object src/math/CMakeFiles/Math.dir/FGRealValue.cpp.o
In file included from /Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.cpp:57:
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.h:102:22: error: field has incomplete type 'struct sockaddr_in'
struct sockaddr_in scktName;
^
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.h:102:10: note: forward declaration of 'JSBSim::sockaddr_in'
struct sockaddr_in scktName;
^
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.cpp:143:15: error: invalid application of 'sizeof' to an incomplete type 'struct sockaddr_in'
int len = sizeof(struct sockaddr_in);
^ ~~~~~~~~~~~~~~~~~~~~
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.h:102:10: note: forward declaration of 'JSBSim::sockaddr_in'
struct sockaddr_in scktName;
^
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.cpp:145:25: error: use of undeclared identifier 'htons'
scktName.sin_port = htons(port);
^
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.cpp:177:40: error: use of undeclared identifier 'IPPROTO_UDP'
sckt = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
^
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.cpp:196:26: error: invalid application of 'sizeof' to an incomplete type 'struct sockaddr_in'
memset(&scktName, 0, sizeof(struct sockaddr_in));
^ ~~~~~~~~~~~~~~~~~~~~
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.h:102:10: note: forward declaration of 'JSBSim::sockaddr_in'
struct sockaddr_in scktName;
^
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.cpp:198:25: error: use of undeclared identifier 'htons'
scktName.sin_port = htons(port);
^
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.cpp:201:40: error: use of undeclared identifier 'INADDR_ANY'
scktName.sin_addr.s_addr = htonl(INADDR_ANY);
^
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.cpp:203:21: error: invalid application of 'sizeof' to an incomplete type 'struct sockaddr_in'
socklen_t len = sizeof(struct sockaddr_in);
^ ~~~~~~~~~~~~~~~~~~~~
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.h:102:10: note: forward declaration of 'JSBSim::sockaddr_in'
struct sockaddr_in scktName;
^
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.cpp:248:19: error: invalid application of 'sizeof' to an incomplete type 'struct sockaddr_in'
socklen_t len = sizeof(struct sockaddr_in);
^ ~~~~~~~~~~~~~~~~~~~~
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.h:102:10: note: forward declaration of 'JSBSim::sockaddr_in'
struct sockaddr_in scktName;
^
9 errors generated.
And this one
[ 34%] Building CXX object src/models/CMakeFiles/Models.dir/FGPropulsion.cpp.o
In file included from /Users/yann/Projects/Unreal/jsbsim/src/models/FGOutput.cpp:44:
In file included from /Users/yann/Projects/Unreal/jsbsim/src/input_output/FGOutputFG.h:42:
In file included from /Users/yann/Projects/Unreal/jsbsim/src/input_output/FGOutputSocket.h:43:
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.h:102:22: error: field has incomplete type 'struct sockaddr_in'
struct sockaddr_in scktName;
^
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.h:102:10: note: forward declaration of 'JSBSim::sockaddr_in'
struct sockaddr_in scktName;
^
[ 34%] Built target Math
1 error generated.
make[2]: *** [src/models/CMakeFiles/Models.dir/FGOutput.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 35%] Building CXX object src/models/CMakeFiles/Models.dir/FGInput.cpp.o
In file included from /Users/yann/Projects/Unreal/jsbsim/src/models/FGInput.cpp:43:
In file included from /Users/yann/Projects/Unreal/jsbsim/src/input_output/FGUDPInputSocket.h:41:
In file included from /Users/yann/Projects/Unreal/jsbsim/src/input_output/FGInputSocket.h:42:
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.h:102:22: error: field has incomplete type 'struct sockaddr_in'
struct sockaddr_in scktName;
^
/Users/yann/Projects/Unreal/jsbsim/src/input_output/FGfdmSocket.h:102:10: note: forward declaration of 'JSBSim::sockaddr_in'
struct sockaddr_in scktName;
^
1 error generated.
I'll take more time later today to see what can I do.
from jsbsim.
Related Issues (20)
- JSBSim Simulink Function HOT 36
- aero/coefficient properties returning 0 HOT 1
- Can't build Unreal Engine plugin on Linux/Mac because of unsupported typeid keyword HOT 5
- JSBSim Unreal throws an Exception few seconds after/during takeoff HOT 1
- Missing support for castering nosewheel with angle limiter. HOT 8
- Param name new name in the form "hostname:port/proto" is not right in FGOutputSocket::SetOutputName HOT 4
- Build JSBSim by VS2019 and use C++ API HOT 1
- Crashes after adding an xml path to a component in the engine HOT 10
- Trim Errors Happening In RHEL8 On Models That Worked On RHEL7 HOT 11
- Updates to gitignore to tidy up git status after build HOT 2
- CMAKE Configure Error on MacOS (M1 aarch64) HOT 2
- After changing pitch and long initial conditions the yaw angle changes also for no reason HOT 1
- JSBSim interface to Matlab on Windows: throttle command from joystick doesn't work HOT 5
- Trim succeeds and results in NaN values HOT 1
- JSBSim and s-function have different results and different reactivity themselves HOT 1
- Building for Unreal 5 on Linux not working HOT 7
- Javascript alternative? HOT 2
- Linearization and simplex trim from console executable and xml script HOT 16
- FGTurbine Shutdown Spin HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsbsim.