Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Pages: 1 [2] 3 4 ... 20

Author Topic: CARsim  (Read 76258 times)

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6542
  • Pegs is clever, but tae hain’t a touch sentimental
    • outerra.com
Re: CARsim
« Reply #15 on: September 29, 2015, 03:27:39 am »

You are calling engine() function that provides force acting on given wheel. You'd have to balance the distribution yourself. I imagine a transmission simulator would take care of that, but for now you need to do it in script.

Btw in our internal version I added support for differentials between wheels on the same axle, and it redistributes the forces applied on the paired wheels automatically.
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2252
  • It´s way too complex, dont let me try to explain !
Re: CARsim
« Reply #16 on: September 29, 2015, 06:02:56 am »

I think he wanted it to be divided automatically between the defined wheels, but I agree, there is more and easy controll over the stuff if its in the script.

Btw in our internal version I added support for differentials between wheels on the same axle, and it redistributes the forces applied on the paired wheels automatically.

Thats great ! (is the pairing way gonna be modifyable too ? Can imagine stuff to build witch would have 3 or more wheels (or applyances) on a differential-like force distribution basis) ... also, how ya want to do the axle differential distribution, when later multiple ground materials are present, each white its own coeficient ? Will there be some special call script, or somehow internally in OT ? Cause id like at least some function that could show the actual coeficient under the selected wheel and some incorporation into models - so that materials would have the ability to have such a coeficient too (maybe also white some change parameters due to weather effects later, but that it would not be reqired if not written in the .matlib file). (building ramps and driving-test fields, man-made obstacles).
« Last Edit: September 29, 2015, 06:09:11 am by PytonPago »
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6542
  • Pegs is clever, but tae hain’t a touch sentimental
    • outerra.com
Re: CARsim
« Reply #17 on: September 29, 2015, 06:16:44 am »

Note that the friction already changes depending on the surface material, since:
Quote
Version 0.8.4.5948 (22 Sep 2015)
  • tire friction depending on surface material
You can observe different braking distances (and tires skidding) on grass vs asphalt. Friction table also includes coefficients for wet surfaces.
With differential you can get a situation that one wheel skids and the other can't move. On T817 you won't notice that much because of 4 axles, but you can modify the script to only have one axle powered.

The differential is based on computed friction forces on both tires, and you can use that to do the same balancing between axles from the script. I'll have to expose the skid value in wheel info data.
Logged

SteelRat

  • Sr. Member
  • ****
  • Posts: 380
  • newbie
Re: CARsim
« Reply #18 on: September 29, 2015, 09:08:42 am »

Quote
You are calling engine() function that provides force acting on given wheel. You'd have to balance the distribution yourself. I imagine a transmission simulator would take care of that, but for now you need to do it in script.

Yes, I later came to this conclusion.
Consider this logic is not a problem.
Logged

SteelRat

  • Sr. Member
  • ****
  • Posts: 380
  • newbie
Re: CARsim
« Reply #19 on: September 29, 2015, 09:28:32 am »

Quote
Btw in our internal version I added support for differentials between wheels on the same axle, and it redistributes the forces applied on the paired wheels automatically.

It would be nice to receive such a possibility

Code: [Select]
function init_chassis(param) {

    this.register_event("car/transmission/diff_lock", function() {
          if (this.tm.diffLock)
               this.tm.diffLock = false;
          else
               this.tm.diffLock = true;
    });

    this.register_event("car/transmission/all_wheels", function() {
          if (this.tm.allWheels)
               this.tm.allWheels = false;
          else
               this.tm.allWheels = true;
    });
}

function init_vehicle() {
     this.tm.diffLock = false;
     this.tm.allWheels = false;
     this.tm.wheels = [
         {alwaysOn:false},
         {alwaysOn:false},
         {alwaysOn:false},
         {alwaysOn:false},
         {alwaysOn:true},
         {alwaysOn:true},
         {alwaysOn:true},
         {alwaysOn:true}
     ];
}

function update_frame(dt, engine, brake, steering, parking) {
      var force = 1000;
      for (var i = 0; i < this.tm.wheels.length; i++) {
           if (this.tm.wheels[i].alwaysOn || this.tm.allWheels) {
                 this.wheel_force(i, force, this.tm.diffLock);
           } else {
                 this.wheel_force(i, 0, false);
           }
      }
}
« Last Edit: September 29, 2015, 09:31:24 am by SteelRat »
Logged

SteelRat

  • Sr. Member
  • ****
  • Posts: 380
  • newbie
Re: CARsim
« Reply #20 on: September 29, 2015, 09:36:09 am »

Thank PytonPago!)
Logged

SteelRat

  • Sr. Member
  • ****
  • Posts: 380
  • newbie
Re: CARsim
« Reply #21 on: September 29, 2015, 09:57:28 am »

Quote
On T817 you won't notice that much because of 4 axles, but you can modify the script to only have one axle powered.

Even with two leading axes management becomes a problem on the offroads, in the presence of height differences).
Great!
Logged

SteelRat

  • Sr. Member
  • ****
  • Posts: 380
  • newbie
Re: CARsim
« Reply #22 on: September 29, 2015, 03:21:59 pm »

Eeeeeeeeeeeeeeeeeeeeee! :) :facepalm:

The result was a gorgeous cartoon :)

Logged

SteelRat

  • Sr. Member
  • ****
  • Posts: 380
  • newbie
Re: CARsim
« Reply #23 on: October 05, 2015, 10:41:24 am »

Hi cameni!

I can not understand is not as declared here
https://en.wikipedia.org/wiki/Peukert%27s_law

Using the above example, if the battery has a Peukert constant of 1.2 and is discharged at a rate of 10 amperes, it would be fully discharged in time, which is approximately 8.7 hours. It would therefore dispense only 87 ampere-hours rather than 100.

I get a very different result
Code: [Select]
var dischargeTime = 20 * (100 / (10 * 20)) ^ 1.2;
result
Code: [Select]
dischargeTime == 11
Who is wrong? I, or Wiki.
Logged

SteelRat

  • Sr. Member
  • ****
  • Posts: 380
  • newbie
Re: CARsim
« Reply #24 on: October 05, 2015, 11:38:32 am »

 :facepalm:

Code: [Select]
var dischargeTime = Math.pow(20 * (100 / (10 * 20)), 1.2);
But still the result of another

Code: [Select]
dischargeTime == 15.848931924611132
Logged

SteelRat

  • Sr. Member
  • ****
  • Posts: 380
  • newbie
Re: CARsim
« Reply #25 on: October 05, 2015, 11:44:20 am »

Mathematician from me even one!)

Code: [Select]
var dischargeTime = 20 * Math.pow(100 / (10 * 20), 1.2);
// result == 8.705505632961241
Logged

SteelRat

  • Sr. Member
  • ****
  • Posts: 380
  • newbie
Re: CARsim
« Reply #26 on: October 08, 2015, 07:09:33 pm »

Report: Electrical network - Battery.

RU
Много времени я на это потратил). И не зря, я доволен результатом. Есть ещё над чем по работать в плане тонких настроек, но это уже вопросы относительно золотой середины между реальностью и виртуальностью).

И так, симуляция разряда аккумуляторной батареи транспортного средства.

Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2252
  • It´s way too complex, dont let me try to explain !
Re: CARsim
« Reply #27 on: October 09, 2015, 01:15:18 am »


Много времени я на это потратил). И не зря, я доволен результатом. Есть ещё над чем по работать в плане тонких настроек, но это уже вопросы относительно золотой середины между реальностью и виртуальностью).

И так, симуляция разряда аккумуляторной батареи транспортного средства.

---

I spend a lot of time on this , but it was worth it. There are still some things to work on in terms of small tweaks, but thats just a thing of the golden middle between realism and virtual-reality.

So here it is, a simulation of a car-battery discharging.


Interesting stuff there ! This also means i have to find out the voltage/poweruse of all electrical stuff on the car to make it work properly, right ?  =D

Also, that sulfate-variable - did you put chemistry into the equasion ? How, and is it possible to look at it even from electrode difussion, electrode surface inhibition and ion-travell physics (based on the changing concentration and some specific characteristics describing the dillution of local concentration differences around electrodes + electrolyte-based dipole characteristics(actually, this part is kinda the same as gel/thin-film chromatography ion-travelling with some few concentration stuff in mind for liquid electrolytes)) ?
« Last Edit: October 09, 2015, 01:26:00 am by PytonPago »
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

Revolver

  • Hero Member
  • *****
  • Posts: 539
  • Adlerhorst-Hangar Design Group ©
Re: CARsim
« Reply #28 on: October 09, 2015, 05:57:21 am »

Привет SteelRat,

имею один вопрос к этому Модулю. Это возможно прикрутить к с-ту и заставить
правильно работать? (чтобы понятно было о чом речь; к пр. на 190 стояла стартбатарея
для старта, нО потом електрику перенимал Генератор).

Gruß,
Stefan
Logged
"Es gibt nur eine Sünde, die gegen die ganze Menschheit mit allen ihren Geschlechtern begangen
werden kann, und dies ist die Verfälschung der Geschichte."(F.Hebbel)

i7(960)4x4.0GHz,16Gb-RAM,GTX980Ti(6Gb),Xonar-Phoebus-7.1,2x500Gb/SSD,Hotas-Warthog

SteelRat

  • Sr. Member
  • ****
  • Posts: 380
  • newbie
Re: CARsim
« Reply #29 on: October 09, 2015, 09:59:00 am »

Привет SteelRat,

имею один вопрос к этому Модулю. Это возможно прикрутить к с-ту и заставить
правильно работать? (чтобы понятно было о чом речь; к пр. на 190 стояла стартбатарея
для старта, нО потом електрику перенимал Генератор).

Gruß,
Stefan

Хм! А разве JSBsim не моделирует симуляцию бортовой электросети? Просто я не фанат лётных симуляторов, по этому не в курсе. Хотя по логике, симуляция минимум источника энергии должна бы быть в продвинутом лётном симуляторе, или он не настолько продвинут?)

И да, ни каких проблем не предвижу в плане прикрутить это к самолёту или планеру).

На данный момент я реализовал, в определённой степени готовности, симуляцию разряда батареи. Теперь берусь за генератор. Всё что нужно будет сделать по готовности, для самолёта, это внести правки в плане исключения подзарядки батареи, то есть исключить из симуляции подзаряд батареи от генератора.
Logged
Pages: 1 [2] 3 4 ... 20