I was using the algorithm2e environment so far. However, the springer journal class does not support it. In it's documentation, it is suggesting to use
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{algorithmicx}
However I have no clue how I can convert my algorithm2e based code using the above packages. Getting compilation error in almost every line. The MWC is below-
\documentclass[pdflatex, sn-aps]{sn-jnl}% American Physical Society (APS) Reference Style
%%%% Standard Packages
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{comment}
\usepackage[center]{caption}
\usepackage{subcaption}
\usepackage{float}
\usepackage[misc]{ifsym}
\usepackage{csquotes}
\usepackage[section]{placeins}
\usepackage{siunitx}
%%<additional latex packages if required can be included here>
%\usepackage[linesnumbered,lined,boxed,commentsnumbered]{algorithm2e}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{algorithmicx}
\usepackage{amsmath}
\usepackage{graphicx}
\begin{document}
%Algorithm-1 code*****************
\begin{algorithm}
\SetAlgoLined
\SetKwInOut{Input}{Input}
\SetKwInOut{Output}{Output}
function fall_check$()$\
\Input{The accelerometer data and timestamp }
\Output{response $( TRUE/FALSE)$}
{
read_data$()$;
Calculate the SVM using the equation \ref{SVM}.\
\If{ $SVM_\mathrm{acc}>SVM_\mathrm{acc}(threshold)$ & $time_count< 2 seconds $}
{
\eIf {$record_count > 150$}
{
return$(TRUE)$;
}
{
return$(FALSE)$;
}
}
}
\caption{Check for the fall event~(runs on the RPi server)}
\label{alg:algo1}
\end{algorithm}
\end{document}
Please help.
