Skip to content

Update Vars.js#80

Merged
Endebert merged 1 commit intoEndebert:devfrom
ansarto:patch-1
Aug 23, 2020
Merged

Update Vars.js#80
Endebert merged 1 commit intoEndebert:devfrom
ansarto:patch-1

Conversation

@ansarto
Copy link
Copy Markdown
Contributor

@ansarto ansarto commented Jul 31, 2020

data update for Post Scriptum mortar

update for Post Scriptum mortar
@Endebert Endebert merged commit e0c1136 into Endebert:dev Aug 23, 2020

export const GRAVITY = 9.8;
export const MIL_TO_DEG_FACTOR = 360 / 6400;
export const MIL_TO_DEG_FACTOR = 360.0 / 6283.1853;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only noticed after merging, but why did you change the conversion factor here? Can you tell me where you got that 6283.1853 from?

Copy link
Copy Markdown
Contributor Author

@ansarto ansarto Aug 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6283.1853 ~ 2pi1000 which is the value of 360 degrees in MilliRadians
I try to use the full value of PI, but it slows down the script.
With this value I have the best results when I use mortar

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know when it would be deployed on the PSMC website ? :)

Copy link
Copy Markdown
Owner

@Endebert Endebert Aug 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'll release it as soon as this is cleared up.

Do you know that they are using these values ingame? You're saying you had the best results with those, but the difference should be rather miniscule, not sure if that necessitates a change.

I don't know which one they use internally, but so far I relied on them using NATO mils, see here: https://en.wikipedia.org/wiki/Milliradian#Definitions_for_maps_and_artillery

For maps and artillery, three rounded definitions are used which are close to the real definition, but more easily can be divided into parts. The different map and artillery definitions are sometimes referred to as "angular mils", and are:

  • 1/6400 of a circle in NATO countries.
  • ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll check with the default value in the afternoon and check if the results are suitable.

I'm not sure about NATO values in Post Scriptum, since NATO was founded in 1949.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will this impact Squad MC accuracy?

Copy link
Copy Markdown
Contributor Author

@ansarto ansarto Aug 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just check on both game.
It seems that Squad use NATO mil and Post Scriptum default milliradians ...
Shells fall nearly 30 meters off the target

I'm asking PS devs about that

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Endebert is it possible to use 1/6400 for Squad and 1/6283.1853 for Post Scriptum ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you can, but you would need to rely on the flag that determines if you're in Squad or PS mode:

App.vue:
// variable that determines PostScriptum mode
const postScriptum = false;

So based on that bool flag you can determine which mil standard to use. Either you have to start passing this boolean around relevant methods. From the first glance that looks like a terrible idea as you would have to pass it through a lot of methods.

Alternatively, you can maybe move the flag into Utils file all together. Can't exactly tell you if that will have any drastic side effects and whether you will break the app, but feel free to try. By moving the flag into Utils, you can simplify logic like this one in Map.vue:
/** @type {MortarType[]} */
mortarTypes: this.postScriptum ? Utils.getPSMortarTypes() : Utils.getSquadMortarTypes(),

@Endebert
Copy link
Copy Markdown
Owner

Fix has been added to choose the correct Milliradian per game. Should be online in a few minutes.

This was referenced Aug 29, 2020
Artoria2e5 added a commit to Artoria2e5/squadmc that referenced this pull request Jan 10, 2023
Update the cMS script to match the Endebert#80 output. The GER/BR4/US6 mortars now give vel 119.89, quite close to the 119.93 calculated by @ansarto. Due to online editor laziness, I did not make separate mil functions, but just threw in a switch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants