element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
NexGen Flight Simuator Where are we now? New Years Day 2025
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: phoenixcomm
  • Date Created: 3 Sep 2025 3:49 AM Date Created
  • Views 83 views
  • Likes 3 likes
  • Comments 1 comment
  • flight simulator
  • nexgen
  • Java E2e
  • c
  • hardware
  • software
Related
Recommended

Where are we now? New Years Day 2025

phoenixcomm
phoenixcomm
3 Sep 2025

imageAs 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 
Error Handling. 

#define FAIL -1
#define PASS 1
// this statement could be
// at the bottom of if-else or
// switch case but must be SET
above. This is very messy
return ( FAIL);
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]);
}

OR

for (int i = 0; i < inputs.length; i++) {
    heavyCrunch(inputs[i]);
    if (Thread.interrupted()) {
        // We've been interrupted: no more crunching.
        return;
    }}
OR

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;


NOTE. The NexGen1 was written
in PERL.
Interrupts!

class MyThread extends Thread {
public void run() {


// Code to be executed by the thread
System.out.println("Hello from MyThread!"); }}

OR 

class MyRunnable implements Runnable {
public void run() {
// Code to be executed by the thread
System.out.println("Hello from MyRunnable!"); }

// Creating and starting the thread
Thread thread = new Thread(new MyRunnable());
thread.start();

METHODS ARE

  • start(): Initiates the execution of the thread.
  • run(): Contains the code that will be executed by the thread.
  • sleep(): Pauses the thread for a specified period.
  • join(): Waits for the thread to finish execution.
  • interrupt(): Interrupts the thread, potentially causing it to terminate.

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. 

  • Sign in to reply
  • Jan Cumps
    Jan Cumps 2 days ago

    C++ has the very same constructs. Exceptions, Invokable, same thread support... .Love java, but this comparison is odd.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube