Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/assets/Vars.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,23 @@ export const SQUAD_VELOCITY = 109.890938;
export const SQUAD_MAX_DISTANCE = 1232;

export const PS_8CM_NAME = "GER 8cm";
export const PS_8CM_VELOCITY = 116.179939;
export const PS_8CM_MAX_DISTANCE = 1377;
export const PS_8CM_VELOCITY = 119.93;
export const PS_8CM_MAX_DISTANCE = 1467;

export const PS_3INCH_NAME = "BRIT 3″";
export const PS_3INCH_VELOCITY = 116.179939;
export const PS_3INCH_MAX_DISTANCE = 1377;
export const PS_3INCH_VELOCITY = 119.93;
export const PS_3INCH_MAX_DISTANCE = 1467;

export const PS_4INCH_NAME = "BRIT 4″";
export const PS_4INCH_VELOCITY = 160.598197;
export const PS_4INCH_MAX_DISTANCE = 2632;
export const PS_4INCH_VELOCITY = 166.94;
export const PS_4INCH_MAX_DISTANCE = 2818;

export const PS_6CM_NAME = "US 6cm";
export const PS_6CM_VELOCITY = 116.179939;
export const PS_6CM_MAX_DISTANCE = 1377;
export const PS_6CM_VELOCITY = 119.93;
export const PS_6CM_MAX_DISTANCE = 1467;

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(),

export const MAX_SUBTARGETS_COUNT = 49;

/**
Expand Down