I’ve been working to integrate JSBSIM with Unity for the past two years. I had also released a JSBSIM based flight sim for Android devices on Google Play a year back. I’ve now ended up with a very simple interface that can map JSBSIM properties directly to C# objects by using attributes. For example, you can link a property named “/fcs/flaps-pos-norm” like this
public abstract class FCS {
[SimAttribute("/fcs/flaps-pos-norm")]
public abstract float FlapsPos { get; set;}
}
To get and set values to this simulation property, simply use it like a class variable, and the inputs will be automatically propagated to JSBSIM.
Debug.log("Flaps position : "+fcs.FlapsPos);
fcs.FlapsPos = 0.4f;
This simple.
It uses dynamic code generation and complex native calls and callbacks at runtime, but runs incredibly fast.
I was interested in knowing if anyone would like to purchase this if I put it in Asset Store. The price though would be quite steep because it took me years to build it.
Sounds very interesting and there would be definitely a purchase interest, but sure, depending on price and quality (especially referring documentation). Years of development must count, that’s clear, but expectations to cover that with a price set for one customer might be too ambitious…
Thanks for your interest. I never uploaded it to Asset Store due to personal reasons, but I have all the work ready.
There is one consideration that I should tell though.
JSBSIM simulates in double precision geographical coordinate system that can map the entire earth. However, Unity only works in floats and assumes terrains to be planar. So you will need to write a coordinate mapping system to convert between the two, and work around Unity’s single precision floats.
The flight simulator that I wrote for Google Play using this framework uses a paged terrain system and does a dirty mapping by multiplying latitude and longitudes with constants, but that will only hold good for small distances. If you’re writing a full earth or large distance capable simulator, you’ll probably need to address that.
Let me know if you need to know anything about the framework.
@devin8 Was this ever released? My goal is to build a flight simulator based on JSBSim for Deep Reinforcement Learning research. I tried using FlightGear, but the camera system is unwieldy. Unity seems like a better option, seeing as how they have ML Agents.