Include Artlav's Autotime in future OpenOrbiter release

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,176
Reaction score
1,518
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
He/Him
There was some discussion about possibly including Face's SoundBridge in the OpenOrbiter distribution and installing it alongside XRSound by default, but I don't know what the status of that is.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,371
Reaction score
542
Points
153
Location
Vienna
There was some discussion about possibly including Face's SoundBridge in the OpenOrbiter distribution and installing it alongside XRSound by default, but I don't know what the status of that is.
Well, the open sourcing of SoundBridge depends on the approval of DanSteph. Unfortunately he has not replied to my request, and it also seems like he is not visiting his own forum that much anymore. I think he more or less left Orbiter for good. However, I would certainly not object if the binary is distributed along with OpenOrbiter.

However, I think this is misleading on the subject, anyway. Ripley talks about a feature that the central OrbiterSound DLL offered. SoundBridge is not replicating everything that DLL offered, only acts as a bridge for the SoundSDK interface. Of course it would be possible to implement it there, but it is not there yet.
 

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,055
Reaction score
344
Points
123
Location
Rome
Website
www.tuttovola.org
I don't see why a feature to disable autopilots when timewarping should be linked to a (any) sound module.
Dansteph opted to do so, and it's ok, but my request didn't imply that.
It could as well be a flag in the Launchpad.
Artlav's solution was more precise, as one could decide the timewarp threshold at which disengaging autopilots, by means of a config file.
 
Last edited:

hagiasophia420

New member
Joined
Jun 11, 2022
Messages
9
Reaction score
6
Points
3
Location
Brazil
Why not just include artlav's autotime in OpenOrbiter, someone could reach out to him I am sure he won't object. Or someone can just recreate the plugin in MIT.
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,660
Reaction score
432
Points
173
Location
Earth
Website
orbides.org
I sure don't mind.
And the whole thing was like 50 lines of code - shouldn't be too hard to recreate or incorporate.

Code:
//############################################################################//
#define STRICT
#define ORBITER_MODULE
#include "orbitersdk.h"
double max_accel;
//############################################################################//
DLLCLBK void InitModule (HINSTANCE hDLL)
{
 FILE *fp;
 char buf[255],val[255];
 int i;

 max_accel=100;

 if((fp=fopen("Config\\autotime.cfg","r"))==NULL){
 }else{
  i=0;
  while(!feof(fp)&&i++<100){
   fscanf(fp,"%[^=]=%[^=^\n]\n",buf,val);
   if(!strcmp(buf,"autopilot_accel_limit"))max_accel=atoi(val);
  }
  fclose(fp);
 }
}   
//############################################################################//
DLLCLBK void ExitModule(HINSTANCE hDLL){}
//############################################################################//
void clear_acc()
{
 VESSEL *f;
 if(oapiGetTimeAcceleration()>max_accel){
  f=oapiGetFocusInterface();
  if(f){
   f->DeactivateNavmode(NAVMODE_KILLROT);
   f->DeactivateNavmode(NAVMODE_HLEVEL);
   f->DeactivateNavmode(NAVMODE_PROGRADE);
   f->DeactivateNavmode(NAVMODE_RETROGRADE);
   f->DeactivateNavmode(NAVMODE_NORMAL);
   f->DeactivateNavmode(NAVMODE_ANTINORMAL);
   f->DeactivateNavmode(NAVMODE_HOLDALT); 
  }
 }
}  
//############################################################################//
DLLCLBK void opcPreStep(double simt,double simdt,double mjd){clear_acc();}  
DLLCLBK void opcPostStep(double simt,double simdt,double mjd){clear_acc();}  
//############################################################################//
 
Top