As I have said before most of the simulator will be, or is written in Java EE. The question was asked why Java simple answer. Java has a much nicer easier when something happens in Software or in hardware!
C / C++ | Java | PEARL | |
Program |
#define FAIL -1 |
for (int i = 0; i < importantInfo.length; i++) { // Pause for 4 seconds try { Thread.sleep(4000); } catch (InterruptedException e) { // We've been interrupted: no more messages. return; } // Print a message System.out.println(importantInfo[i]); } for (int i = 0; i < inputs.length; i++) { heavyCrunch(inputs[i]); if (Thread.interrupted()) { // We've been interrupted: no more crunching. return; }} OR if (Thread.interrupted()) { throw new InterruptedException(); } |
in PERL its the same as in C but you don't have #defines. So you have to go old school. The $my is to declare the var. $my FAIL == -1; $my PASS == 1; |
Interrupts! |
class MyThread extends Thread {
OR class MyRunnable implements Runnable { METHODS ARE
|
NOW to the Good Stuff! This has been a rotten year for me! nothing hordid. Just one thing after another. Its a year that I don't want to live through it again.
On with my pet project NexGen. This in now version 4 or so. First was PERL, which begot C, when got cleaned up, but got very messy with the IOSET calls. So I went to a java Forum and it meant that I had to learn Java all over again. And how to think about classes and methods, I'm still learning I am also learning Java EE with Jetty the server. I will write a Blog about this topic as all the youtubers leave out some very important things as Jetty is written in Java it was a headache to install. Now on to NexGen as you all know (maybe) I have stopped with usb, serial, and other forms of communications. I have settled on CANaerospace. If you have read my blatherings about it you know its uses a ISO model! So getting from the FRUs to the Server is done in a FRU which translates CAN bus using CANaerospace protocol to CANaerospace over Ethernet and then that is decoded at the server. Now there are NO ERRORS in TRANSLATION. There is one full Ethernet bus in the system and that is the NAVbus. The NAVbus sends packets continuously of whats going on in and to the Aircraft. Things that are set out are: NavLat, NavLon, Alt, Time, Mclock (misson). We also need things like Vroll, Hroll, Yaw, and their accelerations. We cant for get about gross thrust.1 and thrust.2. there is more but that what every body needs (sort of). For instance Radios need all the NAV, Alt, Time, heading. Why do the radios need all this jazz? Well if you parked at JFK (NY) and your radio is tuned to LAX (CA) you cant hear it. Beacons are in the same boat so to speak, but there good only for 30 miles at 10,000ft more depending on altitude. The aircraft radios for communication with the tower is a little more than 15~ miles, but again it depends on altitude.